diff options
author | Florian Wininger <fw.centrale@gmail.com> | 2022-04-20 22:02:17 +0200 |
---|---|---|
committer | Florian Wininger <fw.centrale@gmail.com> | 2022-04-20 22:28:41 +0200 |
commit | 8d616a1b33561d5ad1bbd33a99293606a77b4019 (patch) | |
tree | cee0b435e344911af4e4bd8adf1c5ce58a35aec5 | |
parent | 85ebe31697d0ca2fae1542b952a83aea10e367c1 (diff) | |
download | net-ssh-8d616a1b33561d5ad1bbd33a99293606a77b4019.tar.gz |
Test all kex
-rw-r--r-- | test/integration/test_key_exchange.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/integration/test_key_exchange.rb b/test/integration/test_key_exchange.rb new file mode 100644 index 0000000..a3456f5 --- /dev/null +++ b/test/integration/test_key_exchange.rb @@ -0,0 +1,16 @@ +require_relative 'common' +require 'net/ssh' + +class TestKeyExchange < NetSSHTest + include IntegrationTestHelpers + + Net::SSH::Transport::Algorithms::DEFAULT_ALGORITHMS[:kex].each do |kex| + define_method("test_kex_#{kex}") do + ret = Net::SSH.start("localhost", "net_ssh_1", password: 'foopwd', kex: kex) do |ssh| + ssh.exec! "echo 'foo'" + end + assert_equal "foo\n", ret + assert_equal 0, ret.exitstatus + end + end +end |