diff options
| -rw-r--r-- | lib/puppet/application/puppetca.rb | 2 | ||||
| -rw-r--r-- | spec/unit/application/puppetca.rb | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/lib/puppet/application/puppetca.rb b/lib/puppet/application/puppetca.rb index 09de6c302..68ea3e5fb 100644 --- a/lib/puppet/application/puppetca.rb +++ b/lib/puppet/application/puppetca.rb @@ -58,7 +58,7 @@ Puppet::Application.new(:puppetca) do Puppet::Util::Log.newdestination :console - Puppet::SSL::Host.ca_location = :local + Puppet::SSL::Host.ca_location = :only begin @ca = Puppet::SSL::CertificateAuthority.new diff --git a/spec/unit/application/puppetca.rb b/spec/unit/application/puppetca.rb index 38ceacbcc..d5ee0d06b 100644 --- a/spec/unit/application/puppetca.rb +++ b/spec/unit/application/puppetca.rb @@ -86,6 +86,12 @@ describe "PuppetCA" do lambda { @puppetca.run_setup }.should raise_error(SystemExit) end + it "should set the CA location to 'only'" do + Puppet::SSL::Host.expects(:ca_location=).with(:only) + + @puppetca.run_setup + end + it "should create a new certificate authority" do Puppet::SSL::CertificateAuthority.expects(:new) |
