Test that `vagrant up` also works for resuming

This commit is contained in:
Mitchell Hashimoto 2011-11-24 16:21:21 -07:00
parent f9653bf8d2
commit d03744c5e1
1 changed files with 17 additions and 13 deletions

View File

@ -31,7 +31,10 @@ describe "vagrant suspend" do
result.stdout.should match_output(:status, "default", "saved")
end
it "is able to resume after the machine has been suspended" do
# These tests are parameterized since both "vagrant resume" and
# "vagrant up" should achieve the same result.
["resume", "up"].each do |command|
it "is able to resume after the machine has been suspended using #{command}" do
require_box("default")
assert_execute("vagrant", "box", "add", "base", box_path("default"))
@ -43,10 +46,11 @@ describe "vagrant suspend" do
result = assert_execute("vagrant", "status")
result.stdout.should match_output(:status, "default", "saved")
assert_execute("vagrant", "resume")
assert_execute("vagrant", command)
# Assert that the VM is once again running
result = assert_execute("vagrant", "status")
result.stdout.should match_output(:status, "default", "running")
end
end
end