diff options
| author | Brice Figureau <brice-puppet@daysofwonder.com> | 2009-12-28 17:17:57 +0100 |
|---|---|---|
| committer | James Turnbull <james@lovedthanlost.net> | 2010-01-18 23:17:21 +1100 |
| commit | a967b93a51ce509cf8631d78b8be8d4ab6da5657 (patch) | |
| tree | c4999010dcad2217ff20ca43376854962b1988c5 /spec | |
| parent | b6f90dfcd96123c245b6f5fd93753790006387c0 (diff) | |
| download | puppet-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.rb | 10 |
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 |
