On Tue, Jul 19, 2011 at 14:59, Josh Cooper <j...@puppetlabs.com> wrote:
> 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

Shouldn't this add appropriate platform "pending" tests to indicate
that these features are not yet available, or have a reference to the
bug required to get them reimplemented appropriately in the commit
message?  (Well, or the location of the discussion that we are
abandoning support for those facilities on the platform entirely. ;)

Daniel
-- 
⎋ Puppet Labs Developer – http://puppetlabs.com
✉ Daniel Pittman <dan...@puppetlabs.com>
✆ Contact me via gtalk, email, or phone: +1 (877) 575-9775
♲ Made with 100 percent post-consumer electrons

-- 
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