diff options
| author | Marc Chamberland <chamberland.marc@gmail.com> | 2020-05-15 16:44:22 -0400 |
|---|---|---|
| committer | Marc Chamberland <chamberland.marc@gmail.com> | 2020-05-16 11:48:51 -0400 |
| commit | 8c75291f3f70bfb25547369eb9cf9a50cf74433d (patch) | |
| tree | e49fa5424f2c84586c809b09125b97e59a5ded96 /spec/unit/knife | |
| parent | b84d384a058d2159c610771beccfe7728c28a688 (diff) | |
| download | chef-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.rb | 6 |
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" } } |
