Implement CLI debug option
This commit is contained in:
11
features/cli_debug.feature
Normal file
11
features/cli_debug.feature
Normal file
@@ -0,0 +1,11 @@
|
||||
Feature: CLI debug option
|
||||
|
||||
Background:
|
||||
Given a recipe with:
|
||||
"""
|
||||
task(:trigger_error) { fail 'some error' }
|
||||
"""
|
||||
|
||||
Scenario: reports recipe errors
|
||||
When I execute the recipe with option -d
|
||||
Then the output must match /\ARuntimeError:.*\n\ncause:\nRuntimeError:/
|
@@ -10,6 +10,7 @@ Feature: CLI usage
|
||||
|
||||
options:
|
||||
-v, --verbose enable verbose mode
|
||||
-d, --debug enable debug mode
|
||||
-n, --dry-run enable dry run mode
|
||||
-t, --target HOST target host
|
||||
"""
|
||||
|
@@ -24,6 +24,10 @@ When /^I successfully execute the recipe on remote target$/ do
|
||||
assert_exit_status 0
|
||||
end
|
||||
|
||||
When /^I execute the recipe with option (-.+)$/ do |option|
|
||||
run_simple "producer #{option} recipe.rb", false
|
||||
end
|
||||
|
||||
When /^I successfully execute the recipe with option (-.+)$/ do |option|
|
||||
run_simple "producer #{option} recipe.rb", false
|
||||
assert_exit_status 0
|
||||
|
Reference in New Issue
Block a user