From fd17987a1396db10970194ab05176a679fb3d24b Mon Sep 17 00:00:00 2001 From: Tim Smith Date: Thu, 10 Aug 2017 16:55:08 -0700 Subject: Fix the apt_preference action to be remove Signed-off-by: Tim Smith --- lib/chef/provider/apt_preference.rb | 2 +- spec/unit/provider/apt_preference_spec.rb | 2 +- 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 -- cgit v1.2.1