replaced echo script with hello script for ssh testing.
This commit is contained in:
parent
86afb437c0
commit
574b5f7350
|
@ -1,7 +0,0 @@
|
||||||
#!/usr/bin/env ruby
|
|
||||||
# Echoes back to the sender
|
|
||||||
$stdout.sync = true
|
|
||||||
while line = $stdin.get
|
|
||||||
$stdout.write line
|
|
||||||
end
|
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
#!/usr/bin/env ruby
|
||||||
|
$stdout.write "{:class=>Hydra::Messages::TestMessage, :text=>\"Hello World\"}\n"
|
||||||
|
$stdout.flush
|
|
@ -5,11 +5,10 @@ class SSHTest < Test::Unit::TestCase
|
||||||
ssh = Hydra::SSH.new(
|
ssh = Hydra::SSH.new(
|
||||||
'localhost', # connect to this machine
|
'localhost', # connect to this machine
|
||||||
File.expand_path(File.join(File.dirname(__FILE__))), # move to the test directory
|
File.expand_path(File.join(File.dirname(__FILE__))), # move to the test directory
|
||||||
"ruby fixtures/echo_the_dolphin.rb"
|
"ruby fixtures/hello_world.rb"
|
||||||
)
|
)
|
||||||
message = Hydra::Messages::TestMessage.new
|
response = ssh.gets
|
||||||
ssh.write message
|
assert_equal "Hello World", response.text
|
||||||
assert_equal message.text, ssh.gets.text
|
|
||||||
ssh.close
|
ssh.close
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue