summaryrefslogtreecommitdiffstats
path: root/spec/unit/network/http/webrick.rb
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2008-05-05 22:36:59 -0500
committerLuke Kanies <luke@madstop.com>2008-05-05 22:36:59 -0500
commit38e2dcf35a1d9b19970d1fb253f6c09b0529e083 (patch)
treed4e28bf2ebc43b73bfd36bfb72bf5b5da53e6ee7 /spec/unit/network/http/webrick.rb
parent6e0d6ddf5ef1cd6b23a672020bb657744b5a2c59 (diff)
downloadpuppet-38e2dcf35a1d9b19970d1fb253f6c09b0529e083.tar.gz
puppet-38e2dcf35a1d9b19970d1fb253f6c09b0529e083.tar.xz
puppet-38e2dcf35a1d9b19970d1fb253f6c09b0529e083.zip
The master is now functionally serving REST and xmlrpc.
...as far as I can tell. The client, however, is broken, since it used the old http_pool/ssl_support stuff, which no longer works. I have to port puppetd over to using the new ssl stuff, then I'll at least be able to verify that the master can still speak xmlrpc.
Diffstat (limited to 'spec/unit/network/http/webrick.rb')
-rw-r--r--spec/unit/network/http/webrick.rb12
1 files changed, 3 insertions, 9 deletions
diff --git a/spec/unit/network/http/webrick.rb b/spec/unit/network/http/webrick.rb
index 6bd3c2785..58b0d9a3d 100644
--- a/spec/unit/network/http/webrick.rb
+++ b/spec/unit/network/http/webrick.rb
@@ -303,25 +303,19 @@ describe Puppet::Network::HTTP::WEBrick do
it "should use the key from an SSL::Host instance created with the default name" do
Puppet::SSL::Host.expects(:new).returns @host
- @host.expects(:key).returns "mykey"
+ @host.expects(:key).returns @key
@server.setup_ssl[:SSLPrivateKey].should == "mykey"
end
- it "should generate a key if no key can be found" do
- @host.expects(:key).times(2).returns(nil).then.returns(@key)
+ it "should generate its files if no certificate can be found" do
+ @host.expects(:certificate).times(2).returns(nil).then.returns(@cert)
@host.expects(:generate)
@server.setup_ssl
end
- it "should fail if no certificate can be found" do
- @host.expects(:certificate).returns nil
-
- lambda { @server.setup_ssl }.should raise_error(Puppet::Error)
- end
-
it "should configure the certificate" do
@server.setup_ssl[:SSLCertificate].should == "mycert"
end