Skip to content

Commit

Permalink
adept integration test to changes in command_wrapper
Browse files Browse the repository at this point in the history
command_wrapper tries to verify the connection (which includes sudo)
using a call to "echo". If this fails, it'll raise an error. This change
is now reflected in the test.

fixes #34.
  • Loading branch information
srenatus authored and chris-rock committed Dec 7, 2015
1 parent 66c92f0 commit 93b158c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/integration/sudo/passwd.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
end

it 'is not running sudo without password' do
run_as('whoami', { sudo: true })
.exit_status.wont_equal 0
err = ->{Train.create('local', { sudo: true }).connection}.must_raise Train::UserError
err.message.must_match /Sudo requires a password/
end

it 'is running passwd sudo' do
Expand Down

0 comments on commit 93b158c

Please sign in to comment.