summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2018-02-28 12:57:27 -0800
committerTim Smith <tsmith@chef.io>2018-02-28 12:57:27 -0800
commit494de6eea80595bd44d98fac6cd2560d1a5731cc (patch)
treeac03534020ab6176d63fd6d4962fd93a152b8ee4
parentac19cbfb5fb05189e0edc400bc1acd9a7364b4d8 (diff)
downloadchef-remove_choco_uninstall.tar.gz
Remove the :uninstall action from chocolatey_package - CHEF-21remove_choco_uninstall
Remove the previously deprecated :uninstall action for chocolatey_package. This is noted in CHEF-21 Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r--lib/chef/provider/package/chocolatey.rb8
-rw-r--r--lib/chef/resource/chocolatey_package.rb2
-rw-r--r--spec/unit/provider/package/chocolatey_spec.rb13
3 files changed, 1 insertions, 22 deletions
diff --git a/lib/chef/provider/package/chocolatey.rb b/lib/chef/provider/package/chocolatey.rb
index 3536d807ad..2932654962 100644
--- a/lib/chef/provider/package/chocolatey.rb
+++ b/lib/chef/provider/package/chocolatey.rb
@@ -124,14 +124,6 @@ EOS
choco_command("uninstall -y", cmd_args(include_source: false), *names)
end
- # Support :uninstall as an action in order for users to easily convert
- # from the `chocolatey` provider in the cookbook. It is, however,
- # already deprecated.
- def action_uninstall
- Chef::Log.deprecation "The use of action :uninstall on the chocolatey_package provider is deprecated, please use :remove"
- action_remove
- end
-
# Choco does not have dpkg's distinction between purge and remove
alias purge_package remove_package
diff --git a/lib/chef/resource/chocolatey_package.rb b/lib/chef/resource/chocolatey_package.rb
index c5a5d827a2..dbd72b9dc7 100644
--- a/lib/chef/resource/chocolatey_package.rb
+++ b/lib/chef/resource/chocolatey_package.rb
@@ -28,7 +28,7 @@ class Chef
" on the Microsoft Windows platform."
introduced "12.7"
- allowed_actions :install, :upgrade, :remove, :uninstall, :purge, :reconfig
+ allowed_actions :install, :upgrade, :remove, :purge, :reconfig
# windows can't take Array options yet
property :options, String
diff --git a/spec/unit/provider/package/chocolatey_spec.rb b/spec/unit/provider/package/chocolatey_spec.rb
index afc068041d..ff9dc3ca6b 100644
--- a/spec/unit/provider/package/chocolatey_spec.rb
+++ b/spec/unit/provider/package/chocolatey_spec.rb
@@ -439,19 +439,6 @@ munin-node|1.6.1.20130823
expect(new_resource).to be_updated_by_last_action
end
end
-
- describe "#action_uninstall" do
- it "should call :remove with a deprecation warning" do
- Chef::Config[:treat_deprecation_warnings_as_errors] = false
- expect(Chef::Log).to receive(:deprecation).with(/please use :remove/)
- allow_remote_list(["ConEmu"])
- new_resource.package_name("ConEmu")
- provider.load_current_resource
- expect(provider).to receive(:remove_package)
- provider.run_action(:uninstall)
- expect(new_resource).to be_updated_by_last_action
- end
- end
end
describe "behavior when Chocolatey is not installed" do