diff options
author | Rein Henrichs <rein@puppetlabs.com> | 2010-08-04 11:55:23 -0700 |
---|---|---|
committer | Markus Roberts <Markus@reality.com> | 2010-08-04 17:49:09 -0700 |
commit | 6aac8f0185db1d153583230de726c30ce949fc78 (patch) | |
tree | 4e90b6b96f6c137cc7ddfcb2319061e569574055 /spec | |
parent | 1cba9a7a713261fd62ceec440a3e57667eb103ba (diff) | |
download | puppet-6aac8f0185db1d153583230de726c30ce949fc78.tar.gz puppet-6aac8f0185db1d153583230de726c30ce949fc78.tar.xz puppet-6aac8f0185db1d153583230de726c30ce949fc78.zip |
[#4467] Make Puppet Master respect facts_terminus settings
* Remove hard-coded facts terminus in master
* Change facts_terminus default to 'yaml' for master and 'facter' for
everything else.
Paired-with: Matt Robinson <matt@puppetlabs.com>
Signed-off-by: Rein Henrichs <rein@puppetlabs.com>
Diffstat (limited to 'spec')
-rwxr-xr-x | spec/unit/indirector/node/ldap_spec.rb | 4 | ||||
-rwxr-xr-x | spec/unit/node/facts_spec.rb | 15 |
2 files changed, 13 insertions, 6 deletions
diff --git a/spec/unit/indirector/node/ldap_spec.rb b/spec/unit/indirector/node/ldap_spec.rb index f9c5efa07..a5f14fc23 100755 --- a/spec/unit/indirector/node/ldap_spec.rb +++ b/spec/unit/indirector/node/ldap_spec.rb @@ -5,10 +5,6 @@ require File.dirname(__FILE__) + '/../../../spec_helper' require 'puppet/indirector/node/ldap' describe Puppet::Node::Ldap do - before do - Puppet::Node::Facts.stubs(:terminus_class).returns :yaml - end - describe "when searching for a single node" do before :each do @searcher = Puppet::Node::Ldap.new diff --git a/spec/unit/node/facts_spec.rb b/spec/unit/node/facts_spec.rb index a2f4ab9f0..394db7913 100755 --- a/spec/unit/node/facts_spec.rb +++ b/spec/unit/node/facts_spec.rb @@ -88,9 +88,20 @@ describe Puppet::Node::Facts, "when indirecting" do @facts.save end - it "should default to the 'facter' terminus" do - Puppet::Node::Facts.indirection.terminus_class.should == :facter + describe "when the Puppet application is 'master'" do + it "should default to the 'yaml' terminus" do + pending "Cannot test the behavior of defaults in defaults.rb" + # Puppet::Node::Facts.indirection.terminus_class.should == :yaml + end end + + describe "when the Puppet application is not 'master'" do + it "should default to the 'facter' terminus" do + pending "Cannot test the behavior of defaults in defaults.rb" + # Puppet::Node::Facts.indirection.terminus_class.should == :facter + end + end + end describe "when storing and retrieving" do |