diff options
author | Roland Moriz <roland@moriz.de> | 2018-05-12 03:32:45 +0200 |
---|---|---|
committer | Roland Moriz <roland@moriz.de> | 2018-05-12 03:34:51 +0200 |
commit | 6e6a9eab1e3898f6409c8a71b8023649dcc2d56f (patch) | |
tree | 4fb9e0902479e3e7461d6ed34883ac55153e2b65 | |
parent | 5ccc5685550b961144b8aec045089c4172722706 (diff) | |
download | chef-6e6a9eab1e3898f6409c8a71b8023649dcc2d56f.tar.gz |
remote_directory: restore overwrite default
Signed-off-by: Roland Moriz <roland@moriz.de>
-rw-r--r-- | lib/chef/resource/remote_directory.rb | 2 | ||||
-rw-r--r-- | spec/unit/resource/remote_directory_spec.rb | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/lib/chef/resource/remote_directory.rb b/lib/chef/resource/remote_directory.rb index 14e4f4a497..daeb7b35bb 100644 --- a/lib/chef/resource/remote_directory.rb +++ b/lib/chef/resource/remote_directory.rb @@ -56,7 +56,7 @@ class Chef property :source, String, default: lazy { ::File.basename(path) } property :files_backup, [ Integer, FalseClass ], default: 5, desired_state: false property :purge, [ TrueClass, FalseClass ], default: false, desired_state: false - property :overwrite, [ TrueClass, FalseClass ], default: false + property :overwrite, [ TrueClass, FalseClass ], default: true property :cookbook, String def files_group(arg = nil) diff --git a/spec/unit/resource/remote_directory_spec.rb b/spec/unit/resource/remote_directory_spec.rb index 8ec2d80bc8..afa16678fc 100644 --- a/spec/unit/resource/remote_directory_spec.rb +++ b/spec/unit/resource/remote_directory_spec.rb @@ -67,6 +67,10 @@ describe Chef::Resource::RemoteDirectory do expect(resource.files_owner).to eql(1000) end + it "overwrites by default" do + expect(resource.overwrite).to be true + end + describe "when it has cookbook, files owner, files mode, and source" do before do resource.path("/var/path/") |