2019-10-30 20:53:18 +01:00
|
|
|
From e1eaa4583e58d802f0c2339c959b5becb6a2c49f Mon Sep 17 00:00:00 2001
|
2019-04-11 20:03:08 +02:00
|
|
|
From: =?UTF-8?q?Dan=20=C4=8Cerm=C3=A1k?= <dcermak@suse.com>
|
|
|
|
Date: Thu, 14 Mar 2019 00:25:05 +0100
|
2019-12-19 14:57:41 +01:00
|
|
|
Subject: [PATCH 09/16] Fix unit tests for GuestLinux::Cap::Halt
|
2019-04-11 20:03:08 +02:00
|
|
|
|
|
|
|
This test fails since we patch `shutdown -h now` to be `shutdown -h now &`
|
|
|
|
instead.
|
|
|
|
---
|
|
|
|
test/unit/plugins/guests/linux/cap/halt_test.rb | 6 +++---
|
|
|
|
1 file changed, 3 insertions(+), 3 deletions(-)
|
|
|
|
|
|
|
|
diff --git a/test/unit/plugins/guests/linux/cap/halt_test.rb b/test/unit/plugins/guests/linux/cap/halt_test.rb
|
|
|
|
index 81f682aa1..70d2603b9 100644
|
|
|
|
--- a/test/unit/plugins/guests/linux/cap/halt_test.rb
|
|
|
|
+++ b/test/unit/plugins/guests/linux/cap/halt_test.rb
|
|
|
|
@@ -22,19 +22,19 @@ describe "VagrantPlugins::GuestLinux::Cap::Halt" do
|
|
|
|
let(:cap) { caps.get(:halt) }
|
|
|
|
|
|
|
|
it "runs the shutdown command" do
|
|
|
|
- comm.expect_command("shutdown -h now")
|
|
|
|
+ comm.expect_command("shutdown -h now &")
|
|
|
|
cap.halt(machine)
|
|
|
|
end
|
|
|
|
|
|
|
|
it "does not raise an IOError" do
|
|
|
|
- comm.stub_command("shutdown -h now", raise: IOError)
|
|
|
|
+ comm.stub_command("shutdown -h now &", raise: IOError)
|
|
|
|
expect {
|
|
|
|
cap.halt(machine)
|
|
|
|
}.to_not raise_error
|
|
|
|
end
|
|
|
|
|
|
|
|
it "does not raise a SSHDisconnected" do
|
|
|
|
- comm.stub_command("shutdown -h now", raise: Vagrant::Errors::SSHDisconnected)
|
|
|
|
+ comm.stub_command("shutdown -h now &", raise: Vagrant::Errors::SSHDisconnected)
|
|
|
|
expect {
|
|
|
|
cap.halt(machine)
|
|
|
|
}.to_not raise_error
|
|
|
|
--
|
2019-11-13 13:42:33 +01:00
|
|
|
2.24.0
|
2019-04-11 20:03:08 +02:00
|
|
|
|