summaryrefslogtreecommitdiffstats
path: root/spec/integration/defaults.rb
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2008-11-03 21:39:58 -0600
committerLuke Kanies <luke@madstop.com>2008-11-03 21:39:58 -0600
commitcf3a11cb641c6317f61d0f596bc8a137aa4adbca (patch)
treef4d351ba745bee59d9e8107b4f74e5d8734e6408 /spec/integration/defaults.rb
parenta78c971829959d9d4b89aa841249fc973b8972b2 (diff)
downloadpuppet-cf3a11cb641c6317f61d0f596bc8a137aa4adbca.tar.gz
puppet-cf3a11cb641c6317f61d0f596bc8a137aa4adbca.tar.xz
puppet-cf3a11cb641c6317f61d0f596bc8a137aa4adbca.zip
Fixing :bindaddress setting to work with the new server subsystem.
It now automatically switches values depending on server type, while still allowing overriding. Signed-off-by: Luke Kanies <luke@madstop.com>
Diffstat (limited to 'spec/integration/defaults.rb')
-rwxr-xr-xspec/integration/defaults.rb20
1 files changed, 20 insertions, 0 deletions
diff --git a/spec/integration/defaults.rb b/spec/integration/defaults.rb
index fcf8ccf22..efe6db1d5 100755
--- a/spec/integration/defaults.rb
+++ b/spec/integration/defaults.rb
@@ -51,4 +51,24 @@ describe "Puppet defaults" do
it "should default to yaml as the catalog format" do
Puppet.settings[:catalog_format].should == "yaml"
end
+
+ it "should default to 0.0.0.0 for its bind address and 'webrick' for its server type" do
+ Puppet.settings[:servertype] = "webrick"
+ Puppet.settings[:bindaddress].should == "0.0.0.0"
+ end
+
+ it "should default to 0.0.0.0 for its bind address if the server is webrick" do
+ Puppet.settings[:servertype] = "webrick"
+ Puppet.settings[:bindaddress].should == "0.0.0.0"
+ end
+
+ it "should default to 127.0.0.1 for its bind address if the server is mongrel" do
+ Puppet.settings[:servertype] = "mongrel"
+ Puppet.settings[:bindaddress].should == "127.0.0.1"
+ end
+
+ it "should allow specification of a different bind address" do
+ Puppet.settings[:bindaddress] = "192.168.0.1"
+ Puppet.settings[:bindaddress].should == "192.168.0.1"
+ end
end