summaryrefslogtreecommitdiffstats
path: root/spec/unit
diff options
context:
space:
mode:
authorJosh Cooper <josh@puppetlabs.com>2011-07-18 23:26:31 -0700
committerJosh Cooper <josh@puppetlabs.com>2011-07-19 14:06:37 -0700
commit8d56355981961fd1c4a358992930bbb80325fea7 (patch)
tree3ecefe15b7fca19abd4981369b40fddd303d0c2e /spec/unit
parent255c5b4663bd389d2c87a2d39ec350034421a6f0 (diff)
downloadpuppet-8d56355981961fd1c4a358992930bbb80325fea7.tar.gz
puppet-8d56355981961fd1c4a358992930bbb80325fea7.tar.xz
puppet-8d56355981961fd1c4a358992930bbb80325fea7.zip
Maint: Don't test for extended signals on Windows
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 <jacob@puppetlabs.com>
Diffstat (limited to 'spec/unit')
-rwxr-xr-xspec/unit/daemon_spec.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/spec/unit/daemon_spec.rb b/spec/unit/daemon_spec.rb
index e2679a966..fc43d93ad 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