The signals HUP, USR1, and USR2 are not supported on Windows. The
Puppet::Daemon code already skipped trapping these on Windows,
but the spec test was expecting them to be trapped. This commit
just updates the spec test to match the existing daemon code.

Reviewed-by: Jacob Helwig <ja...@puppetlabs.com>
Signed-off-by: Josh Cooper <j...@puppetlabs.com>
---
Local-branch: feature/master/8268-puppet-agent-windows
 spec/unit/daemon_spec.rb |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/spec/unit/daemon_spec.rb b/spec/unit/daemon_spec.rb
index e2679a9..fc43d93 100755
--- a/spec/unit/daemon_spec.rb
+++ b/spec/unit/daemon_spec.rb
@@ -28,7 +28,9 @@ describe Puppet::Daemon do
   end
 
   describe "when setting signal traps" do
-    {:INT => :stop, :TERM => :stop, :HUP => :restart, :USR1 => :reload, :USR2 
=> :reopen_logs}.each do |signal, method|
+    signals = {:INT => :stop, :TERM => :stop }
+    signals.update({:HUP => :restart, :USR1 => :reload, :USR2 => 
:reopen_logs}) unless Puppet.features.microsoft_windows?
+    signals.each do |signal, method|
       it "should log and call #{method} when it receives #{signal}" do
         Signal.expects(:trap).with(signal).yields
 
-- 
1.7.5.4

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

Reply via email to