summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorNickolas Means <nick@activeprospect.com>2011-06-28 13:34:49 -0500
committerNickolas Means <nick@activeprospect.com>2011-06-28 13:34:49 -0500
commitad5c8e2cc05b5b9b3212a91205494e1d07f13cf9 (patch)
tree3a576c819fe3bd9e4d646e667a6dc1f12c48a9e9 /test
parentf722c6eac8ed64b0f84715ebd15ead202bd94200 (diff)
downloadnet-ssh-ad5c8e2cc05b5b9b3212a91205494e1d07f13cf9.tar.gz
Add BindAddress support to Net::SSH.
Allow specification of :bind_address as an option on Net::SSH.start or use BindAddress option on system OpenSSH config files if specified. Parameter is used in initializing TCPSocket to initiate connection to remote machine. :bind_address is discarded if :proxy is specified as the Proxy mechanism doesn't support passing of :bind_address as an option.
Diffstat (limited to 'test')
-rw-r--r--test/test_config.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/test_config.rb b/test/test_config.rb
index 361c067..5fc9795 100644
--- a/test/test_config.rb
+++ b/test/test_config.rb
@@ -67,6 +67,7 @@ class TestConfig < Test::Unit::TestCase
def test_translate_should_correctly_translate_from_openssh_to_net_ssh_names
open_ssh = {
+ 'bindaddress' => "127.0.0.1",
'ciphers' => "a,b,c",
'compression' => true,
'compressionlevel' => 6,
@@ -95,6 +96,7 @@ class TestConfig < Test::Unit::TestCase
assert_equal %w(j k l), net_ssh[:hmac]
assert_equal 1234, net_ssh[:port]
assert_equal 1024, net_ssh[:rekey_limit]
+ assert_equal "127.0.0.1", net_ssh[:bind_address]
end
def test_load_with_plus_sign_hosts
@@ -114,4 +116,4 @@ class TestConfig < Test::Unit::TestCase
def config(name)
"test/configs/#{name}"
end
-end \ No newline at end of file
+end