test/runner_test.rb in hydra-0.7.0 vs test/runner_test.rb in hydra-0.7.2
- old
+ new
@@ -36,19 +36,24 @@
should "be able to run a runner over ssh" do
ssh = Hydra::SSH.new(
'localhost',
File.expand_path(File.join(File.dirname(__FILE__), '..', 'lib')),
- "ruby -e \"require 'rubygems'; require 'hydra'; Hydra::Runner.new(:io => Hydra::Stdio.new);\""
+ "ruby -e \"require 'rubygems'; require 'hydra'; Hydra::Runner.new(:io => Hydra::Stdio.new, :verbose => true);\""
)
assert ssh.gets.is_a?(Hydra::Messages::Runner::RequestFile)
ssh.write(Hydra::Messages::Worker::RunFile.new(:file => test_file))
# grab its response. This makes us wait for it to finish
+ echo = ssh.gets # get the ssh echo
response = ssh.gets
+
+ assert_equal Hydra::Messages::Runner::Results, response.class
# tell it to shut down
ssh.write(Hydra::Messages::Worker::Shutdown.new)
+
+ ssh.close
# ensure it ran
assert File.exists?(target_file)
assert_equal "HYDRA", File.read(target_file)
end