summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2017-08-10 19:21:37 -0700
committerGitHub <noreply@github.com>2017-08-10 19:21:37 -0700
commit746cf535dc2c214f185f8d3d4de7a7e40494026b (patch)
treef9272ca82c3b0c65a0c8eabd9d6187fdb4f86e2f
parent09f39632535f582268b4a9051e40e870576d64e7 (diff)
parentfd17987a1396db10970194ab05176a679fb3d24b (diff)
downloadchef-746cf535dc2c214f185f8d3d4de7a7e40494026b.tar.gz
Merge pull request #6321 from chef/preference_action
Fix the apt_preference action to be remove
-rw-r--r--lib/chef/provider/apt_preference.rb2
-rw-r--r--spec/unit/provider/apt_preference_spec.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef/provider/apt_preference.rb b/lib/chef/provider/apt_preference.rb
index d3958ea6fa..55356dab94 100644
--- a/lib/chef/provider/apt_preference.rb
+++ b/lib/chef/provider/apt_preference.rb
@@ -73,7 +73,7 @@ class Chef
end
end
- action :delete do
+ action :remove do
sanitized_prefname = safe_name(new_resource.package_name)
if ::File.exist?("#{APT_PREFERENCE_DIR}/#{sanitized_prefname}.pref")
diff --git a/spec/unit/provider/apt_preference_spec.rb b/spec/unit/provider/apt_preference_spec.rb
index 55c277e6fe..e37dc16ff9 100644
--- a/spec/unit/provider/apt_preference_spec.rb
+++ b/spec/unit/provider/apt_preference_spec.rb
@@ -79,7 +79,7 @@ describe Chef::Provider::AptPreference do
end
it "deletes the name santized .pref file" do
- provider.run_action(:delete)
+ provider.run_action(:remove)
expect(new_resource).to be_updated_by_last_action
expect(File).not_to exist("#{pref_dir}/libmysqlclient16_1wildcard.pref")
end