Chromium Code Reviews| Index: scripts/slave/recipe_modules/service_account/example.py |
| diff --git a/scripts/slave/recipe_modules/service_account/example.py b/scripts/slave/recipe_modules/service_account/example.py |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..a87420152e4148a1ac9884dfec3b5c5f973153a7 |
| --- /dev/null |
| +++ b/scripts/slave/recipe_modules/service_account/example.py |
| @@ -0,0 +1,27 @@ |
| +# Copyright 2016 The Chromium Authors. All rights reserved. |
| +# Use of this source code is governed by a BSD-style license that can be |
| +# found in the LICENSE file. |
| + |
| +DEPS = [ |
| + 'recipe_engine/platform', |
| + 'recipe_engine/raw_io', |
| + 'service_account', |
| +] |
| + |
| +"""Small example of using the service_account api.""" |
| + |
| +def RunSteps(api): |
| + token = api.service_account.get_token('fake-account') |
| + |
|
nodir
2016/05/06 20:32:09
two blank lines between top level declarations
RobertoCN
2016/05/06 21:38:11
Done.
|
| +def GenTests(api): |
| + yield (api.test('service_account_win') + |
| + api.step_data('get access token', |
| + stdout=api.raw_io.output('MockTokenValueThing')) + |
| + api.platform('win', 32)) |
| + yield (api.test('service_account_linux') + |
| + api.step_data('get access token', |
| + stdout=api.raw_io.output('MockTokenValueThing')) + |
| + api.platform('linux', 64)) |
| + |
|
nodir
2016/05/06 20:32:09
this is too many blank lines here
RobertoCN
2016/05/06 21:38:11
Done.
|
| + |
| + |