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/integration/node/catalog.rb | 2 +- spec/integration/node/facts.rb | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'spec/integration/node') diff --git a/spec/integration/node/catalog.rb b/spec/integration/node/catalog.rb index ca14c2ea8..b0e651511 100755 --- a/spec/integration/node/catalog.rb +++ b/spec/integration/node/catalog.rb @@ -7,7 +7,7 @@ require File.dirname(__FILE__) + '/../../spec_helper' describe Puppet::Node::Catalog do describe "when using the indirector" do - after { Puppet::Node::Catalog.indirection.clear_cache } + after { Puppet::Util::Cacher.invalidate } it "should be able to delegate to the :yaml terminus" do Puppet::Node::Catalog.indirection.stubs(:terminus_class).returns :yaml diff --git a/spec/integration/node/facts.rb b/spec/integration/node/facts.rb index c2f876578..cef3d79d4 100755 --- a/spec/integration/node/facts.rb +++ b/spec/integration/node/facts.rb @@ -7,13 +7,15 @@ require File.dirname(__FILE__) + '/../../spec_helper' describe Puppet::Node::Facts do describe "when using the indirector" do - after { Puppet::Node::Facts.indirection.clear_cache } + after { Puppet::Util::Cacher.invalidate } it "should expire any cached node instances when it is saved" do Puppet::Node::Facts.indirection.stubs(:terminus_class).returns :yaml + + Puppet::Node::Facts.indirection.terminus(:yaml).should equal(Puppet::Node::Facts.indirection.terminus(:yaml)) terminus = Puppet::Node::Facts.indirection.terminus(:yaml) + terminus.stubs :save - terminus.expects(:save) Puppet::Node.expects(:expire).with("me") facts = Puppet::Node::Facts.new("me") -- cgit