[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, upstream, updated. 0.25.5-639-g8f94f35
Markus Roberts
Markus at reality.com
Wed Jul 14 10:36:34 UTC 2010
The following commit has been merged in the upstream branch:
commit 6d4be90a6704ce26bad55e2d2cd3949526fea678
Author: Jesse Wolfe <jes5199 at gmail.com>
Date: Fri Jul 2 15:54:28 2010 -0700
[#3961] Part two: --destroy should also be local
diff --git a/lib/puppet/application/cert.rb b/lib/puppet/application/cert.rb
index 9625a7f..b2b7882 100644
--- a/lib/puppet/application/cert.rb
+++ b/lib/puppet/application/cert.rb
@@ -70,7 +70,7 @@ class Puppet::Application::Cert < Puppet::Application
Puppet::Util::Log.newdestination :console
- if @cert_mode == :generate
+ if [:generate, :destroy].include? @cert_mode
Puppet::SSL::Host.ca_location = :local
else
Puppet::SSL::Host.ca_location = :only
diff --git a/spec/unit/application/cert_spec.rb b/spec/unit/application/cert_spec.rb
index a72532e..c1ff38b 100755
--- a/spec/unit/application/cert_spec.rb
+++ b/spec/unit/application/cert_spec.rb
@@ -112,6 +112,24 @@ describe Puppet::Application::Cert do
@cert_app.setup
end
+
+ it "should set the ca_location to :local if the cert_mode is generate" do
+ @cert_app.find_mode('--generate')
+ Puppet::SSL::Host.expects(:ca_location=).with(:local)
+ @cert_app.setup
+ end
+
+ it "should set the ca_location to :local if the cert_mode is destroy" do
+ @cert_app.find_mode('--destroy')
+ Puppet::SSL::Host.expects(:ca_location=).with(:local)
+ @cert_app.setup
+ end
+
+ it "should set the ca_location to :only if the cert_mode is print" do
+ @cert_app.find_mode('--print')
+ Puppet::SSL::Host.expects(:ca_location=).with(:only)
+ @cert_app.setup
+ end
end
describe "when running" do
--
Puppet packaging for Debian
More information about the Pkg-puppet-devel
mailing list