diff --git a/test/acceptance/ssh_test.rb b/test/acceptance/ssh_test.rb new file mode 100644 index 000000000..3bbaf8b8c --- /dev/null +++ b/test/acceptance/ssh_test.rb @@ -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 diff --git a/test/acceptance/up_basic_test.rb b/test/acceptance/up_basic_test.rb index 0e287f0f8..abb3a58ec 100644 --- a/test/acceptance/up_basic_test.rb +++ b/test/acceptance/up_basic_test.rb @@ -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: