Move `vagrant ssh` test into ssh_test.rb

This commit is contained in:
Mitchell Hashimoto 2011-11-06 22:17:27 -08:00
parent 641a581d6b
commit 3412a11c51
2 changed files with 21 additions and 18 deletions

View File

@ -0,0 +1,21 @@
require File.expand_path("../base", __FILE__)
class SSHTest < AcceptanceTest
should "bring up a running virtual machine and be able to SSH into it" do
assert_execute("vagrant", "box", "add", "base", config.boxes["default"])
assert_execute("vagrant", "init")
assert_execute("vagrant", "up")
outputted = false
result = assert_execute("vagrant", "ssh") do |io_type, data|
if io_type == :stdin and !outputted
data.puts("echo hello")
data.puts("exit")
outputted = true
end
end
assert_equal("hello", result.stdout.chomp,
"Vagrant should bring up a virtual machine and be able to SSH in.")
end
end

View File

@ -18,24 +18,6 @@ class UpBasicTest < AcceptanceTest
"Virtual machine should be running")
end
should "bring up a running virtual machine and be able to SSH into it" do
assert_execute("vagrant", "box", "add", "base", config.boxes["default"])
assert_execute("vagrant", "init")
assert_execute("vagrant", "up")
outputted = false
result = assert_execute("vagrant", "ssh") do |io_type, data|
if io_type == :stdin and !outputted
data.puts("echo hello")
data.puts("exit")
outputted = true
end
end
assert_equal("hello", result.stdout.chomp,
"Vagrant should bring up a virtual machine and be able to SSH in.")
end
=begin
TODO: