Always output the fingerprint to STDOUT, no matter what loglevel is used,
as that's the whole purpose of the comment.

Having to specify --verbose in addition to --fingerprint to get the finger
is nonsensical.

Update the spec test to stub @puppet puts to keep instead of the
Puppet.logging facilities.

Signed-off-by: Ben Hughes <[email protected]>
---
 lib/puppet/application/agent.rb     |    2 +-
 spec/unit/application/agent_spec.rb |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/puppet/application/agent.rb b/lib/puppet/application/agent.rb
index 3749241..53e0832 100644
--- a/lib/puppet/application/agent.rb
+++ b/lib/puppet/application/agent.rb
@@ -98,7 +98,7 @@ class Puppet::Application::Agent < Puppet::Application
     unless fingerprint = cert.fingerprint(options[:digest])
       raise ArgumentError, "Could not get fingerprint for digest 
'#{options[:digest]}'"
     end
-    Puppet.notice fingerprint
+    puts fingerprint
   end
 
   def onetime
diff --git a/spec/unit/application/agent_spec.rb 
b/spec/unit/application/agent_spec.rb
index 8f498d4..9cc32bb 100755
--- a/spec/unit/application/agent_spec.rb
+++ b/spec/unit/application/agent_spec.rb
@@ -563,7 +563,7 @@ describe Puppet::Application::Agent do
         @host.stubs(:certificate).returns(@cert)
         @cert.stubs(:fingerprint).with(:MD5).returns("DIGEST")
 
-        Puppet.expects(:notice).with("DIGEST")
+        @puppetd.expects(:puts).with "DIGEST"
 
         @puppetd.fingerprint
       end
-- 
1.7.4.2

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en.

Reply via email to