summaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2009-09-17 17:13:59 -0700
committerJames Turnbull <james@lovedthanlost.net>2009-11-20 07:24:51 +1100
commit28e1bc6e7b866727adfd16cba5418e08f1dd2fd8 (patch)
tree09d913f03257f4defbb873d189aa619df27c3455 /spec
parent2d4b795e81e4f7953210d51be56c77bed3b77609 (diff)
downloadpuppet-28e1bc6e7b866727adfd16cba5418e08f1dd2fd8.tar.gz
puppet-28e1bc6e7b866727adfd16cba5418e08f1dd2fd8.tar.xz
puppet-28e1bc6e7b866727adfd16cba5418e08f1dd2fd8.zip
Always using the CA_name constant instead of "ca"
Signed-off-by: Luke Kanies <luke@madstop.com>
Diffstat (limited to 'spec')
-rwxr-xr-xspec/integration/indirector/certificate_revocation_list/rest.rb2
-rwxr-xr-xspec/integration/ssl/host.rb2
-rwxr-xr-xspec/unit/ssl/host.rb10
3 files changed, 7 insertions, 7 deletions
diff --git a/spec/integration/indirector/certificate_revocation_list/rest.rb b/spec/integration/indirector/certificate_revocation_list/rest.rb
index f308543f0..1295dd22b 100755
--- a/spec/integration/indirector/certificate_revocation_list/rest.rb
+++ b/spec/integration/indirector/certificate_revocation_list/rest.rb
@@ -41,7 +41,7 @@ describe "Certificate REST Terminus" do
# Now remove the cached crl
Puppet::SSL::Host.ca_location = :none
- Puppet::SSL::CertificateRevocationList.destroy("ca")
+ Puppet::SSL::CertificateRevocationList.destroy(Puppet::SSL::CA_NAME)
# This is necessary so that we create the SSL store before we start
# using REST. This is necessary to prevent an infinite loop,
diff --git a/spec/integration/ssl/host.rb b/spec/integration/ssl/host.rb
index 5b01e9f7e..d5e1396c5 100755
--- a/spec/integration/ssl/host.rb
+++ b/spec/integration/ssl/host.rb
@@ -33,7 +33,7 @@ describe Puppet::SSL::Host do
}
it "should be considered a CA host if its name is equal to 'ca'" do
- Puppet::SSL::Host.new("ca").should be_ca
+ Puppet::SSL::Host.new(Puppet::SSL::CA_NAME).should be_ca
end
describe "when managing its key" do
diff --git a/spec/unit/ssl/host.rb b/spec/unit/ssl/host.rb
index 38a1f3ed9..51223e6d5 100755
--- a/spec/unit/ssl/host.rb
+++ b/spec/unit/ssl/host.rb
@@ -415,7 +415,7 @@ describe Puppet::SSL::Host do
end
it "should find the CA certificate if it does not have a certificate" do
- Puppet::SSL::Certificate.expects(:find).with("ca").returns mock("cacert")
+ Puppet::SSL::Certificate.expects(:find).with(Puppet::SSL::CA_NAME).returns mock("cacert")
Puppet::SSL::Certificate.stubs(:find).with("myname").returns @cert
@host.certificate
@@ -424,13 +424,13 @@ describe Puppet::SSL::Host do
it "should not find the CA certificate if it is the CA host" do
@host.expects(:ca?).returns true
Puppet::SSL::Certificate.stubs(:find)
- Puppet::SSL::Certificate.expects(:find).with("ca").never
+ Puppet::SSL::Certificate.expects(:find).with(Puppet::SSL::CA_NAME).never
@host.certificate
end
it "should return nil if it cannot find a CA certificate" do
- Puppet::SSL::Certificate.expects(:find).with("ca").returns nil
+ Puppet::SSL::Certificate.expects(:find).with(Puppet::SSL::CA_NAME).returns nil
Puppet::SSL::Certificate.expects(:find).with("myname").never
@host.certificate.should be_nil
@@ -453,7 +453,7 @@ describe Puppet::SSL::Host do
end
it "should find the certificate in the Certificate class and return the Puppet certificate instance" do
- Puppet::SSL::Certificate.expects(:find).with("ca").returns mock("cacert")
+ Puppet::SSL::Certificate.expects(:find).with(Puppet::SSL::CA_NAME).returns mock("cacert")
Puppet::SSL::Certificate.expects(:find).with("myname").returns @cert
@host.certificate.should equal(@cert)
@@ -468,7 +468,7 @@ describe Puppet::SSL::Host do
end
it "should return any previously found certificate" do
- Puppet::SSL::Certificate.expects(:find).with("ca").returns mock("cacert")
+ Puppet::SSL::Certificate.expects(:find).with(Puppet::SSL::CA_NAME).returns mock("cacert")
Puppet::SSL::Certificate.expects(:find).with("myname").returns(@cert).once
@host.certificate.should equal(@cert)