From 16cf1ac559afa58059fbb38da49246233c6c00c4 Mon Sep 17 00:00:00 2001 From: Matt Robinson Date: Fri, 22 Apr 2011 13:07:12 -0700 Subject: (#6442) Be able to start agents --listen without namespaceauth.conf The namespaceauth.conf isn't being used since we switched from XMLRPC to Rest. There's still a lot of cleanup of the code that deals with authorization from the namespaceauth.conf and XMLRPC in general, but that can be address later. For now just being able to start puppet agent in listen mode without a useless file will be a big win. You still need the auth.conf file though since that is used. Reviewed-by: Max Martin --- lib/puppet/application/agent.rb | 4 ++-- spec/unit/application/agent_spec.rb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/puppet/application/agent.rb b/lib/puppet/application/agent.rb index 9f5921de1..0d67c1a88 100644 --- a/lib/puppet/application/agent.rb +++ b/lib/puppet/application/agent.rb @@ -168,8 +168,8 @@ class Puppet::Application::Agent < Puppet::Application end def setup_listen - unless FileTest.exists?(Puppet[:authconfig]) - Puppet.err "Will not start without authorization file #{Puppet[:authconfig]}" + unless FileTest.exists?(Puppet[:rest_authconfig]) + Puppet.err "Will not start without authorization file #{Puppet[:rest_authconfig]}" exit(14) end diff --git a/spec/unit/application/agent_spec.rb b/spec/unit/application/agent_spec.rb index c9d9a4509..de6c7c893 100755 --- a/spec/unit/application/agent_spec.rb +++ b/spec/unit/application/agent_spec.rb @@ -411,7 +411,7 @@ describe Puppet::Application::Agent do describe "when setting up listen" do before :each do - Puppet.stubs(:[]).with(:authconfig).returns('auth') + Puppet.stubs(:[]).with(:rest_authconfig).returns('auth') FileTest.stubs(:exists?).with('auth').returns(true) File.stubs(:exist?).returns(true) @puppetd.options.stubs(:[]).with(:serve).returns([]) -- cgit