summaryrefslogtreecommitdiffstats
path: root/spec/integration
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2008-04-28 17:52:02 -0500
committerLuke Kanies <luke@madstop.com>2008-04-28 17:52:02 -0500
commit8c9b04d807b34ade704da3584b72d39bb129aa75 (patch)
treec76828f38c7c8d28f4b533d556e809d0bf3c1437 /spec/integration
parent83519f4e59f68f867f8ddbe141ac8bd9a6238ae1 (diff)
downloadpuppet-8c9b04d807b34ade704da3584b72d39bb129aa75.tar.gz
puppet-8c9b04d807b34ade704da3584b72d39bb129aa75.tar.xz
puppet-8c9b04d807b34ade704da3584b72d39bb129aa75.zip
I think I've now got the Webrick SSL support working.
Now I just need to get xmlrpc working alongside REST in both mongrel and webrick.
Diffstat (limited to 'spec/integration')
-rwxr-xr-xspec/integration/defaults.rb26
-rw-r--r--spec/integration/network/server/webrick.rb1
-rwxr-xr-xspec/integration/ssl/certificate_authority.rb13
3 files changed, 39 insertions, 1 deletions
diff --git a/spec/integration/defaults.rb b/spec/integration/defaults.rb
new file mode 100755
index 000000000..f6ef74715
--- /dev/null
+++ b/spec/integration/defaults.rb
@@ -0,0 +1,26 @@
+#!/usr/bin/env ruby
+
+require File.dirname(__FILE__) + '/../spec_helper'
+
+require 'puppet/defaults'
+
+describe "Puppet defaults" do
+ describe "when configuring the :crl" do
+ after { Puppet.settings.clear }
+
+ it "should have a :crl setting" do
+ Puppet.settings.should be_valid(:crl)
+ end
+
+ it "should warn if :cacrl is set to false" do
+ Puppet.expects(:warning)
+ Puppet.settings[:cacrl] = 'false'
+ end
+
+ it "should set :crl to 'false' if :cacrl is set to false" do
+ crl = Puppet.settings[:cacrl]
+ Puppet.settings[:cacrl] = 'false'
+ Puppet.settings[:crl].should == false
+ end
+ end
+end
diff --git a/spec/integration/network/server/webrick.rb b/spec/integration/network/server/webrick.rb
index bcfdc16ea..ee307bca3 100644
--- a/spec/integration/network/server/webrick.rb
+++ b/spec/integration/network/server/webrick.rb
@@ -7,6 +7,7 @@ describe Puppet::Network::Server do
describe "when using webrick" do
before :each do
Puppet[:servertype] = 'webrick'
+ Puppet[:hostcrl] = 'false'
@params = { :address => "127.0.0.1", :port => 34343, :handlers => [ :node ] }
# Get a safe temporary file
diff --git a/spec/integration/ssl/certificate_authority.rb b/spec/integration/ssl/certificate_authority.rb
index 51e4a0aef..f7eb0f46a 100755
--- a/spec/integration/ssl/certificate_authority.rb
+++ b/spec/integration/ssl/certificate_authority.rb
@@ -11,7 +11,7 @@ require 'tempfile'
describe Puppet::SSL::CertificateAuthority do
before do
# Get a safe temporary file
- file = Tempfile.new("host_integration_testing")
+ file = Tempfile.new("ca_integration_testing")
@dir = file.path
file.delete
@@ -60,6 +60,17 @@ describe Puppet::SSL::CertificateAuthority do
end
end
+ it "should not have a CRL when :crl is set to false" do
+ Puppet.settings[:crl] = false
+ @ca.crl.should be_nil
+ end
+
+ it "should have a CRL when :crl is set to true" do
+ Puppet.settings[:crl] = true
+ @ca.generate_ca_certificate
+ @ca.crl.should_not be_nil
+ end
+
describe "when signing certificates" do
before do
@host = Puppet::SSL::Host.new("luke.madstop.com")