summaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authorBrice Figureau <brice-puppet@daysofwonder.com>2009-12-28 17:17:57 +0100
committerJames Turnbull <james@lovedthanlost.net>2010-01-18 23:17:21 +1100
commita967b93a51ce509cf8631d78b8be8d4ab6da5657 (patch)
treec4999010dcad2217ff20ca43376854962b1988c5 /spec
parentb6f90dfcd96123c245b6f5fd93753790006387c0 (diff)
downloadpuppet-a967b93a51ce509cf8631d78b8be8d4ab6da5657.tar.gz
puppet-a967b93a51ce509cf8631d78b8be8d4ab6da5657.tar.xz
puppet-a967b93a51ce509cf8631d78b8be8d4ab6da5657.zip
Feature #2395 - revoke when cleaning a certificate with puppetca
As the ticket says: "the certificates would still be valid even if cleaned, therefore, it makes more sense revoke them instead." Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
Diffstat (limited to 'spec')
-rw-r--r--spec/unit/application/puppetca.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/unit/application/puppetca.rb b/spec/unit/application/puppetca.rb
index d5ee0d06b..3a535f394 100644
--- a/spec/unit/application/puppetca.rb
+++ b/spec/unit/application/puppetca.rb
@@ -138,5 +138,15 @@ describe "PuppetCA" do
@puppetca.main
end
+ it "should revoke cert if mode is clean" do
+ @puppetca.mode = :destroy
+ ARGV.stubs(:collect).returns(["host"])
+
+ @ca.expects(:apply).with { |mode,to| mode == :revoke }
+ @ca.expects(:apply).with { |mode,to| mode == :destroy }
+
+ @puppetca.main
+ end
+
end
end