diff options
| author | Luke Kanies <luke@madstop.com> | 2008-05-13 16:00:58 -0500 |
|---|---|---|
| committer | Luke Kanies <luke@madstop.com> | 2008-05-13 16:00:58 -0500 |
| commit | 6efe4000dda3379e867786a9c2d4ae0f0cdfc3be (patch) | |
| tree | a16fd1ae1f4aab7fe04af88daa78f1be1a2b1f3e /spec/integration/node | |
| parent | 68d8d0ae0686939d94dae8ccc70e5582187335dc (diff) | |
| download | puppet-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/integration/node')
| -rwxr-xr-x | spec/integration/node/catalog.rb | 2 | ||||
| -rwxr-xr-x | spec/integration/node/facts.rb | 6 |
2 files changed, 5 insertions, 3 deletions
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") |
