Get tests passing for GH-508
This commit is contained in:
parent
f6055f8711
commit
c2ef1329aa
|
@ -11,6 +11,7 @@
|
|||
- Chef provisioners no longer depend on a "v-root" share being
|
||||
available. [GH-556]
|
||||
- NFS should work for FreeBSD hosts now. [GH-510]
|
||||
- SSH executed methods respect `config.ssh.max_tries`. [GH-508]
|
||||
|
||||
## 0.8.7 (September 13, 2011)
|
||||
|
||||
|
|
|
@ -10,8 +10,8 @@ class SshSessionTest < Test::Unit::TestCase
|
|||
end
|
||||
|
||||
context "exec!" do
|
||||
should "retry 5 times" do
|
||||
@session.expects(:open_channel).times(5).raises(IOError)
|
||||
should "retry max_tries times" do
|
||||
@session.expects(:open_channel).times(@env.config.ssh.max_tries).raises(IOError)
|
||||
assert_raises(IOError) {
|
||||
@instance.exec!("foo")
|
||||
}
|
||||
|
|
|
@ -197,7 +197,7 @@ class SshTest < Test::Unit::TestCase
|
|||
end
|
||||
|
||||
should "return false if the connection is refused" do
|
||||
Net::SSH.expects(:start).times(5).raises(Errno::ECONNREFUSED)
|
||||
Net::SSH.expects(:start).times(@env.config.ssh.max_tries).raises(Errno::ECONNREFUSED)
|
||||
assert_nothing_raised {
|
||||
assert !@ssh.up?
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue