Please review pull request #334: 2.7.x - merge 2.6.x branch up opened by (daniel-pittman)
Description:
This merges the changes on the 2.6.x branch up into the 2.7.x branch, including a hand-merge correcting an additional failure in the spec tests due to SystemExit needing to be caught in the newer branch.
- Opened: Fri Jan 13 21:44:28 UTC 2012
- Based on: puppetlabs:2.7.x (f4f4158f673b911fb95d5dbb1a6f0eff8387bdbc)
- Requested merge: daniel-pittman:feature/2.7.x/merge-2.6.x-branch (69dfb34ede9d4c21a230b937ed3f1f7f062190ae)
Diff follows:
diff --git a/lib/puppet/application/agent.rb b/lib/puppet/application/agent.rb
index b9541a1..055c36d 100644
--- a/lib/puppet/application/agent.rb
+++ b/lib/puppet/application/agent.rb
@@ -347,6 +347,8 @@ def onetime
Puppet.err detail.to_s
end
+ @daemon.stop(:exit => false)
+
if not report
exit(1)
elsif options[:detailed_exitcodes] then
diff --git a/spec/unit/application/agent_spec.rb b/spec/unit/application/agent_spec.rb
index 6f3557d..13be1a5 100755
--- a/spec/unit/application/agent_spec.rb
+++ b/spec/unit/application/agent_spec.rb
@@ -555,6 +555,11 @@
expect { @puppetd.onetime }.to exit_with 0
end
+ it "should stop the daemon" do
+ @daemon.expects(:stop).with(:exit => false)
+ expect { @puppetd.onetime }.to exit_with 0
+ end
+
describe "and --detailed-exitcodes" do
before :each do
@puppetd.options.stubs(:[]).with(:detailed_exitcodes).returns(true)
-- 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.
