summaryrefslogtreecommitdiffstats
path: root/spec/unit/node
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2008-05-13 16:00:58 -0500
committerLuke Kanies <luke@madstop.com>2008-05-13 16:00:58 -0500
commit6efe4000dda3379e867786a9c2d4ae0f0cdfc3be (patch)
treea16fd1ae1f4aab7fe04af88daa78f1be1a2b1f3e /spec/unit/node
parent68d8d0ae0686939d94dae8ccc70e5582187335dc (diff)
downloadpuppet-6efe4000dda3379e867786a9c2d4ae0f0cdfc3be.tar.gz
puppet-6efe4000dda3379e867786a9c2d4ae0f0cdfc3be.tar.xz
puppet-6efe4000dda3379e867786a9c2d4ae0f0cdfc3be.zip
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.
Diffstat (limited to 'spec/unit/node')
-rwxr-xr-xspec/unit/node/catalog.rb5
-rwxr-xr-xspec/unit/node/facts.rb8
2 files changed, 4 insertions, 9 deletions
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