diff options
author | Bryan McLellan <btm@loftninjas.org> | 2016-09-07 10:52:54 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-09-07 10:52:54 -0700 |
commit | 40b9a9b0261b8f91d919d1fe7c36ae0b06291301 (patch) | |
tree | 3c80f20b4924028bfa6a5b5f898d93907ca1eb0d /spec/functional | |
parent | 576712d62a7be2da97bdb486ee5b967953f8387d (diff) | |
parent | e71fdb195565c2e45c1992f6ab6c5123e3518072 (diff) | |
download | chef-40b9a9b0261b8f91d919d1fe7c36ae0b06291301.tar.gz |
Merge pull request #5234 from MsysTechnologiesllc/ali/allow_symlink_directory_delete_on_windows
Added code to handle deletion of directories on Windows that are symlinks.
Diffstat (limited to 'spec/functional')
-rw-r--r-- | spec/functional/resource/link_spec.rb | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/spec/functional/resource/link_spec.rb b/spec/functional/resource/link_spec.rb index 5e58d0918a..de6976448e 100644 --- a/spec/functional/resource/link_spec.rb +++ b/spec/functional/resource/link_spec.rb @@ -388,6 +388,14 @@ describe Chef::Resource::Link do symlink(other_dir, target_file) end include_context "create symbolic link succeeds" + include_context "delete succeeds" + end + context "and the link already exists and points at the target" do + before do + symlink(to, target_file) + end + include_context "create symbolic link is noop" + include_context "delete succeeds" end end context "when the link destination is a symbolic link" do @@ -406,6 +414,19 @@ describe Chef::Resource::Link do include_context "create symbolic link succeeds" include_context "delete is noop" end + context "and the destination itself has another symbolic link" do + context "to a link that exist" do + before do + symlink(to, target_file) + end + include_context "create symbolic link is noop" + include_context "delete succeeds" + end + context "to a link that does not exist" do + include_context "create symbolic link succeeds" + include_context "delete is noop" + end + end end context "to a file that does not exist" do before(:each) do @@ -418,6 +439,19 @@ describe Chef::Resource::Link do include_context "create symbolic link succeeds" include_context "delete is noop" end + context "and the destination itself has another symbolic link" do + context "to a link that exist" do + before do + symlink(to, target_file) + end + include_context "create symbolic link is noop" + include_context "delete succeeds" + end + context "to a link that does not exist" do + include_context "create symbolic link succeeds" + include_context "delete is noop" + end + end end end context "when the link destination does not exist" do |