summaryrefslogtreecommitdiffstats
path: root/spec/unit
diff options
context:
space:
mode:
authorJosh Cooper <josh@puppetlabs.com>2011-07-18 23:26:31 -0700
committerJacob Helwig <jacob@puppetlabs.com>2011-08-19 13:48:29 -0700
commitce0c258ba24a5232a82a69eb62387893feca684e (patch)
tree5abe8a743081212b9bc32931d5204ceb5b0dd4cf /spec/unit
parentbdc9790b4e3a4312f56cb66cf550f7b98ce910e5 (diff)
downloadpuppet-ce0c258ba24a5232a82a69eb62387893feca684e.tar.gz
puppet-ce0c258ba24a5232a82a69eb62387893feca684e.tar.xz
puppet-ce0c258ba24a5232a82a69eb62387893feca684e.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> (cherry picked from commit 8d56355981961fd1c4a358992930bbb80325fea7)
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