summaryrefslogtreecommitdiff
path: root/spec/unit/knife
diff options
context:
space:
mode:
authorMarc Chamberland <chamberland.marc@gmail.com>2020-05-15 16:44:22 -0400
committerMarc Chamberland <chamberland.marc@gmail.com>2020-05-16 11:48:51 -0400
commit8c75291f3f70bfb25547369eb9cf9a50cf74433d (patch)
treee49fa5424f2c84586c809b09125b97e59a5ded96 /spec/unit/knife
parentb84d384a058d2159c610771beccfe7728c28a688 (diff)
downloadchef-8c75291f3f70bfb25547369eb9cf9a50cf74433d.tar.gz
fix windows bootstrap; replicate https://github.com/chef/chef/pull/9839 by Chad Jessup
This fixes bootstrapping on Windows. All credit goes to Chad Jessup <chad.jessup@gmail.com> but since the original PR was left without DCO I'm replicating it here, with valid DCO. Signed-off-by: Marc Chamberland <chamberland.marc@gmail.com>
Diffstat (limited to 'spec/unit/knife')
-rw-r--r--spec/unit/knife/core/windows_bootstrap_context_spec.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/unit/knife/core/windows_bootstrap_context_spec.rb b/spec/unit/knife/core/windows_bootstrap_context_spec.rb
index 656b05b905..e0ca7f17ab 100644
--- a/spec/unit/knife/core/windows_bootstrap_context_spec.rb
+++ b/spec/unit/knife/core/windows_bootstrap_context_spec.rb
@@ -181,6 +181,12 @@ describe Chef::Knife::Core::WindowsBootstrapContext do
end
end
+ describe "#start_chef" do
+ it "returns the expected string" do
+ expect(bootstrap_context.start_chef).to match(%r{SET \"PATH=%SystemRoot%\\system32;%SystemRoot%;%SystemRoot%\\System32\\Wbem;%SYSTEMROOT%\\System32\\WindowsPowerShell\\v1.0\\;C:\\ruby\\bin;C:\/opscode\/chef\\bin;C:\/opscode\/chef\\embedded\\bin\;%PATH%\"\n})
+ end
+ end
+
describe "msi_url" do
context "when msi_url config option is not set" do
let(:config) { { channel: "stable" } }