summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc A. Paradise <marc.paradise@gmail.com>2019-04-19 20:56:06 -0400
committerMarc A. Paradise <marc.paradise@gmail.com>2019-04-24 13:29:00 -0400
commit83294d31fa2c8d06d6930636ba4620b1743160fa (patch)
tree7958bc3656c8eacebab45d6641217d6cf38e349e
parent9d1eaa551de4a2950020e21b469b15d3c4f9cd9f (diff)
downloadchef-83294d31fa2c8d06d6930636ba4620b1743160fa.tar.gz
Relax the match for validation key path
Because we expand the path to the validation key, the exact match of "/blah" under Windows was failing, because it expanded to "C:/blah" Signed-off-by: Marc A. Paradise <marc.paradise@gmail.com>
-rw-r--r--spec/unit/knife/bootstrap_spec.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/unit/knife/bootstrap_spec.rb b/spec/unit/knife/bootstrap_spec.rb
index db85eafde7..d9621e0219 100644
--- a/spec/unit/knife/bootstrap_spec.rb
+++ b/spec/unit/knife/bootstrap_spec.rb
@@ -1661,7 +1661,7 @@ describe Chef::Knife::Bootstrap do
before do
Chef::Config[:validation_key] = "/blah"
allow(vault_handler_mock).to receive(:doing_chef_vault?).and_return false
- allow(File).to receive(:exist?).with("/blah").and_return false
+ allow(File).to receive(:exist?).with(/\/blah/).and_return false
end
it_behaves_like "creating the client locally"
end
@@ -1669,7 +1669,7 @@ describe Chef::Knife::Bootstrap do
context "when a valid validation key is given and we're doing old-style client creation" do
before do
Chef::Config[:validation_key] = "/blah"
- allow(File).to receive(:exist?).with("/blah").and_return true
+ allow(File).to receive(:exist?).with(/\/blah/).and_return true
allow(vault_handler_mock).to receive(:doing_chef_vault?).and_return false
end