summaryrefslogtreecommitdiffstats
path: root/spec/unit/ssl
diff options
context:
space:
mode:
authorNick Lewis <nick@puppetlabs.com>2011-07-21 11:38:51 -0700
committerNick Lewis <nick@puppetlabs.com>2011-07-21 20:10:10 -0700
commitfac867c7bdbfbd431b089eb1bfb6eb73230e912c (patch)
tree857c2b3f38c97aa5871b026a52964acd72b9e9c1 /spec/unit/ssl
parent93299e90e231bb407923e3534a0e33d841b95355 (diff)
downloadpuppet-fac867c7bdbfbd431b089eb1bfb6eb73230e912c.tar.gz
puppet-fac867c7bdbfbd431b089eb1bfb6eb73230e912c.tar.xz
puppet-fac867c7bdbfbd431b089eb1bfb6eb73230e912c.zip
Remove Util::Cacher usage from SSL::CertificateAuthority
Allowing the singleton_instance value to be expirable is unnecessary, because there will never be a need for a different CA instance in the lifetime of a master. Additionally, the master never expired its cache anyway. This was only using the cacher so it could be expired for tests, so it can safely be removed. Reviewed-By: Jacob Helwig <jacob@puppetlabs.com>
Diffstat (limited to 'spec/unit/ssl')
-rwxr-xr-xspec/unit/ssl/certificate_authority_spec.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/unit/ssl/certificate_authority_spec.rb b/spec/unit/ssl/certificate_authority_spec.rb
index 3aedfdc25..3c5780a43 100755
--- a/spec/unit/ssl/certificate_authority_spec.rb
+++ b/spec/unit/ssl/certificate_authority_spec.rb
@@ -5,7 +5,7 @@ require 'puppet/ssl/certificate_authority'
describe Puppet::SSL::CertificateAuthority do
after do
- Puppet::Util::Cacher.expire
+ Puppet::SSL::CertificateAuthority.instance_variable_set(:@singleton_instance, nil)
Puppet.settings.clearused
end
@@ -25,7 +25,7 @@ describe Puppet::SSL::CertificateAuthority do
describe "when finding an existing instance" do
describe "and the host is a CA host and the run_mode is master" do
before do
- Puppet.settings.stubs(:value).with(:ca).returns true
+ Puppet[:ca] = true
Puppet.run_mode.stubs(:master?).returns true
@ca = mock('ca')