replaced echo script with hello script for ssh testing.
This commit is contained in:
parent
86afb437c0
commit
574b5f7350
7
test/fixtures/echo_the_dolphin.rb
vendored
7
test/fixtures/echo_the_dolphin.rb
vendored
@ -1,7 +0,0 @@
|
||||
#!/usr/bin/env ruby
|
||||
# Echoes back to the sender
|
||||
$stdout.sync = true
|
||||
while line = $stdin.get
|
||||
$stdout.write line
|
||||
end
|
||||
|
3
test/fixtures/hello_world.rb
vendored
Normal file
3
test/fixtures/hello_world.rb
vendored
Normal file
@ -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(
|
||||
'localhost', # connect to this machine
|
||||
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
|
||||
ssh.write message
|
||||
assert_equal message.text, ssh.gets.text
|
||||
response = ssh.gets
|
||||
assert_equal "Hello World", response.text
|
||||
ssh.close
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user