OLD | NEW |
(Empty) | |
| 1 # Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. |
| 4 |
| 5 DEPS = [ |
| 6 'recipe_engine/platform', |
| 7 'recipe_engine/raw_io', |
| 8 'service_account', |
| 9 ] |
| 10 |
| 11 """Small example of using the service_account api.""" |
| 12 |
| 13 def RunSteps(api): |
| 14 _ = api.service_account.get_token('fake-account') |
| 15 |
| 16 |
| 17 def GenTests(api): |
| 18 yield (api.test('service_account_win') + |
| 19 api.step_data('get access token', |
| 20 stdout=api.raw_io.output('MockTokenValueThing')) + |
| 21 api.platform('win', 32)) |
| 22 yield (api.test('service_account_linux') + |
| 23 api.step_data('get access token', |
| 24 stdout=api.raw_io.output('MockTokenValueThing')) + |
| 25 api.platform('linux', 64)) |
| 26 yield (api.test('service_account_no_authutil') + |
| 27 api.step_data('get access token', |
| 28 retcode=1) + |
| 29 api.platform('linux', 64)) |
OLD | NEW |