Fix backtrace filtering for net-ssh
Improve our filter pattern so it works for this kind of error: SocketError: getaddrinfo: hostname nor servname provided, or not known /usr/local/lib/ruby/2.2/timeout.rb:74:in `timeout' /usr/local/lib/ruby/2.2/timeout.rb:125:in `timeout' /home/tj/.gem/ruby/22/gems/net-ssh-2.9.2/lib/net/ssh.rb:207:in `new' /home/tj/.gem/ruby/22/gems/net-ssh-2.9.2/lib/net/ssh.rb:207:in `start'
This commit is contained in:
@@ -1,24 +1,22 @@
|
||||
Feature: CLI error reporting
|
||||
|
||||
Background:
|
||||
Given a recipe with:
|
||||
"""
|
||||
task(:trigger_error) { fail 'some error' }
|
||||
"""
|
||||
|
||||
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 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"
|
||||
|
Reference in New Issue
Block a user