summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaire McQuin <mcquin@users.noreply.github.com>2014-08-07 16:35:05 -0700
committerClaire McQuin <mcquin@users.noreply.github.com>2014-08-07 16:35:05 -0700
commit0d06d1337e5d698bf59e0ecb0010ed3f1c00a0f0 (patch)
tree851aecf321975bed208b941999b753f7cc3dc117
parent2fb41adaf4cdd3cb80bfc2f74e2111363b03bd80 (diff)
parent5f1603ba5b53ad396937f93591129ae02fba7703 (diff)
downloadchef-0d06d1337e5d698bf59e0ecb0010ed3f1c00a0f0.tar.gz
Merge pull request #1667 from parabuzzle/fix_force_flag
[CHEF-1652] Fix force flag
-rw-r--r--lib/chef/knife/client_delete.rb2
-rw-r--r--spec/unit/knife/client_delete_spec.rb8
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/chef/knife/client_delete.rb b/lib/chef/knife/client_delete.rb
index 1902145c8d..d7d302ee1d 100644
--- a/lib/chef/knife/client_delete.rb
+++ b/lib/chef/knife/client_delete.rb
@@ -47,7 +47,7 @@ class Chef
object = Chef::ApiClient.load(@client_name)
if object.validator
unless config[:delete_validators]
- ui.fatal("You must specify --force to delete the validator client #{@client_name}")
+ ui.fatal("You must specify --delete-validators to delete the validator client #{@client_name}")
exit 2
end
end
diff --git a/spec/unit/knife/client_delete_spec.rb b/spec/unit/knife/client_delete_spec.rb
index 01b49b3d7c..c7908a0934 100644
--- a/spec/unit/knife/client_delete_spec.rb
+++ b/spec/unit/knife/client_delete_spec.rb
@@ -50,7 +50,7 @@ describe Chef::Knife::ClientDelete do
Chef::ApiClient.should_receive(:load).and_return(@client)
end
- it 'should delete non-validator client if --force is not set' do
+ it 'should delete non-validator client if --delete-validators is not set' do
@knife.config[:delete_validators] = false
@client.should_receive(:destroy).and_return(@client)
@knife.should_receive(:msg)
@@ -58,7 +58,7 @@ describe Chef::Knife::ClientDelete do
@knife.run
end
- it 'should delete non-validator client if --force is set' do
+ it 'should delete non-validator client if --delete-validators is set' do
@knife.config[:delete_validators] = true
@client.should_receive(:destroy).and_return(@client)
@knife.should_receive(:msg)
@@ -66,13 +66,13 @@ describe Chef::Knife::ClientDelete do
@knife.run
end
- it 'should not delete validator client if --force is not set' do
+ it 'should not delete validator client if --delete-validators is not set' do
@client.validator(true)
@knife.ui.should_receive(:fatal)
lambda { @knife.run}.should raise_error(SystemExit)
end
- it 'should delete validator client if --force is set' do
+ it 'should delete validator client if --delete-validators is set' do
@knife.config[:delete_validators] = true
@client.should_receive(:destroy).and_return(@client)
@knife.should_receive(:msg)