summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/puppet/configurer.rb1
-rwxr-xr-xspec/unit/configurer.rb4
2 files changed, 4 insertions, 1 deletions
diff --git a/lib/puppet/configurer.rb b/lib/puppet/configurer.rb
index d9f207143..7db9972dd 100644
--- a/lib/puppet/configurer.rb
+++ b/lib/puppet/configurer.rb
@@ -103,6 +103,7 @@ class Puppet::Configurer
duration = thinmark do
result = catalog_class.find(name, fact_options.merge(:ignore_terminus => true))
end
+ Puppet.notice "Using cached catalog"
rescue => detail
puts detail.backtrace if Puppet[:trace]
Puppet.err "Could not retrieve catalog from cache: %s" % detail
diff --git a/spec/unit/configurer.rb b/spec/unit/configurer.rb
index fcc124d8e..c27445a64 100755
--- a/spec/unit/configurer.rb
+++ b/spec/unit/configurer.rb
@@ -105,10 +105,12 @@ describe Puppet::Configurer, "when retrieving a catalog" do
@agent.retrieve_catalog.should == @catalog
end
- it "should return the cached catalog when no catalog can be retrieved from the server" do
+ it "should log and return the cached catalog when no catalog can be retrieved from the server" do
Puppet::Resource::Catalog.expects(:find).with { |name, options| options[:ignore_cache] == true }.returns nil
Puppet::Resource::Catalog.expects(:find).with { |name, options| options[:ignore_terminus] == true }.returns @catalog
+ Puppet.expects(:notice)
+
@agent.retrieve_catalog.should == @catalog
end