summaryrefslogtreecommitdiffstats
path: root/spec/unit/application/puppetd.rb
diff options
context:
space:
mode:
authorJohn A. Barbuto <jbarbuto@corp.sourceforge.com>2009-10-22 18:16:16 -0700
committerJames Turnbull <james@lovedthanlost.net>2009-10-25 11:13:56 +1100
commitb6e4ef37f7ac4844697f1857cbcf03a2796db7d4 (patch)
treed4bcbc54a48a76fdad679482c58a2eb43db1137a /spec/unit/application/puppetd.rb
parent2b57e065d2220be4f172ae429190bd116ddbdaf1 (diff)
downloadpuppet-b6e4ef37f7ac4844697f1857cbcf03a2796db7d4.tar.gz
puppet-b6e4ef37f7ac4844697f1857cbcf03a2796db7d4.tar.xz
puppet-b6e4ef37f7ac4844697f1857cbcf03a2796db7d4.zip
Fixed #2750 - Set :cacrl to nil instead of 'false' in puppetd
The latter is deprecated and was keeping puppetd from starting. Also added a test and fixed a typo in another test. Signed-off-by: John A. Barbuto <jbarbuto@corp.sourceforge.com>
Diffstat (limited to 'spec/unit/application/puppetd.rb')
-rwxr-xr-xspec/unit/application/puppetd.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/spec/unit/application/puppetd.rb b/spec/unit/application/puppetd.rb
index d34ec9f2f..19dfaf3e0 100755
--- a/spec/unit/application/puppetd.rb
+++ b/spec/unit/application/puppetd.rb
@@ -40,7 +40,7 @@ describe "puppetd" do
describe "in preinit" do
before :each do
- @pupetd.stubs(:trap)
+ @puppetd.stubs(:trap)
end
it "should catch INT" do
@@ -407,6 +407,14 @@ describe "puppetd" do
@puppetd.setup_listen
end
+ it "should set :cacrl to nil if no cacrl file" do
+ Puppet.expects(:[]).with(:cacrl).returns('cacrl')
+ File.expects(:exist?).with('cacrl').returns(false)
+ Puppet.expects(:[]=).with(:cacrl,nil)
+
+ @puppetd.setup_listen
+ end
+
it "should create a server to listen on at least the Runner handler" do
Puppet::Network::Server.expects(:new).with { |args| args[:xmlrpc_handlers] == [:Runner] }