From 6efe4000dda3379e867786a9c2d4ae0f0cdfc3be Mon Sep 17 00:00:00 2001 From: Luke Kanies Date: Tue, 13 May 2008 16:00:58 -0500 Subject: Using the new Cacher class for handling cached data. This provides a single, global bit for determining whether a given piece of cached data is still valid. --- spec/unit/node/catalog.rb | 5 ++--- spec/unit/node/facts.rb | 8 ++------ 2 files changed, 4 insertions(+), 9 deletions(-) (limited to 'spec/unit/node') diff --git a/spec/unit/node/catalog.rb b/spec/unit/node/catalog.rb index f397b8706..59c70b45e 100755 --- a/spec/unit/node/catalog.rb +++ b/spec/unit/node/catalog.rb @@ -797,7 +797,7 @@ describe Puppet::Node::Catalog, " when indirecting" do before do @indirection = stub 'indirection', :name => :catalog - Puppet::Indirector::Indirection.clear_cache + Puppet::Util::Cacher.invalidate end it "should redirect to the indirection for retrieval" do @@ -811,8 +811,7 @@ describe Puppet::Node::Catalog, " when indirecting" do end after do - mocha_verify - Puppet::Indirector::Indirection.clear_cache + Puppet::Util::Cacher.invalidate end end diff --git a/spec/unit/node/facts.rb b/spec/unit/node/facts.rb index 1bfccd32e..69b8e4483 100755 --- a/spec/unit/node/facts.rb +++ b/spec/unit/node/facts.rb @@ -10,7 +10,8 @@ describe Puppet::Node::Facts, " when indirecting" do # We have to clear the cache so that the facts ask for our indirection stub, # instead of anything that might be cached. - Puppet::Indirector::Indirection.clear_cache + Puppet::Util::Cacher.invalidate + @facts = Puppet::Node::Facts.new("me", "one" => "two") end @@ -29,11 +30,6 @@ describe Puppet::Node::Facts, " when indirecting" do it "should default to the 'facter' terminus" do Puppet::Node::Facts.indirection.terminus_class.should == :facter end - - after do - mocha_verify - Puppet::Indirector::Indirection.clear_cache - end end describe Puppet::Node::Facts, " when storing and retrieving" do -- cgit