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..0e19f202d57a5dcfc6dbc76194d8fe276f80511f 100644 |
--- a/recipes/engine_tests/whitelist_steps.py |
+++ b/recipes/engine_tests/whitelist_steps.py |
@@ -4,32 +4,43 @@ |
"""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')) |
) |
- yield (api.test('selection') |
- + api.whitelist('something important', 'env') |
- + api.whitelist('another important', 'cmd') |
+ f = Filter() |
+ f = f.include('something important', 'env') |
+ f = f.include('another important', 'cmd') |
+ yield (api.test('selection') + api.properties() |
+ + api.post_process(f) |
+ + api.post_process(DoesNotRun, 'fakestep') |
) |
- yield (api.test('result') |
- + api.whitelist('$result') |
- ) |
+ yield api.test('result') + api.post_process(Filter('$result')) |