summaryrefslogtreecommitdiffstats
path: root/spec/integration
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2008-04-10 14:44:14 -0500
committerLuke Kanies <luke@madstop.com>2008-04-10 14:44:14 -0500
commit738889ba027b894867209d5175c716f9a2cc54c6 (patch)
tree77e46799379d1d5654b24b0dfefdcaff2482491d /spec/integration
parentf285f1aab525a2585532fda0b15b7fd28e994491 (diff)
downloadpuppet-738889ba027b894867209d5175c716f9a2cc54c6.tar.gz
puppet-738889ba027b894867209d5175c716f9a2cc54c6.tar.xz
puppet-738889ba027b894867209d5175c716f9a2cc54c6.zip
Fixing the expire method (it wasn't using a request
internally), and fixing the Facts class so it auto-expires any associated cached nodes when facts are saved.
Diffstat (limited to 'spec/integration')
-rwxr-xr-xspec/integration/node/facts.rb9
1 files changed, 8 insertions, 1 deletions
diff --git a/spec/integration/node/facts.rb b/spec/integration/node/facts.rb
index d065918be..c2f876578 100755
--- a/spec/integration/node/facts.rb
+++ b/spec/integration/node/facts.rb
@@ -10,7 +10,14 @@ describe Puppet::Node::Facts do
after { Puppet::Node::Facts.indirection.clear_cache }
it "should expire any cached node instances when it is saved" do
- raise "This test fails"
+ Puppet::Node::Facts.indirection.stubs(:terminus_class).returns :yaml
+ terminus = Puppet::Node::Facts.indirection.terminus(:yaml)
+
+ terminus.expects(:save)
+ Puppet::Node.expects(:expire).with("me")
+
+ facts = Puppet::Node::Facts.new("me")
+ facts.save
end
it "should be able to delegate to the :yaml terminus" do