producer-core/features/cli/error_reporting.feature
2015-04-03 22:36:23 +00:00

33 lines
1.1 KiB
Gherkin

Feature: CLI error reporting
Scenario: reports recipe errors
Given a recipe with an error
When I execute the recipe
Then the exit status must be 70
And the output must match /\ARuntimeError: some error\n/
Scenario: reports errors with a backtrace
Given a recipe with an error
When I execute the recipe
Then the output must match /^\s+recipe\.rb:\d+:in /
Scenario: prepends recipe file path in the backtrace
Given a recipe with an error
When I execute the recipe
Then the output must match /^\s+recipe\.rb \(recipe\)\n\s+recipe\.rb:/
Scenario: excludes producer from backtrace
Given a recipe using a remote
When I execute the recipe on unknown remote target
Then the output must not contain "producer-core"
Scenario: excludes net-ssh from backtrace
Given a recipe using a remote
When I execute the recipe on unknown remote target
Then the output must not contain "net-ssh"
Scenario: excludes ruby standard library from backtrace
Given a recipe using a remote
When I execute the recipe on unknown remote target
Then the output must not contain ruby lib directory