diff options
author | Nick Lewis <nick@puppetlabs.com> | 2011-07-21 11:52:00 -0700 |
---|---|---|
committer | Jacob Helwig <jacob@puppetlabs.com> | 2011-08-19 13:52:56 -0700 |
commit | 7c4dbeb24fcfac432ac9540bd4e92ba84d187472 (patch) | |
tree | 90011312bed15323412dde3d79a216baf82d07c9 /spec | |
parent | d6e0b71f141300da5241b6a0daf6afbc3eaa29e0 (diff) | |
download | puppet-7c4dbeb24fcfac432ac9540bd4e92ba84d187472.tar.gz puppet-7c4dbeb24fcfac432ac9540bd4e92ba84d187472.tar.xz puppet-7c4dbeb24fcfac432ac9540bd4e92ba84d187472.zip |
Remove Puppet::Util::Cacher use from Puppet::Indirector::Indirection
Previously, indirections were storing their termini in a cached_attr, so that
they could be easily cleared for tests. Because this provides no value outside
of testing, we instead simply create an attr_reader for termini, and expire
them manually in tests.
Reviewed-By: Jacob Helwig <jacob@puppetlabs.com>
(cherry picked from commit e74090468192697a6a2447dc6fcece3dd09a46f1)
Diffstat (limited to 'spec')
-rwxr-xr-x | spec/integration/ssl/certificate_request_spec.rb | 6 | ||||
-rwxr-xr-x | spec/integration/ssl/certificate_revocation_list_spec.rb | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/spec/integration/ssl/certificate_request_spec.rb b/spec/integration/ssl/certificate_request_spec.rb index 9feeac698..a95b17a2b 100755 --- a/spec/integration/ssl/certificate_request_spec.rb +++ b/spec/integration/ssl/certificate_request_spec.rb @@ -24,14 +24,14 @@ describe Puppet::SSL::CertificateRequest, :fails_on_windows => true do @csr = Puppet::SSL::CertificateRequest.new("luke.madstop.com") @key = OpenSSL::PKey::RSA.new(512) + + # This is necessary so the terminus instances don't lie around. + Puppet::SSL::CertificateRequest.indirection.termini.clear end after do system("rm -rf #{@dir}") Puppet.settings.clear - - # This is necessary so the terminus instances don't lie around. - Puppet::Util::Cacher.expire end it "should be able to generate CSRs" do diff --git a/spec/integration/ssl/certificate_revocation_list_spec.rb b/spec/integration/ssl/certificate_revocation_list_spec.rb index aab609156..30e9114df 100755 --- a/spec/integration/ssl/certificate_revocation_list_spec.rb +++ b/spec/integration/ssl/certificate_revocation_list_spec.rb @@ -25,7 +25,7 @@ describe Puppet::SSL::CertificateRevocationList, :fails_on_windows => true do Puppet.settings.clear # This is necessary so the terminus instances don't lie around. - Puppet::Util::Cacher.expire + Puppet::SSL::Host.indirection.termini.clear } it "should be able to read in written out CRLs with no revoked certificates" do |