Commit 1f826803 authored by Tim Smith's avatar Tim Smith
Browse files

Fix failing specs


Signed-off-by: default avatarTim Smith <tsmith@chef.io>
parent 6c7f7bcb
...@@ -21,7 +21,7 @@ package 'rsyslog' ...@@ -21,7 +21,7 @@ package 'rsyslog'
package 'rsyslog-relp' if node['rsyslog']['use_relp'] package 'rsyslog-relp' if node['rsyslog']['use_relp']
if node['rsyslog']['enable_tls'] && node['rsyslog']['tls_ca_file'] if node['rsyslog']['enable_tls'] && node['rsyslog']['tls_ca_file']
Chef::Log.fatal("Recipe rsyslog::default can not use 'enable_tls' with protocol '#{node['rsyslog']['protocol']}' (requires 'tcp')") unless node['rsyslog']['protocol'] == 'tcp' raise "Recipe rsyslog::default can not use 'enable_tls' with protocol '#{node['rsyslog']['protocol']}' (requires 'tcp')" unless node['rsyslog']['protocol'] == 'tcp'
package 'rsyslog-gnutls' package 'rsyslog-gnutls'
end end
......
...@@ -49,11 +49,6 @@ describe 'rsyslog::default' do ...@@ -49,11 +49,6 @@ describe 'rsyslog::default' do
end end
context "when protocol is not 'tcp'" do context "when protocol is not 'tcp'" do
before do
allow(Chef::Log).to receive(:fatal)
allow($stdout).to receive(:puts)
end
let(:chef_run) do let(:chef_run) do
ChefSpec::ServerRunner.new(platform: 'ubuntu', version: '16.04') do |node| ChefSpec::ServerRunner.new(platform: 'ubuntu', version: '16.04') do |node|
node.normal['rsyslog']['enable_tls'] = true node.normal['rsyslog']['enable_tls'] = true
...@@ -63,7 +58,9 @@ describe 'rsyslog::default' do ...@@ -63,7 +58,9 @@ describe 'rsyslog::default' do
end end
it 'exits fatally' do it 'exits fatally' do
expect { chef_run }.to raise_error(SystemExit) expect do
chef_run
end.to raise_error
end end
end end
end end
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment