diff options
author | Tim Smith <tsmith84@gmail.com> | 2016-03-06 15:36:18 -0800 |
---|---|---|
committer | Tim Smith <tsmith84@gmail.com> | 2016-03-06 18:52:58 -0800 |
commit | be22d615639c8667f4b29c8f352812fff348620f (patch) | |
tree | 00c4dc87d3cba290624ae8d587b2aad588e69559 | |
parent | 7e334f961c951c3df84cb24feb98b22607355bc0 (diff) | |
download | chef-be22d615639c8667f4b29c8f352812fff348620f.tar.gz |
Fix failing specs
-rw-r--r-- | lib/chef/knife/delete.rb | 2 | ||||
-rw-r--r-- | lib/chef/knife/download.rb | 2 | ||||
-rw-r--r-- | spec/integration/knife/delete_spec.rb | 4 | ||||
-rw-r--r-- | spec/integration/knife/download_spec.rb | 8 | ||||
-rw-r--r-- | spec/integration/knife/upload_spec.rb | 8 | ||||
-rw-r--r-- | spec/unit/knife/client_bulk_delete_spec.rb | 4 | ||||
-rw-r--r-- | spec/unit/knife/data_bag_show_spec.rb | 2 |
7 files changed, 15 insertions, 15 deletions
diff --git a/lib/chef/knife/delete.rb b/lib/chef/knife/delete.rb index ac162342a6..cf6ca09878 100644 --- a/lib/chef/knife/delete.rb +++ b/lib/chef/knife/delete.rb @@ -31,7 +31,7 @@ class Chef def run if name_args.length == 0 show_usage - ui.fatal("Must specify at least one argument. If you want to delete everything in this directory, type \"knife delete --recurse .\"") + ui.fatal("You must specify at least one argument. If you want to delete everything in this directory, run \"knife delete --recurse .\"") exit 1 end diff --git a/lib/chef/knife/download.rb b/lib/chef/knife/download.rb index b115b8ec8a..ac8420d468 100644 --- a/lib/chef/knife/download.rb +++ b/lib/chef/knife/download.rb @@ -49,7 +49,7 @@ class Chef def run if name_args.length == 0 show_usage - ui.fatal("You must specify at least one argument. If you want to download everything in this directory, type \"knife download .\"") + ui.fatal("You must specify at least one argument. If you want to download everything in this directory, run \"knife download .\"") exit 1 end diff --git a/spec/integration/knife/delete_spec.rb b/spec/integration/knife/delete_spec.rb index d8cb8d950f..1c69fbf9c9 100644 --- a/spec/integration/knife/delete_spec.rb +++ b/spec/integration/knife/delete_spec.rb @@ -643,7 +643,7 @@ EOM context "and cwd is at the top level" do before { cwd "." } it "knife delete fails" do - knife("delete").should_fail "FATAL: Must specify at least one argument. If you want to delete everything in this directory, type \"knife delete --recurse .\"\n", :stdout => /USAGE/ + knife("delete").should_fail "FATAL: You must specify at least one argument. If you want to delete everything in this directory, run \"knife delete --recurse .\"\n", :stdout => /USAGE/ knife("list -Rf /").should_succeed <<EOM clients clients/chef-validator.json @@ -856,7 +856,7 @@ EOM context "and cwd is at the top level" do before { cwd "." } it "knife delete fails" do - knife("delete").should_fail "FATAL: Must specify at least one argument. If you want to delete everything in this directory, type \"knife delete --recurse .\"\n", :stdout => /USAGE/ + knife("delete").should_fail "FATAL: You must specify at least one argument. If you want to delete everything in this directory, run \"knife delete --recurse .\"\n", :stdout => /USAGE/ knife("list -Rf /").should_succeed <<EOM clients clients/chef-validator.json diff --git a/spec/integration/knife/download_spec.rb b/spec/integration/knife/download_spec.rb index d9a3f4fe87..39bf8d1c42 100644 --- a/spec/integration/knife/download_spec.rb +++ b/spec/integration/knife/download_spec.rb @@ -255,7 +255,7 @@ EOM end it "knife download with no parameters reports an error" do - knife("download").should_fail "FATAL: Must specify at least one argument. If you want to download everything in this directory, type \"knife download .\"\n", :stdout => /USAGE/ + knife("download").should_fail "FATAL: You must specify at least one argument. If you want to download everything in this directory, run \"knife download .\"\n", :stdout => /USAGE/ end end end @@ -383,7 +383,7 @@ EOM cwd "data_bags" end it "knife download fails" do - knife("download").should_fail "FATAL: Must specify at least one argument. If you want to download everything in this directory, type \"knife download .\"\n", :stdout => /USAGE/ + knife("download").should_fail "FATAL: You must specify at least one argument. If you want to download everything in this directory, run \"knife download .\"\n", :stdout => /USAGE/ end it "knife download --purge . downloads everything" do knife("download --purge .").should_succeed <<EOM @@ -760,7 +760,7 @@ EOM cwd "." end it "knife download with no parameters reports an error" do - knife("download").should_fail "FATAL: Must specify at least one argument. If you want to download everything in this directory, type \"knife download .\"\n", :stdout => /USAGE/ + knife("download").should_fail "FATAL: You must specify at least one argument. If you want to download everything in this directory, run \"knife download .\"\n", :stdout => /USAGE/ end end end @@ -879,7 +879,7 @@ EOM cwd "data_bags" end it "knife download fails" do - knife("download").should_fail "FATAL: Must specify at least one argument. If you want to download everything in this directory, type \"knife download .\"\n", :stdout => /USAGE/ + knife("download").should_fail "FATAL: You must specify at least one argument. If you want to download everything in this directory, run \"knife download .\"\n", :stdout => /USAGE/ end it "knife download --purge . downloads everything" do knife("download --purge .").should_succeed <<EOM diff --git a/spec/integration/knife/upload_spec.rb b/spec/integration/knife/upload_spec.rb index 9a1717b2d9..038bbad216 100644 --- a/spec/integration/knife/upload_spec.rb +++ b/spec/integration/knife/upload_spec.rb @@ -260,7 +260,7 @@ EOM end it "knife upload with no parameters reports an error" do - knife("upload").should_fail "FATAL: Must specify at least one argument. If you want to upload everything in this directory, type \"knife upload .\"\n", :stdout => /USAGE/ + knife("upload").should_fail "FATAL: You must specify at least one argument. If you want to upload everything in this directory, run \"knife upload .\"\n", :stdout => /USAGE/ end end end @@ -408,7 +408,7 @@ EOM end it "knife upload fails" do - knife("upload").should_fail "FATAL: Must specify at least one argument. If you want to upload everything in this directory, type \"knife upload .\"\n", :stdout => /USAGE/ + knife("upload").should_fail "FATAL: You must specify at least one argument. If you want to upload everything in this directory, run \"knife upload .\"\n", :stdout => /USAGE/ end it "knife upload --purge . uploads everything" do @@ -911,7 +911,7 @@ EOM cwd "." end it "knife upload with no parameters reports an error" do - knife("upload").should_fail "FATAL: Must specify at least one argument. If you want to upload everything in this directory, type \"knife upload .\"\n", :stdout => /USAGE/ + knife("upload").should_fail "FATAL: You must specify at least one argument. If you want to upload everything in this directory, run \"knife upload .\"\n", :stdout => /USAGE/ end end end @@ -1013,7 +1013,7 @@ EOM cwd "data_bags" end it "knife upload fails" do - knife("upload").should_fail "FATAL: Must specify at least one argument. If you want to upload everything in this directory, type \"knife upload .\"\n", :stdout => /USAGE/ + knife("upload").should_fail "FATAL: You must specify at least one argument. If you want to upload everything in this directory, run \"knife upload .\"\n", :stdout => /USAGE/ end it "knife upload --purge . uploads everything" do knife("upload --purge .").should_succeed <<EOM diff --git a/spec/unit/knife/client_bulk_delete_spec.rb b/spec/unit/knife/client_bulk_delete_spec.rb index 096fba632a..a9b18c9086 100644 --- a/spec/unit/knife/client_bulk_delete_spec.rb +++ b/spec/unit/knife/client_bulk_delete_spec.rb @@ -108,8 +108,8 @@ describe Chef::Knife::ClientBulkDelete do describe "without --delete-validators" do it "should mention that validator clients wont be deleted" do knife.run - expect(stdout).to include("Following clients are validators and will not be deleted.") - info = stdout.index "Following clients are validators and will not be deleted." + expect(stdout).to include("The following clients are validators and will not be deleted:") + info = stdout.index "The following clients are validators and will not be deleted:" val = stdout.index "myorg-validator" expect(val > info).to be_truthy end diff --git a/spec/unit/knife/data_bag_show_spec.rb b/spec/unit/knife/data_bag_show_spec.rb index 18768ca476..0672b8bb33 100644 --- a/spec/unit/knife/data_bag_show_spec.rb +++ b/spec/unit/knife/data_bag_show_spec.rb @@ -80,7 +80,7 @@ qux: http://localhost:4000/data/bag_o_data/qux} it "displays the encrypted data bag when the secret is not provided" do expect(knife).to receive(:encryption_secret_provided_ignore_encrypt_flag?).and_return(false) expect(Chef::DataBagItem).to receive(:load).with(bag_name, item_name).and_return(data_bag_with_encoded_hash) - expect(knife.ui).to receive(:warn).with("Encrypted data bag detected, but no secret provided for decoding. Displaying encrypted data.") + expect(knife.ui).to receive(:warn).with("Encrypted data bag detected, but no secret provided for decoding. Displaying encrypted data.") knife.run expect(stdout.string.strip).to include("baz", "qux", "cipher") |