Revision 442e2bda
Added by Alyssa Hardy about 10 years ago
test/puppetssh_test.rb | ||
---|---|---|
@puppetssh.stubs(:which).with("sudo", anything).returns("/usr/bin/sudo")
|
||
@puppetssh.stubs(:which).with("ssh", anything).returns("/usr/bin/ssh")
|
||
|
||
@puppetssh.expects(:shell_command).with(["/usr/bin/ssh", "-i /root/.ssh/id_rsa", "host1", "/bin/true"], false).returns(true)
|
||
@puppetssh.expects(:shell_command).with(["/usr/bin/ssh", "-i /root/.ssh/id_rsa", "host2", "/bin/true"], false).returns(true)
|
||
@puppetssh.expects(:shell_command).with(["/usr/bin/ssh", "-i", "/root/.ssh/id_rsa", "host1", "/bin/true"], false).returns(true)
|
||
@puppetssh.expects(:shell_command).with(["/usr/bin/ssh", "-i", "/root/.ssh/id_rsa", "host2", "/bin/true"], false).returns(true)
|
||
assert @puppetssh.run
|
||
end
|
||
|
||
... | ... | |
@puppetssh.stubs(:which).with("sudo", anything).returns("/usr/bin/sudo")
|
||
@puppetssh.stubs(:which).with("ssh", anything).returns("/usr/bin/ssh")
|
||
|
||
@puppetssh.expects(:shell_command).with(["/usr/bin/ssh", "-l root", "host1", "/bin/true"], false).returns(true)
|
||
@puppetssh.expects(:shell_command).with(["/usr/bin/ssh", "-l root", "host2", "/bin/true"], false).returns(true)
|
||
@puppetssh.expects(:shell_command).with(["/usr/bin/ssh", "-l", "root", "host1", "/bin/true"], false).returns(true)
|
||
@puppetssh.expects(:shell_command).with(["/usr/bin/ssh", "-l", "root", "host2", "/bin/true"], false).returns(true)
|
||
assert @puppetssh.run
|
||
end
|
||
|
Also available in: Unified diff
fixes #5561 pass arguments correctly in run puppet over ssh