summaryrefslogtreecommitdiffstats
path: root/spec/unit/resource
diff options
context:
space:
mode:
authorNick Lewis <nick@puppetlabs.com>2011-07-21 11:47:07 -0700
committerNick Lewis <nick@puppetlabs.com>2011-07-21 20:10:18 -0700
commite2ea023f809c2bdc53b5259047c28f8061f57e54 (patch)
tree95d2e13dc944864dd20729c53682cc052d96d160 /spec/unit/resource
parent4b0c847f19d5db81758b5561bdc8196591209ef0 (diff)
downloadpuppet-e2ea023f809c2bdc53b5259047c28f8061f57e54.tar.gz
puppet-e2ea023f809c2bdc53b5259047c28f8061f57e54.tar.xz
puppet-e2ea023f809c2bdc53b5259047c28f8061f57e54.zip
Remove caching from the catalog, types, and parameters
Types and parameters were registering their catalog as their expirer, so that the catalog could expire them between uses. However, because catalogs are never reused (and neither are types or parameters), there is no need to expire anything. Thus, we remove the entire cleanup/expire logic from catalog, type, and parameter. Reviewed-By: Jacob Helwig <jacob@puppetlabs.com>
Diffstat (limited to 'spec/unit/resource')
-rwxr-xr-xspec/unit/resource/catalog_spec.rb25
1 files changed, 0 insertions, 25 deletions
diff --git a/spec/unit/resource/catalog_spec.rb b/spec/unit/resource/catalog_spec.rb
index 5b914dac3..c03f05dee 100755
--- a/spec/unit/resource/catalog_spec.rb
+++ b/spec/unit/resource/catalog_spec.rb
@@ -10,23 +10,6 @@ describe Puppet::Resource::Catalog, "when compiling" do
Puppet::Util::Storage.stubs(:store)
end
- it "should be an Expirer" do
- Puppet::Resource::Catalog.ancestors.should be_include(Puppet::Util::Cacher::Expirer)
- end
-
- it "should always be expired if it's not applying" do
- @catalog = Puppet::Resource::Catalog.new("host")
- @catalog.expects(:applying?).returns false
- @catalog.should be_dependent_data_expired(Time.now)
- end
-
- it "should not be expired if it's applying and the timestamp is late enough" do
- @catalog = Puppet::Resource::Catalog.new("host")
- @catalog.expire
- @catalog.expects(:applying?).returns true
- @catalog.should_not be_dependent_data_expired(Time.now)
- end
-
it "should be able to write its list of classes to the class file" do
@catalog = Puppet::Resource::Catalog.new("host")
@@ -644,11 +627,6 @@ describe Puppet::Resource::Catalog, "when compiling" do
@catalog.apply(:ignoreschedules => true)
end
- it "should expire cached data in the resources both before and after the transaction" do
- @catalog.expects(:expire).times(2)
- @catalog.apply
- end
-
describe "host catalogs" do
# super() doesn't work in the setup method for some reason
@@ -809,8 +787,6 @@ describe Puppet::Resource::Catalog, "when compiling" do
@real_indirection = Puppet::Resource::Catalog.indirection
@indirection = stub 'indirection', :name => :catalog
-
- Puppet::Util::Cacher.expire
end
it "should use the value of the 'catalog_terminus' setting to determine its terminus class" do
@@ -829,7 +805,6 @@ describe Puppet::Resource::Catalog, "when compiling" do
end
after do
- Puppet::Util::Cacher.expire
@real_indirection.reset_terminus_class
end
end