diff options
author | Julian C. Dunn <jdunn@chef.io> | 2015-07-13 23:04:07 -0400 |
---|---|---|
committer | Julian C. Dunn <jdunn@chef.io> | 2015-07-13 23:04:07 -0400 |
commit | 81b2c2981c51ccb53c1f4dd537a6ec7d2cba443a (patch) | |
tree | b1fc59167e0b6b94e9becc6842b058438f219f22 /spec | |
parent | 42e56d3243c5aeb328d8976255b2174834805af6 (diff) | |
download | chef-81b2c2981c51ccb53c1f4dd537a6ec7d2cba443a.tar.gz |
Update test.
Diffstat (limited to 'spec')
-rw-r--r-- | spec/unit/knife/ssl_check_spec.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/unit/knife/ssl_check_spec.rb b/spec/unit/knife/ssl_check_spec.rb index 8eda555108..fd46c47d99 100644 --- a/spec/unit/knife/ssl_check_spec.rb +++ b/spec/unit/knife/ssl_check_spec.rb @@ -163,6 +163,7 @@ E expect(ssl_check).to receive(:verify_X509).and_return(true) # X509 valid certs (no warn) expect(ssl_socket).to receive(:connect) # no error expect(ssl_socket).to receive(:post_connection_check).with("foo.example.com") # no error + expect(ssl_socket).to receive(:hostname=).with("foo.example.com") # no error end it "prints a success message" do @@ -197,6 +198,7 @@ E expect(ssl_socket).to receive(:post_connection_check). with("foo.example.com"). and_raise(OpenSSL::SSL::SSLError) + expect(ssl_socket).to receive(:hostname=).with("foo.example.com") # no error expect(ssl_socket_for_debug).to receive(:connect) expect(ssl_socket_for_debug).to receive(:peer_cert).and_return(self_signed_crt) end @@ -215,6 +217,8 @@ E expect(ssl_check).to receive(:verify_X509).and_return(true) # X509 valid certs expect(ssl_socket).to receive(:connect). and_raise(OpenSSL::SSL::SSLError) + expect(ssl_socket).to receive(:hostname=). + with("foo.example.com") # no error expect(ssl_socket_for_debug).to receive(:connect) expect(ssl_socket_for_debug).to receive(:peer_cert).and_return(self_signed_crt) end |