[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, upstream, updated. 0.25.5-639-g8f94f35

test branch puppet-dev at googlegroups.com
Wed Jul 14 10:31:14 UTC 2010


The following commit has been merged in the upstream branch:
commit eb0a4b5833476b51417a7047b5fb6e05843ff05b
Author: Luke Kanies <luke at reductivelabs.com>
Date:   Tue Mar 23 10:35:00 2010 -0700

    Fixing fingerprint tests to work with new log validation
    
    Signed-off-by: Luke Kanies <luke at reductivelabs.com>

diff --git a/lib/puppet/application/agent.rb b/lib/puppet/application/agent.rb
index ec6fc80..487b076 100644
--- a/lib/puppet/application/agent.rb
+++ b/lib/puppet/application/agent.rb
@@ -108,7 +108,10 @@ Puppet::Application.new(:agent) do
            exit(1)
            return
         end
-        Puppet.notice cert.fingerprint(options[:digest])
+        unless fingerprint = cert.fingerprint(options[:digest])
+            raise ArgumentError, "Could not get fingerprint for digest '#{options[:digest]}'"
+        end
+        Puppet.notice fingerprint
     end
 
     command(:onetime) do
diff --git a/spec/unit/application/agent.rb b/spec/unit/application/agent.rb
index cbfd2d7..782dcfc 100755
--- a/spec/unit/application/agent.rb
+++ b/spec/unit/application/agent.rb
@@ -564,14 +564,14 @@ describe Puppet::Application[:agent] do
 
             it "should fingerprint the certificate if it exists" do
                 @host.expects(:certificate).returns(@cert)
-                @cert.expects(:fingerprint).with(:MD5)
+                @cert.expects(:fingerprint).with(:MD5).returns "fingerprint"
                 @puppetd.fingerprint
             end
 
             it "should fingerprint the certificate request if no certificate have been signed" do
                 @host.expects(:certificate).returns(nil)
                 @host.expects(:certificate_request).returns(@cert)
-                @cert.expects(:fingerprint).with(:MD5)
+                @cert.expects(:fingerprint).with(:MD5).returns "fingerprint"
                 @puppetd.fingerprint
             end
 

-- 
Puppet packaging for Debian



More information about the Pkg-puppet-devel mailing list