summaryrefslogtreecommitdiffstats
path: root/spec/unit/network
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2008-02-25 18:28:26 -0500
committerLuke Kanies <luke@madstop.com>2008-02-25 18:28:26 -0500
commit9d2f45df3d951ef59a44a7fb81a38586f04884b4 (patch)
tree0c97adcca32ba9ad2e20b2457f3db0c4b91f8376 /spec/unit/network
parent0afea69c06742eff1e8d8bd7df13c9c0e4c397c0 (diff)
parent04892ee723d1a687c83eb6c99b5c6a6c76bbcbc9 (diff)
Merge branch '0.24.x'
Diffstat (limited to 'spec/unit/network')
-rwxr-xr-xspec/unit/network/http_pool.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/unit/network/http_pool.rb b/spec/unit/network/http_pool.rb
index 49da7d8f3..503440274 100755
--- a/spec/unit/network/http_pool.rb
+++ b/spec/unit/network/http_pool.rb
@@ -19,6 +19,7 @@ describe Puppet::Network::HttpPool, " when adding certificate information to htt
it "should add a certificate store" do
Puppet::Network::HttpPool.stubs(:read_cert).returns(true)
+ Puppet::Network::HttpPool.stubs(:key).returns(:mykey)
store = stub "store"
OpenSSL::X509::Store.expects(:new).returns(store)
store.stubs(:add_file)
@@ -47,6 +48,7 @@ describe Puppet::Network::HttpPool, " when adding certificate information to htt
it "should set the purpose of the cert store to OpenSSL::X509::PURPOSE_SSL_CLIENT" do
Puppet::Network::HttpPool.stubs(:read_cert).returns(true)
+ Puppet::Network::HttpPool.stubs(:key).returns(:mykey)
store = stub "store"
OpenSSL::X509::Store.expects(:new).returns(store)
store.stubs(:add_file)
@@ -60,6 +62,7 @@ describe Puppet::Network::HttpPool, " when adding certificate information to htt
it "should add the client certificate" do
Puppet::Network::HttpPool.stubs(:read_cert).returns(true)
Puppet::Network::HttpPool.stubs(:cert).returns(:mycert)
+ Puppet::Network::HttpPool.stubs(:key).returns(:mykey)
[:cert_store=, :verify_mode=, :ca_file=, :key=].each { |method| @http.stubs(method) }
@http.expects(:cert=).with(:mycert)
@@ -79,6 +82,7 @@ describe Puppet::Network::HttpPool, " when adding certificate information to htt
it "should set the verify mode to OpenSSL::SSL::VERIFY_PEER" do
Puppet::Network::HttpPool.stubs(:read_cert).returns(true)
+ Puppet::Network::HttpPool.stubs(:key).returns(:mykey)
[:key=, :cert=, :cert_store=, :ca_file=].each { |method| @http.stubs(method) }
@http.expects(:verify_mode=).with(OpenSSL::SSL::VERIFY_PEER)