summaryrefslogtreecommitdiffstats
path: root/spec/integration
diff options
context:
space:
mode:
authorNick Lewis <nick@puppetlabs.com>2011-06-08 18:47:44 -0700
committerNick Lewis <nick@puppetlabs.com>2011-06-08 18:47:44 -0700
commit649b3dc58349d3bbb1bd28bf882013c2cf5b8000 (patch)
tree1f047edff3c51258b3367a1d5c9f5cfbb02b4c71 /spec/integration
parente0573603c5780e79c2461ece604c6388e4222504 (diff)
parent8ccd00963d91f168438eaec4b29a18cd4a1ac583 (diff)
Merge branch '2.7.x'
Diffstat (limited to 'spec/integration')
-rwxr-xr-xspec/integration/defaults_spec.rb22
1 files changed, 22 insertions, 0 deletions
diff --git a/spec/integration/defaults_spec.rb b/spec/integration/defaults_spec.rb
index 8aa59288e..9bec769ab 100755
--- a/spec/integration/defaults_spec.rb
+++ b/spec/integration/defaults_spec.rb
@@ -22,6 +22,28 @@ describe "Puppet defaults" do
end
end
+ describe "when setting :node_name_value" do
+ it "should default to the value of :certname" do
+ Puppet.settings[:certname] = 'blargle'
+ Puppet.settings[:node_name_value].should == 'blargle'
+ end
+ end
+
+ describe "when setting the :node_name_fact" do
+ it "should fail when also setting :node_name_value" do
+ lambda do
+ Puppet.settings[:node_name_value] = "some value"
+ Puppet.settings[:node_name_fact] = "some_fact"
+ end.should raise_error("Cannot specify both the node_name_value and node_name_fact settings")
+ end
+
+ it "should not fail when using the default for :node_name_value" do
+ lambda do
+ Puppet.settings[:node_name_fact] = "some_fact"
+ end.should_not raise_error
+ end
+ end
+
describe "when configuring the :crl" do
it "should warn if :cacrl is set to false" do
Puppet.expects(:warning)