diff options
author | Matt Wrock <matt@mattwrock.com> | 2015-10-23 08:56:25 -0700 |
---|---|---|
committer | Matt Wrock <matt@mattwrock.com> | 2015-10-23 08:56:25 -0700 |
commit | dacd899509a1e5b3a97441797a55e6ae3bcfdb3a (patch) | |
tree | cd38ae6bd5feec9613b31f24426895bfae92e7b4 /spec | |
parent | 2dc3f5654df53a15cf503cbefd051f3387133041 (diff) | |
parent | 29c01fd3235ba333b68ae1f6a972c049aec00c8c (diff) | |
download | chef-dacd899509a1e5b3a97441797a55e6ae3bcfdb3a.tar.gz |
Merge pull request #4079 from chef/service_logger
add logger to windows service shellout
Diffstat (limited to 'spec')
-rw-r--r-- | spec/unit/windows_service_spec.rb | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/spec/unit/windows_service_spec.rb b/spec/unit/windows_service_spec.rb index bc5e781c03..396584716d 100644 --- a/spec/unit/windows_service_spec.rb +++ b/spec/unit/windows_service_spec.rb @@ -49,7 +49,11 @@ describe "Chef::Application::WindowsService", :windows_only do allow(instance.instance_variable_get(:@service_signal)).to receive(:wait) allow(instance).to receive(:state).and_return(4) expect(instance).to receive(:run_chef_client).and_call_original - expect(instance).to receive(:shell_out).with("chef-client --no-fork -c test_config_file -L #{tempfile.path}", {:timeout => 7200}).and_return(shell_out_result) + expect(instance).to receive(:shell_out).with("chef-client --no-fork -c test_config_file -L #{tempfile.path}", + { + :timeout => 7200, + :logger => Chef::Log + }).and_return(shell_out_result) instance.service_main tempfile.unlink end @@ -63,7 +67,11 @@ describe "Chef::Application::WindowsService", :windows_only do allow(instance.instance_variable_get(:@service_signal)).to receive(:wait) allow(instance).to receive(:state).and_return(4) expect(instance).to receive(:run_chef_client).and_call_original - expect(instance).to receive(:shell_out).with("chef-client --no-fork -c test_config_file -L #{tempfile.path}", {:timeout => 10}).and_return(shell_out_result) + expect(instance).to receive(:shell_out).with("chef-client --no-fork -c test_config_file -L #{tempfile.path}", + { + :timeout => 10, + :logger => Chef::Log + }).and_return(shell_out_result) instance.service_main tempfile.unlink end |