diff options
| author | Luke Kanies <luke@madstop.com> | 2008-11-11 13:12:21 -0800 |
|---|---|---|
| committer | Luke Kanies <luke@madstop.com> | 2008-11-11 13:12:21 -0800 |
| commit | 0ecbf79faf8e69efda96f8611837cd1c395f7a7c (patch) | |
| tree | 4fe918d384da032b797986c49f008548ce4e4795 /spec/unit/node | |
| parent | 29b97943e7efaad3cb3f8e7b82004c067d3fbf82 (diff) | |
| download | puppet-0ecbf79faf8e69efda96f8611837cd1c395f7a7c.tar.gz puppet-0ecbf79faf8e69efda96f8611837cd1c395f7a7c.tar.xz puppet-0ecbf79faf8e69efda96f8611837cd1c395f7a7c.zip | |
Adding cached attribute support to resources.
The Catalog is the expirer, which means that a resource
with no catalog will not cache data.
Also switching files to use a cached attribute for its stat.
And modifying catalogs to expire data at the end of every
transaction.
Signed-off-by: Luke Kanies <luke@madstop.com>
Diffstat (limited to 'spec/unit/node')
| -rwxr-xr-x | spec/unit/node/catalog.rb | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/spec/unit/node/catalog.rb b/spec/unit/node/catalog.rb index 28d66644a..3c4da5908 100755 --- a/spec/unit/node/catalog.rb +++ b/spec/unit/node/catalog.rb @@ -611,8 +611,11 @@ describe Puppet::Node::Catalog do @transaction.stubs(:addtimes) end - describe "when applying" do + it "should be an Expirer" do + Puppet::Node::Catalog.ancestors.should be_include(Puppet::Util::Cacher::Expirer) + end + describe "when applying" do it "should create and evaluate a transaction" do @transaction.expects(:evaluate) @catalog.apply @@ -685,6 +688,11 @@ describe Puppet::Node::Catalog do end @catalog.resource("File[/yay]").should be_nil end + + it "should expire cached data in the resources" do + @catalog.expects(:expire) + @catalog.apply + end end describe "when applying host catalogs" do |
