diff options
author | Ashwin <avarma@msystechnologies.com> | 2021-08-26 15:19:56 +0530 |
---|---|---|
committer | Ashwin <avarma@msystechnologies.com> | 2021-08-26 15:19:56 +0530 |
commit | 60d94cd834a6ab3740b8d8c566c484ffad9b73df (patch) | |
tree | f37d4f93b766d02bb4d5ad0c645a471c9d148659 | |
parent | fdc2f684cecc5dd8609cdd1b399e0644b87dd64f (diff) | |
download | chef-11641_directory_resource_fails_for_mountpoints_inside_read_only_file_systems.tar.gz |
Signed-off-by: Ashwin <avarma@msystechnologies.com>
-rw-r--r-- | spec/unit/provider/directory_spec.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/unit/provider/directory_spec.rb b/spec/unit/provider/directory_spec.rb index b7814c2763..ad6d576f21 100644 --- a/spec/unit/provider/directory_spec.rb +++ b/spec/unit/provider/directory_spec.rb @@ -167,12 +167,12 @@ describe Chef::Provider::Directory do it "does not raise any exception if the parent directory is exists and writable" do allow(::File).to receive(:exist?).and_return(true) allow(Chef::FileAccessControl).to receive(:writable?).and_return(true) - expect { directory.run_action(:create) }.not_to raise_error(Chef::Exceptions::InsufficientPermissions) + expect { directory.run_action(:create) }.not_to raise_error end it "lets does not raise error if child directory exists and writable even if parent directory is read-only" do allow(Chef::FileAccessControl).to receive(:writable?).with(anything).and_return(false) - allow(Chef::FileAccessControl).to receive(:writable?).with('/tmp/').and_return(false) + allow(Chef::FileAccessControl).to receive(:writable?).with("/tmp/").and_return(false) allow(Chef::FileAccessControl).to receive(:writable?).with(new_resource.path).and_return(true) expect { directory.run_action(:create) }.not_to raise_error end |