diff options
author | Kartik Null Cating-Subramanian <ksubramanian@chef.io> | 2016-04-26 10:18:55 -0400 |
---|---|---|
committer | Kartik Null Cating-Subramanian <ksubramanian@chef.io> | 2016-04-26 10:18:55 -0400 |
commit | 90daa00422b0bb05973ca17ff1b1e7be401998de (patch) | |
tree | 1c00c24fa1dd04172d121dedd2d3b53a257f1d67 /spec/support | |
parent | 24a180a6988b022776865a2fbe448555a930f691 (diff) | |
parent | fa2a9b0a2b8468ad099a08213638971070309a7e (diff) | |
download | chef-90daa00422b0bb05973ca17ff1b1e7be401998de.tar.gz |
Merge pull request #4642 from chef/ksubrama/fips_acceptance
Run the integration tests in FIPS mode
Diffstat (limited to 'spec/support')
-rw-r--r-- | spec/support/shared/functional/securable_resource.rb | 2 | ||||
-rw-r--r-- | spec/support/shared/unit/provider/file.rb | 6 | ||||
-rw-r--r-- | spec/support/shared/unit/windows_script_resource.rb | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/spec/support/shared/functional/securable_resource.rb b/spec/support/shared/functional/securable_resource.rb index dd8a0216bc..506b96736c 100644 --- a/spec/support/shared/functional/securable_resource.rb +++ b/spec/support/shared/functional/securable_resource.rb @@ -309,7 +309,7 @@ shared_examples_for "a securable resource without existing target" do end it "fails to set owner when owner has invalid characters" do - expect { resource.owner 'Lance "The Nose" Glindenberry III' }.to raise_error#(Chef::Exceptions::ValidationFailed) + expect { resource.owner 'Lance "The Nose" Glindenberry III' }.to raise_error(Chef::Exceptions::ValidationFailed) end it "sets owner when owner is specified with a \\" do diff --git a/spec/support/shared/unit/provider/file.rb b/spec/support/shared/unit/provider/file.rb index 2b2c7255cc..cb539ffbc3 100644 --- a/spec/support/shared/unit/provider/file.rb +++ b/spec/support/shared/unit/provider/file.rb @@ -586,14 +586,14 @@ shared_examples_for Chef::Provider::File do it "raises an exception when the content object returns a tempfile with a nil path" do tempfile = double("Tempfile", :path => nil) expect(provider.send(:content)).to receive(:tempfile).at_least(:once).and_return(tempfile) - expect { provider.send(:do_contents_changes) }.to raise_error + expect { provider.send(:do_contents_changes) }.to raise_error(RuntimeError) end it "raises an exception when the content object returns a tempfile that does not exist" do tempfile = double("Tempfile", :path => "/tmp/foo-bar-baz") expect(provider.send(:content)).to receive(:tempfile).at_least(:once).and_return(tempfile) expect(File).to receive(:exists?).with("/tmp/foo-bar-baz").and_return(false) - expect { provider.send(:do_contents_changes) }.to raise_error + expect { provider.send(:do_contents_changes) }.to raise_error(RuntimeError) end end @@ -712,7 +712,7 @@ shared_examples_for Chef::Provider::File do it "should not try to backup or delete the file, and should not be updated by last action" do expect(provider).not_to receive(:do_backup) expect(File).not_to receive(:delete) - expect { provider.run_action(:delete) }.to raise_error() + expect { provider.run_action(:delete) }.to raise_error(Chef::Exceptions::InsufficientPermissions) expect(resource).not_to be_updated_by_last_action end end diff --git a/spec/support/shared/unit/windows_script_resource.rb b/spec/support/shared/unit/windows_script_resource.rb index 2dc0229c90..5b559bb83b 100644 --- a/spec/support/shared/unit/windows_script_resource.rb +++ b/spec/support/shared/unit/windows_script_resource.rb @@ -64,7 +64,7 @@ shared_examples_for "a Windows script resource" do it "should raise an exception if the guard_interpreter is overridden from its default value" do @resource.guard_interpreter :bash @resource.only_if { true } - expect { @resource.should_skip?(:run) }.to raise_error + expect { @resource.should_skip?(:run) }.to raise_error(ArgumentError) end end end |