Forward standard error stream from remote execution

This commit is contained in:
Thibault Jouan
2014-07-21 12:45:57 +00:00
parent a033e19583
commit db91eb06cd
14 changed files with 93 additions and 17 deletions

View File

@@ -11,6 +11,16 @@ Feature: `sh' task action
When I successfully execute the recipe on remote target
Then the output must contain exactly "hello from remote\n"
Scenario: forwards error ouput
Given a recipe with:
"""
task :sh_action do
sh '\echo error from remote >&2'
end
"""
When I successfully execute the recipe on remote target
Then the error output must contain exactly "error from remote\n"
Scenario: aborts on failed command execution
Given a recipe with:
"""

View File

@@ -21,3 +21,7 @@ end
Then /^the output must contain exactly:$/ do |content|
assert_exact_output content, all_output
end
Then /^the error output must contain exactly "([^"]+)"$/ do |content|
assert_exact_output content, all_stderr
end