From c76e45a75a3bc9218a7213744bce11b2ce022ce8 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Wed, 18 Nov 2015 17:11:05 -0800 Subject: [PATCH] fix some tests --- test/unit/plugins/communicators/winrm/communicator_test.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/unit/plugins/communicators/winrm/communicator_test.rb b/test/unit/plugins/communicators/winrm/communicator_test.rb index 554290e56..79a873d72 100644 --- a/test/unit/plugins/communicators/winrm/communicator_test.rb +++ b/test/unit/plugins/communicators/winrm/communicator_test.rb @@ -88,7 +88,7 @@ describe VagrantPlugins::CommunicatorWinRM::Communicator do it "wraps command in elevated shell script when elevated is true" do expect(shell).to receive(:upload).with(kind_of(String), "c:/tmp/vagrant-elevated-shell.ps1") expect(shell).to receive(:powershell) do |cmd| - expect(cmd).to eq("powershell -executionpolicy bypass -file \"c:/tmp/vagrant-elevated-shell.ps1\" " + + expect(cmd).to eq("powershell -executionpolicy bypass -file 'c:/tmp/vagrant-elevated-shell.ps1' " + "-username 'vagrant' -password 'password' -encoded_command 'JABQAHIAbwBnAHIAZQBzAHMAUAByAGUAZgBlAHIAZQBuAGMAZQA9ACcAUwBpAGwAZQBuAHQAbAB5AEMAbwBuAHQAaQBuAHUAZQAnADsAIABkAGkAcgA7ACAAZQB4AGkAdAAgACQATABBAFMAVABFAFgASQBUAEMATwBEAEUA' -execution_time_limit 'PT2H'") end.and_return({ exitcode: 0 }) expect(subject.execute("dir", { elevated: true })).to eq(0) @@ -97,8 +97,8 @@ describe VagrantPlugins::CommunicatorWinRM::Communicator do it "wraps command in elevated and interactive shell script when elevated and interactive are true" do expect(shell).to receive(:upload).with(kind_of(String), "c:/tmp/vagrant-elevated-shell.ps1") expect(shell).to receive(:powershell) do |cmd| - expect(cmd).to eq("powershell -executionpolicy bypass -file \"c:/tmp/vagrant-elevated-shell.ps1\" " + - "-username \"vagrant\" -password \"password\" -encoded_command \"ZABpAHIAOwAgAGUAeABpAHQAIAAkAEwAQQBTAFQARQBYAEkAVABDAE8ARABFAA==\"") + expect(cmd).to eq("powershell -executionpolicy bypass -file 'c:/tmp/vagrant-elevated-shell.ps1' " + + "-username 'vagrant' -password 'password' -encoded_command 'ZABpAHIAOwAgAGUAeABpAHQAIAAkAEwAQQBTAFQARQBYAEkAVABDAE8ARABFAA=='") end.and_return({ exitcode: 0 }) expect(subject.execute("dir", { elevated: true, interactive: true })).to eq(0) end