diff options
author | John A. Barbuto <jbarbuto@corp.sourceforge.com> | 2009-08-21 20:18:32 -0700 |
---|---|---|
committer | John A. Barbuto <jbarbuto@corp.sourceforge.com> | 2009-08-21 20:18:32 -0700 |
commit | a4f68969c04bc19b3382a9d068dee6721caec1c7 (patch) | |
tree | 79f5c87fa32d5547491e6b2db233e779f0e19854 /spec | |
parent | e408d6c7d562f126df97cd57e04fd7802bc53390 (diff) | |
download | puppet-a4f68969c04bc19b3382a9d068dee6721caec1c7.tar.gz puppet-a4f68969c04bc19b3382a9d068dee6721caec1c7.tar.xz puppet-a4f68969c04bc19b3382a9d068dee6721caec1c7.zip |
Fixed #2562 - Recognize the usecacheonfailure option again
Signed-off-by: John A. Barbuto <jbarbuto@corp.sourceforge.com>
Diffstat (limited to 'spec')
-rwxr-xr-x | spec/unit/configurer.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/unit/configurer.rb b/spec/unit/configurer.rb index 85bdb9dac..0490967ba 100755 --- a/spec/unit/configurer.rb +++ b/spec/unit/configurer.rb @@ -137,6 +137,16 @@ describe Puppet::Configurer, "when retrieving a catalog" do @agent.retrieve_catalog.should == @catalog end + it "should log and return nil if no catalog can be retrieved from the server and :usecacheonfailure is disabled" do + Puppet.stubs(:[]) + Puppet.expects(:[]).with(:usecacheonfailure).returns false + Puppet::Resource::Catalog.expects(:find).with { |name, options| options[:ignore_cache] == true }.returns nil + + Puppet.expects(:warning) + + @agent.retrieve_catalog.should be_nil + end + it "should return nil if no cached catalog is available and 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 nil |