summaryrefslogtreecommitdiff
path: root/spec/unit/knife
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2020-08-13 19:37:58 -0700
committerLamont Granquist <lamont@scriptkiddie.org>2020-08-14 16:34:46 -0700
commit9598bd817e09c3cfeddb70071ba1c088d6724de9 (patch)
tree1382f111d616b22ade0626d49d1feb681672c6a2 /spec/unit/knife
parent654f05b3a03aecdcb25c6a2c9593b13d3163362a (diff)
downloadchef-9598bd817e09c3cfeddb70071ba1c088d6724de9.tar.gz
fix the real issue
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'spec/unit/knife')
-rw-r--r--spec/unit/knife/core/windows_bootstrap_context_spec.rb19
1 files changed, 12 insertions, 7 deletions
diff --git a/spec/unit/knife/core/windows_bootstrap_context_spec.rb b/spec/unit/knife/core/windows_bootstrap_context_spec.rb
index 77e16f1a4a..ab38233714 100644
--- a/spec/unit/knife/core/windows_bootstrap_context_spec.rb
+++ b/spec/unit/knife/core/windows_bootstrap_context_spec.rb
@@ -149,12 +149,12 @@ describe Chef::Knife::Core::WindowsBootstrapContext do
describe "#config_content" do
before do
bootstrap_context.instance_variable_set(:@chef_config, Mash.new(config_log_level: :info,
- config_log_location: STDOUT,
- chef_server_url: "http://chef.example.com:4444",
- validation_client_name: "chef-validator-testing",
- file_cache_path: "c:/chef/cache",
- file_backup_path: "c:/chef/backup",
- cache_options: ({ path: "c:/chef/cache/checksums", skip_expires: true })))
+ config_log_location: STDOUT,
+ chef_server_url: "http://chef.example.com:4444",
+ validation_client_name: "chef-validator-testing",
+ file_cache_path: "c:/chef/cache",
+ file_backup_path: "c:/chef/backup",
+ cache_options: ({ path: "c:/chef/cache/checksums", skip_expires: true })))
end
it "generates the config file data" do
@@ -183,7 +183,12 @@ describe Chef::Knife::Core::WindowsBootstrapContext do
describe "#start_chef" do
it "returns the expected string" do
- expect(bootstrap_context.start_chef).to match(/SET "PATH=%SYSTEM32%;%SystemRoot%;%SYSTEM32%\\Wbem;%SYSTEM32%\\WindowsPowerShell\\v1.0\\;C:\\ruby\\bin;C:\\opscode\\chef\\bin;C:\\opscode\\chef\\embedded\\bin;%PATH%"/)
+ expect(bootstrap_context.start_chef).to eq(
+ <<~EOH
+ SET "PATH=%SYSTEM32%;%SystemRoot%;%SYSTEM32%\\Wbem;%SYSTEM32%\\WindowsPowerShell\\v1.0\\;C:\\ruby\\bin;C:\\opscode\\chef\\bin;C:\\opscode\\chef\\embedded\\bin;%PATH%"
+ chef-client -c C:\\chef\\client.rb -j C:\\chef\\first-boot.json
+ EOH
+ )
end
end