Previously it was not so clear that
Signed-off-by: Dan Bode <[email protected]>
Reviewed-by: Jeff McCune
---
spec/unit/puppet/cloudpack_spec.rb | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/spec/unit/puppet/cloudpack_spec.rb
b/spec/unit/puppet/cloudpack_spec.rb
index 107dd07..f33dc06 100644
--- a/spec/unit/puppet/cloudpack_spec.rb
+++ b/spec/unit/puppet/cloudpack_spec.rb
@@ -121,6 +121,8 @@ describe Puppet::CloudPack do
it 'should be tolerant of exceptions' do
Fog::SSH.expects(:new).with('server', 'root', {:key_data =>
['FOO']}).returns(@ssh_mock)
Fog::SCP.expects(:new).with('server', 'root', {:key_data =>
['FOO']}).returns(@scp_mock)
+ # this expectation varifies that it allows for failures on the first
try
+ # and does not raise exceptions when the second call does not fail
@ssh_mock.expects(:run).with do |var|
raise(Net::SSH::AuthenticationFailed, 'fails') end.with(['hostname'])
subject.ssh_connect('server', 'root', @keyfile.path)
end
--
1.7.5.4
--
You received this message because you are subscribed to the Google Groups
"Puppet Developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-dev?hl=en.