| Index: recipes/engine_tests/whitelist_steps.py
|
| diff --git a/recipes/engine_tests/whitelist_steps.py b/recipes/engine_tests/whitelist_steps.py
|
| index bbc41a8d5b4c6dcca0174afa6837206a9e89d899..7b365d7c34388bd9b60c2103ebd1beefa65ef861 100644
|
| --- a/recipes/engine_tests/whitelist_steps.py
|
| +++ b/recipes/engine_tests/whitelist_steps.py
|
| @@ -4,32 +4,44 @@
|
|
|
| """Tests that step_data can accept multiple specs at once."""
|
|
|
| +from recipe_engine.recipe_api import Property
|
| +from recipe_engine.post_process import Filter, DoesNotRun, MustRun
|
| +
|
| DEPS = [
|
| 'step',
|
| + 'properties',
|
| ]
|
|
|
| -def RunSteps(api):
|
| +PROPERTIES = {
|
| + 'fakeit': Property(kind=bool, default=True),
|
| +}
|
| +
|
| +def RunSteps(api, fakeit):
|
| api.step('something unimportant', ['echo', 'sup doc'])
|
| api.step('something important', ['echo', 'crazy!'], env={'FLEEM': 'VERY YES'})
|
| api.step('another important', ['echo', 'INSANITY'])
|
| + if fakeit:
|
| + api.step('fakestep', ['echo', 'FAAAAKE'])
|
| +
|
|
|
| def GenTests(api):
|
| - yield api.test('all_steps')
|
| + yield api.test('all_steps') + api.post_process(MustRun, 'fakestep')
|
|
|
| yield (api.test('single_step')
|
| - + api.whitelist('something important')
|
| + + api.post_process(Filter('something important'))
|
| )
|
|
|
| yield (api.test('two_steps')
|
| - + api.whitelist('something important')
|
| - + api.whitelist('another important')
|
| + + api.post_process(Filter('something important', 'another important'))
|
| )
|
|
|
| + f = Filter()
|
| + f = f.include('another important', ['cmd'])
|
| + f = f.include('something important', ['env'])
|
| yield (api.test('selection')
|
| - + api.whitelist('something important', 'env')
|
| - + api.whitelist('another important', 'cmd')
|
| + + api.properties(fakeit=False)
|
| + + api.post_process(DoesNotRun, 'fakestep')
|
| + + api.post_process(f)
|
| )
|
|
|
| - yield (api.test('result')
|
| - + api.whitelist('$result')
|
| - )
|
| + yield api.test('result') + api.post_process(Filter('$result'))
|
|
|