Test: `vagrant up` should bring up a machine ready for SSH

This commit is contained in:
Mitchell Hashimoto 2011-11-06 18:27:31 -08:00
parent e86628c023
commit 797f124e6d
1 changed files with 17 additions and 14 deletions

View File

@ -18,19 +18,10 @@ class BasicUpTest < AcceptanceTest
"Virtual machine should be running") "Virtual machine should be running")
end end
=begin should "bring up a running virtual machine and be able to SSH into it" do
assert_execute("vagrant", "box", "add", "base", config.boxes["default"])
TODO: assert_execute("vagrant", "init")
assert_execute("vagrant", "up")
should "be able to run if `Vagrantfile` is in parent directory"
should "bring up a running virtual machine and be able to SSH into it"
should "bring up a running virtual machine and have a `/vagrant' shared folder by default"
should "destroy a running virtual machine"
should "save then restore a virtual machine using `vagrant up`"
should "halt then start a virtual machine using `vagrant up`"
This shows how we can test that SSH is working. We'll use
this code later, but for now have no test that exercises it.
outputted = false outputted = false
result = assert_execute("vagrant", "ssh") do |io_type, data| result = assert_execute("vagrant", "ssh") do |io_type, data|
@ -42,6 +33,18 @@ this code later, but for now have no test that exercises it.
end end
assert_equal("hello", result.stdout.chomp, assert_equal("hello", result.stdout.chomp,
"Vagrant should bring up a virtual machine and be able to SSH in." "Vagrant should bring up a virtual machine and be able to SSH in.")
end
=begin
TODO:
should "be able to run if `Vagrantfile` is in parent directory"
should "bring up a running virtual machine and have a `/vagrant' shared folder by default"
should "destroy a running virtual machine"
should "save then restore a virtual machine using `vagrant up`"
should "halt then start a virtual machine using `vagrant up`"
=end =end
end end