[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, experimental, updated. debian/2.6.8-1-844-g7ec39d5

Brice Figureau brice-puppet at daysofwonder.com
Tue May 10 08:01:18 UTC 2011


The following commit has been merged in the experimental branch:
commit 8ab1aba853231a5e541346955dcd502a67992eb6
Author: Brice Figureau <brice-puppet at daysofwonder.com>
Date:   Fri Nov 12 13:41:00 2010 +0100

    Fix #4339 - Allow puppet apply to save last run summary
    
    Puppet apply inconditionally saves its last run summary
    like puppet agent.
    
    Signed-off-by: Brice Figureau <brice-puppet at daysofwonder.com>

diff --git a/lib/puppet/application/apply.rb b/lib/puppet/application/apply.rb
index 59a95d3..ed1331d 100644
--- a/lib/puppet/application/apply.rb
+++ b/lib/puppet/application/apply.rb
@@ -139,6 +139,7 @@ class Puppet::Application::Apply < Puppet::Application
         configurer.send_report(report, transaction)
       else
         transaction.generate_report
+        configurer.save_last_run_summary(transaction.report)
       end
 
       exit( Puppet[:noop] ? 0 : options[:detailed_exitcodes] ? transaction.report.exit_status : 0 )
diff --git a/spec/unit/application/apply_spec.rb b/spec/unit/application/apply_spec.rb
index edb41b5..9dcfd5f 100755
--- a/spec/unit/application/apply_spec.rb
+++ b/spec/unit/application/apply_spec.rb
@@ -316,6 +316,17 @@ describe Puppet::Application::Apply do
         @apply.main
       end
 
+      it "should save the last run summary" do
+        configurer = stub_everything 'configurer'
+        Puppet::Configurer.expects(:new).returns configurer
+        Puppet.stubs(:[]).with(:noop).returns(false)
+        report = stub 'report'
+        @transaction.stubs(:report).returns(report)
+
+        configurer.expects(:save_last_run_summary).with(report)
+        @apply.main
+      end
+
       describe "with detailed_exitcodes" do
         it "should exit with report's computed exit status" do
           Puppet.stubs(:[]).with(:noop).returns(false)

-- 
Puppet packaging for Debian



More information about the Pkg-puppet-devel mailing list