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/unit/provider | |
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/unit/provider')
-rw-r--r-- | spec/unit/provider/apt_update_spec.rb | 1 | ||||
-rw-r--r-- | spec/unit/provider/directory_spec.rb | 7 | ||||
-rw-r--r-- | spec/unit/provider/file/content_spec.rb | 2 | ||||
-rw-r--r-- | spec/unit/provider/package/yum_spec.rb | 2 | ||||
-rw-r--r-- | spec/unit/provider/user/dscl_spec.rb | 12 |
5 files changed, 9 insertions, 15 deletions
diff --git a/spec/unit/provider/apt_update_spec.rb b/spec/unit/provider/apt_update_spec.rb index 3e3e6ba07a..351a10051c 100644 --- a/spec/unit/provider/apt_update_spec.rb +++ b/spec/unit/provider/apt_update_spec.rb @@ -73,6 +73,7 @@ describe Chef::Provider::AptUpdate do describe "#action_periodic" do before do allow(File).to receive(:exist?) + allow(File).to receive(:exist?).with(Dir.tmpdir).and_return(true) expect(File).to receive(:exist?).with("#{stamp_dir}/update-success-stamp").and_return(true) end diff --git a/spec/unit/provider/directory_spec.rb b/spec/unit/provider/directory_spec.rb index c8bec3e8ce..f8864af7f8 100644 --- a/spec/unit/provider/directory_spec.rb +++ b/spec/unit/provider/directory_spec.rb @@ -187,13 +187,6 @@ describe Chef::Provider::Directory do it "raises an exception when the parent directory is a file and recursive is true" do FileUtils.touch tmp_dir new_resource.recursive true - expect { directory.run_action(:create) }.to raise_error - end - - it "raises the right exception when the parent directory is a file and recursive is true" do - pending "this seems to return the wrong error" # FIXME - FileUtils.touch tmp_dir - new_resource.recursive true expect { directory.run_action(:create) }.to raise_error(Chef::Exceptions::EnclosingDirectoryDoesNotExist) end end diff --git a/spec/unit/provider/file/content_spec.rb b/spec/unit/provider/file/content_spec.rb index 9ebcf10dcc..a31c75baf4 100644 --- a/spec/unit/provider/file/content_spec.rb +++ b/spec/unit/provider/file/content_spec.rb @@ -89,7 +89,7 @@ describe Chef::Provider::File::Content do it "fails when :file_desployment_uses_destdir is set" do Chef::Config[:file_staging_uses_destdir] = true - expect { content.tempfile }.to raise_error + expect { content.tempfile }.to raise_error(Chef::Exceptions::FileContentStagingError) end it "returns a tempfile in the tempdir when :file_desployment_uses_destdir is not set" do diff --git a/spec/unit/provider/package/yum_spec.rb b/spec/unit/provider/package/yum_spec.rb index 3fb60ea10d..ab726134e9 100644 --- a/spec/unit/provider/package/yum_spec.rb +++ b/spec/unit/provider/package/yum_spec.rb @@ -1578,7 +1578,7 @@ describe Chef::Provider::Package::Yum::RPMDb do end it "should only accept an RPMDbPackage object" do - expect { @rpmdb.push("string") }.to raise_error + expect { @rpmdb.push("string") }.to raise_error(ArgumentError) end it "should add the package to the package db" do diff --git a/spec/unit/provider/user/dscl_spec.rb b/spec/unit/provider/user/dscl_spec.rb index c1877a53cd..bf8b3169d7 100644 --- a/spec/unit/provider/user/dscl_spec.rb +++ b/spec/unit/provider/user/dscl_spec.rb @@ -294,7 +294,7 @@ ea18e18b720e358e7fbe3cfbeaa561456f6ba008937a30" let(:dscl_exists) { false } it "should raise an error" do - expect { run_requirements }.to raise_error + expect { run_requirements }.to raise_error(Chef::Exceptions::User) end end @@ -302,7 +302,7 @@ ea18e18b720e358e7fbe3cfbeaa561456f6ba008937a30" let(:plutil_exists) { false } it "should raise an error" do - expect { run_requirements }.to raise_error + expect { run_requirements }.to raise_error(Chef::Exceptions::User) end end @@ -312,7 +312,7 @@ ea18e18b720e358e7fbe3cfbeaa561456f6ba008937a30" } it "should raise an error" do - expect { run_requirements }.to raise_error + expect { run_requirements }.to raise_error(Chef::Exceptions::User) end end @@ -333,7 +333,7 @@ ea18e18b720e358e7fbe3cfbeaa561456f6ba008937a30" let(:password) { salted_sha512_pbkdf2_password } it "should raise an error" do - expect { run_requirements }.to raise_error + expect { run_requirements }.to raise_error(Chef::Exceptions::User) end end end @@ -348,7 +348,7 @@ ea18e18b720e358e7fbe3cfbeaa561456f6ba008937a30" let(:password) { salted_sha512_password } it "should raise an error" do - expect { run_requirements }.to raise_error + expect { run_requirements }.to raise_error(Chef::Exceptions::User) end end @@ -357,7 +357,7 @@ ea18e18b720e358e7fbe3cfbeaa561456f6ba008937a30" describe "when salt and iteration is not set" do it "should raise an error" do - expect { run_requirements }.to raise_error + expect { run_requirements }.to raise_error(Chef::Exceptions::User) end end |