diff options
author | Luke Kanies <luke@madstop.com> | 2008-02-21 23:57:46 -0500 |
---|---|---|
committer | Luke Kanies <luke@madstop.com> | 2008-02-21 23:57:46 -0500 |
commit | 279a0c56acc3085a30e928d8181bc985aa1ea825 (patch) | |
tree | 0f7244ca7386b611cac55968718fc8e62e05d503 | |
parent | 098a69c0e75f469e72d32a293276fbea744e9a24 (diff) | |
download | puppet-279a0c56acc3085a30e928d8181bc985aa1ea825.tar.gz puppet-279a0c56acc3085a30e928d8181bc985aa1ea825.tar.xz puppet-279a0c56acc3085a30e928d8181bc985aa1ea825.zip |
Fixing a test that was actually reading in keys
from the filesystem and failed when those keys
were unreadable.
-rwxr-xr-x | spec/unit/network/http_pool.rb | 4 |
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) |