summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMiklós Fazekas <mfazekas@szemafor.com>2016-03-30 08:48:11 +0200
committerMiklós Fazekas <mfazekas@szemafor.com>2016-03-30 08:48:11 +0200
commit6ef1365e40f2eebf27eadbc6b942230afcdb8776 (patch)
tree6db037958dd89f858b584dd52b11b96687f80bc8 /test
parentc831d0d8355b3432b4f301134efba78acb86435e (diff)
parent985d35fb970298900f0756605e419c12302ff26c (diff)
downloadnet-ssh-6ef1365e40f2eebf27eadbc6b942230afcdb8776.tar.gz
Merge pull request #341 from mfazekas/close-chns-on-tr-close
Close chns on tr close
Diffstat (limited to 'test')
-rw-r--r--test/authentication/methods/test_abstract.rb2
-rw-r--r--test/authentication/methods/test_hostbased.rb2
-rw-r--r--test/authentication/methods/test_keyboard_interactive.rb2
-rw-r--r--test/authentication/methods/test_none.rb2
-rw-r--r--test/authentication/methods/test_password.rb2
-rw-r--r--test/authentication/methods/test_publickey.rb2
-rw-r--r--test/authentication/test_agent.rb2
-rw-r--r--test/authentication/test_ed25519.rb2
-rw-r--r--test/authentication/test_key_manager.rb2
-rw-r--r--test/authentication/test_session.rb2
-rw-r--r--test/common.rb15
-rw-r--r--test/connection/test_channel.rb2
-rw-r--r--test/connection/test_session.rb2
-rw-r--r--test/integration/common.rb5
-rw-r--r--test/integration/playbook.yml2
-rw-r--r--test/integration/test_ed25519_pkeys.rb2
-rw-r--r--test/integration/test_forward.rb2
-rw-r--r--test/integration/test_id_rsa_keys.rb2
-rw-r--r--test/integration/test_proxy.rb2
-rw-r--r--test/manual/test_pageant.rb7
-rw-r--r--test/start/test_connection.rb2
-rw-r--r--test/start/test_options.rb2
-rw-r--r--test/start/test_transport.rb2
-rw-r--r--test/start/test_user_nil.rb2
-rw-r--r--test/test_buffer.rb2
-rw-r--r--test/test_buffered_io.rb2
-rw-r--r--test/test_config.rb2
-rw-r--r--test/test_key_factory.rb2
-rw-r--r--test/test_known_hosts.rb2
-rw-r--r--test/transport/hmac/test_md5.rb2
-rw-r--r--test/transport/hmac/test_none.rb2
-rw-r--r--test/transport/hmac/test_ripemd160.rb2
-rw-r--r--test/transport/hmac/test_sha1.rb2
-rw-r--r--test/transport/hmac/test_sha2_256.rb2
-rw-r--r--test/transport/hmac/test_sha2_512.rb2
-rw-r--r--test/transport/kex/test_diffie_hellman_group1_sha1.rb2
-rw-r--r--test/transport/kex/test_ecdh_sha2_nistp256.rb2
-rw-r--r--test/transport/test_algorithms.rb2
-rw-r--r--test/transport/test_cipher_factory.rb2
-rw-r--r--test/transport/test_hmac.rb2
-rw-r--r--test/transport/test_identity_cipher.rb2
-rw-r--r--test/transport/test_packet_stream.rb2
-rw-r--r--test/transport/test_server_version.rb2
-rw-r--r--test/transport/test_session.rb2
-rw-r--r--test/transport/test_state.rb2
-rw-r--r--test/verifiers/test_secure.rb2
46 files changed, 62 insertions, 51 deletions
diff --git a/test/authentication/methods/test_abstract.rb b/test/authentication/methods/test_abstract.rb
index f0a18d5..c6a51df 100644
--- a/test/authentication/methods/test_abstract.rb
+++ b/test/authentication/methods/test_abstract.rb
@@ -4,7 +4,7 @@ require 'net/ssh/authentication/methods/abstract'
module Authentication; module Methods
- class TestAbstract < Test::Unit::TestCase
+ class TestAbstract < NetSSHTest
include Common
def test_constructor_should_set_defaults
diff --git a/test/authentication/methods/test_hostbased.rb b/test/authentication/methods/test_hostbased.rb
index 599d402..dc831b1 100644
--- a/test/authentication/methods/test_hostbased.rb
+++ b/test/authentication/methods/test_hostbased.rb
@@ -4,7 +4,7 @@ require 'authentication/methods/common'
module Authentication; module Methods
- class TestHostbased < Test::Unit::TestCase
+ class TestHostbased < NetSSHTest
include Common
def test_authenticate_should_return_false_when_no_key_manager_has_been_set
diff --git a/test/authentication/methods/test_keyboard_interactive.rb b/test/authentication/methods/test_keyboard_interactive.rb
index e209a64..8e02767 100644
--- a/test/authentication/methods/test_keyboard_interactive.rb
+++ b/test/authentication/methods/test_keyboard_interactive.rb
@@ -4,7 +4,7 @@ require 'authentication/methods/common'
module Authentication; module Methods
- class TestKeyboardInteractive < Test::Unit::TestCase
+ class TestKeyboardInteractive < NetSSHTest
include Common
USERAUTH_INFO_REQUEST = 60
diff --git a/test/authentication/methods/test_none.rb b/test/authentication/methods/test_none.rb
index 4d3d135..69239fd 100644
--- a/test/authentication/methods/test_none.rb
+++ b/test/authentication/methods/test_none.rb
@@ -4,7 +4,7 @@ require 'authentication/methods/common'
module Authentication; module Methods
- class TestNone < Test::Unit::TestCase
+ class TestNone < NetSSHTest
include Common
def test_authenticate_should_raise_if_none_disallowed
diff --git a/test/authentication/methods/test_password.rb b/test/authentication/methods/test_password.rb
index 3448b5a..60a5c3b 100644
--- a/test/authentication/methods/test_password.rb
+++ b/test/authentication/methods/test_password.rb
@@ -6,7 +6,7 @@ require 'authentication/methods/common'
module Authentication; module Methods
- class TestPassword < Test::Unit::TestCase
+ class TestPassword < NetSSHTest
include Common
def test_authenticate_should_raise_if_password_disallowed
diff --git a/test/authentication/methods/test_publickey.rb b/test/authentication/methods/test_publickey.rb
index b475cf2..d9c7434 100644
--- a/test/authentication/methods/test_publickey.rb
+++ b/test/authentication/methods/test_publickey.rb
@@ -4,7 +4,7 @@ require 'authentication/methods/common'
module Authentication; module Methods
- class TestPublickey < Test::Unit::TestCase
+ class TestPublickey < NetSSHTest
include Common
def test_authenticate_should_return_false_when_no_key_manager_has_been_set
diff --git a/test/authentication/test_agent.rb b/test/authentication/test_agent.rb
index 1613727..ba7962e 100644
--- a/test/authentication/test_agent.rb
+++ b/test/authentication/test_agent.rb
@@ -3,7 +3,7 @@ require 'net/ssh/authentication/agent'
module Authentication
- class TestAgent < Test::Unit::TestCase
+ class TestAgent < NetSSHTest
SSH2_AGENT_REQUEST_VERSION = 1
SSH2_AGENT_REQUEST_IDENTITIES = 11
diff --git a/test/authentication/test_ed25519.rb b/test/authentication/test_ed25519.rb
index 6e98f33..974021a 100644
--- a/test/authentication/test_ed25519.rb
+++ b/test/authentication/test_ed25519.rb
@@ -4,7 +4,7 @@ require 'base64'
module Authentication
- class TestED25519 < Test::Unit::TestCase
+ class TestED25519 < NetSSHTest
def test_no_pwd_key
pub = Net::SSH::Buffer.new(Base64.decode64(public_key_no_pwd.split(' ')[1]))
_type = pub.read_string
diff --git a/test/authentication/test_key_manager.rb b/test/authentication/test_key_manager.rb
index 0f92a09..caf72d1 100644
--- a/test/authentication/test_key_manager.rb
+++ b/test/authentication/test_key_manager.rb
@@ -3,7 +3,7 @@ require 'net/ssh/authentication/key_manager'
module Authentication
- class TestKeyManager < Test::Unit::TestCase
+ class TestKeyManager < NetSSHTest
def test_key_files_and_known_identities_are_empty_by_default
assert manager.key_files.empty?
assert manager.known_identities.empty?
diff --git a/test/authentication/test_session.rb b/test/authentication/test_session.rb
index ab29640..9a21faa 100644
--- a/test/authentication/test_session.rb
+++ b/test/authentication/test_session.rb
@@ -3,7 +3,7 @@ require 'net/ssh/authentication/session'
module Authentication
- class TestSession < Test::Unit::TestCase
+ class TestSession < NetSSHTest
include Net::SSH::Transport::Constants
include Net::SSH::Authentication::Constants
diff --git a/test/common.rb b/test/common.rb
index 4b1b6f0..dfb3cc0 100644
--- a/test/common.rb
+++ b/test/common.rb
@@ -1,7 +1,6 @@
$LOAD_PATH.unshift "#{File.dirname(__FILE__)}/../lib"
-gem "test-unit" # http://rubyforge.org/pipermail/test-unit-tracker/2009-July/000075.html
-gem 'mocha'
-require 'test/unit'
+
+require 'minitest/autorun'
require 'mocha/setup'
require 'net/ssh/buffer'
require 'net/ssh/config'
@@ -19,6 +18,16 @@ def P(*args)
Net::SSH::Packet.new(Net::SSH::Buffer.from(*args))
end
+class NetSSHTest < Minitest::Test
+ def assert_nothing_raised(&block)
+ yield
+ end
+
+ def assert_not_nil obj, msg = nil
+ refute_nil obj, msg
+ end
+end
+
class MockTransport < Net::SSH::Transport::Session
class BlockVerifier
def initialize(block)
diff --git a/test/connection/test_channel.rb b/test/connection/test_channel.rb
index 7f16204..7d3ab6a 100644
--- a/test/connection/test_channel.rb
+++ b/test/connection/test_channel.rb
@@ -3,7 +3,7 @@ require 'net/ssh/connection/channel'
module Connection
- class TestChannel < Test::Unit::TestCase
+ class TestChannel < NetSSHTest
include Net::SSH::Connection::Constants
def teardown
diff --git a/test/connection/test_session.rb b/test/connection/test_session.rb
index 7186463..cca97b7 100644
--- a/test/connection/test_session.rb
+++ b/test/connection/test_session.rb
@@ -3,7 +3,7 @@ require 'net/ssh/connection/session'
module Connection
- class TestSession < Test::Unit::TestCase
+ class TestSession < NetSSHTest
include Net::SSH::Connection::Constants
def test_constructor_should_set_defaults
diff --git a/test/integration/common.rb b/test/integration/common.rb
index 376f159..8d3aaab 100644
--- a/test/integration/common.rb
+++ b/test/integration/common.rb
@@ -1,7 +1,6 @@
$LOAD_PATH.unshift "#{File.dirname(__FILE__)}/../../lib"
-gem "test-unit" # http://rubyforge.org/pipermail/test-unit-tracker/2009-July/000075.html
-gem 'mocha'
-require 'test/unit'
+
+require 'minitest/autorun'
require 'mocha/setup'
require 'pty'
require 'expect'
diff --git a/test/integration/playbook.yml b/test/integration/playbook.yml
index 40f7ec3..5056880 100644
--- a/test/integration/playbook.yml
+++ b/test/integration/playbook.yml
@@ -52,7 +52,7 @@
- gem: name="{{ item[1] }}" state=present user_install=no executable=/usr/local/rvm/wrappers/ruby-{{ item[0] }}/gem
with_nested:
- "{{ruby_versions}}"
- - [ 'byebug', 'rake', 'jeweler', 'mocha', 'rbnacl', 'rbnacl-libsodium' ]
+ - [ 'byebug', 'rake', 'jeweler', 'mocha', 'rbnacl', 'rbnacl-libsodium', 'minitest' ]
- copy: content='echo "cd /net-ssh ; rake integration-test"' dest=/etc/update-motd.d/99-net-ssh-tests mode=0755
handlers:
- name: restart sshd
diff --git a/test/integration/test_ed25519_pkeys.rb b/test/integration/test_ed25519_pkeys.rb
index dc36d9e..b780756 100644
--- a/test/integration/test_ed25519_pkeys.rb
+++ b/test/integration/test_ed25519_pkeys.rb
@@ -7,7 +7,7 @@ require 'net/ssh'
# see Vagrantfile,playbook for env.
# we're running as net_ssh_1 user password foo
# and usually connecting to net_ssh_2 user password foo2pwd
-class TestED25519PKeys < Test::Unit::TestCase
+class TestED25519PKeys < NetSSHTest
include IntegrationTestHelpers
def test_in_file_no_password
diff --git a/test/integration/test_forward.rb b/test/integration/test_forward.rb
index 07f0866..5323aa2 100644
--- a/test/integration/test_forward.rb
+++ b/test/integration/test_forward.rb
@@ -21,7 +21,7 @@ require 'net/ssh/proxy/command'
require 'timeout'
require 'tempfile'
-class TestForward < Test::Unit::TestCase
+class TestForward < NetSSHTest
include IntegrationTestHelpers
def localhost
diff --git a/test/integration/test_id_rsa_keys.rb b/test/integration/test_id_rsa_keys.rb
index 9425cde..43ffc89 100644
--- a/test/integration/test_id_rsa_keys.rb
+++ b/test/integration/test_id_rsa_keys.rb
@@ -7,7 +7,7 @@ require 'net/ssh'
# see Vagrantfile,playbook for env.
# we're running as net_ssh_1 user password foo
# and usually connecting to net_ssh_2 user password foo2pwd
-class TestIDRSAPKeys < Test::Unit::TestCase
+class TestIDRSAPKeys < NetSSHTest
include IntegrationTestHelpers
def test_in_file_no_password
diff --git a/test/integration/test_proxy.rb b/test/integration/test_proxy.rb
index 8459b9d..689b517 100644
--- a/test/integration/test_proxy.rb
+++ b/test/integration/test_proxy.rb
@@ -5,7 +5,7 @@ require 'timeout'
require 'tempfile'
require 'net/ssh/proxy/command'
-class TestProxy < Test::Unit::TestCase
+class TestProxy < NetSSHTest
include IntegrationTestHelpers
def localhost
diff --git a/test/manual/test_pageant.rb b/test/manual/test_pageant.rb
index e528c8f..72982e1 100644
--- a/test/manual/test_pageant.rb
+++ b/test/manual/test_pageant.rb
@@ -16,10 +16,13 @@ require 'net/ssh/authentication/agent'
module Authentication
- class TestPageant < Test::Unit::TestCase
+ class TestPageant < NetSSHTest
def test_agent_should_be_able_to_negotiate
- assert_nothing_raised(Net::SSH::Authentication::AgentNotAvailable) { agent.negotiate! }
+ begin
+ agent.negotiate!
+ rescue Net::SSH::Authentication::AgentNotAvailable
+ end
end
private
diff --git a/test/start/test_connection.rb b/test/start/test_connection.rb
index 43cbf0e..3334f73 100644
--- a/test/start/test_connection.rb
+++ b/test/start/test_connection.rb
@@ -2,7 +2,7 @@ require 'common'
require 'net/ssh'
module NetSSH
- class TestConnection < Test::Unit::TestCase
+ class TestConnection < NetSSHTest
attr_reader :connection_session
def setup
diff --git a/test/start/test_options.rb b/test/start/test_options.rb
index 9b30a08..fa8a40d 100644
--- a/test/start/test_options.rb
+++ b/test/start/test_options.rb
@@ -2,7 +2,7 @@ require 'common'
require 'net/ssh'
module NetSSH
- class TestStartOptions < Test::Unit::TestCase
+ class TestStartOptions < NetSSHTest
def setup
authentication_session = mock('authentication_session')
authentication_session.stubs(:authenticate).returns(true)
diff --git a/test/start/test_transport.rb b/test/start/test_transport.rb
index 41fc8a9..9c2b27e 100644
--- a/test/start/test_transport.rb
+++ b/test/start/test_transport.rb
@@ -2,7 +2,7 @@ require 'common'
require 'net/ssh'
module NetSSH
- class TestStart < Test::Unit::TestCase
+ class TestStart < NetSSHTest
attr_reader :transport_session
attr_reader :authentication_session
diff --git a/test/start/test_user_nil.rb b/test/start/test_user_nil.rb
index 9347e8a..0ef1cca 100644
--- a/test/start/test_user_nil.rb
+++ b/test/start/test_user_nil.rb
@@ -2,7 +2,7 @@ require 'common'
require 'net/ssh'
module NetSSH
- class TestStartUserNil < Test::Unit::TestCase
+ class TestStartUserNil < NetSSHTest
def setup
@authentication_session = mock('authentication_session')
Net::SSH::Authentication::Session.stubs(:new).returns(@authentication_session)
diff --git a/test/test_buffer.rb b/test/test_buffer.rb
index 74d40aa..8ac4718 100644
--- a/test/test_buffer.rb
+++ b/test/test_buffer.rb
@@ -3,7 +3,7 @@
require 'common'
require 'net/ssh/buffer'
-class TestBuffer < Test::Unit::TestCase
+class TestBuffer < NetSSHTest
def test_constructor_should_initialize_buffer_to_empty_by_default
buffer = new
assert buffer.empty?
diff --git a/test/test_buffered_io.rb b/test/test_buffered_io.rb
index 6ee46ef..14ee404 100644
--- a/test/test_buffered_io.rb
+++ b/test/test_buffered_io.rb
@@ -1,7 +1,7 @@
require 'common'
require 'net/ssh/buffered_io'
-class TestBufferedIo < Test::Unit::TestCase
+class TestBufferedIo < NetSSHTest
def test_fill_should_pull_from_underlying_io
io.expects(:recv).with(8192).returns("here is some data")
assert_equal 17, io.fill
diff --git a/test/test_config.rb b/test/test_config.rb
index f389e53..2400259 100644
--- a/test/test_config.rb
+++ b/test/test_config.rb
@@ -3,7 +3,7 @@ require 'net/ssh/config'
require 'pathname'
require 'tempfile'
-class TestConfig < Test::Unit::TestCase
+class TestConfig < NetSSHTest
def test_home_should_be_absolute_path
assert Pathname.new(ENV['HOME']).absolute?
end
diff --git a/test/test_key_factory.rb b/test/test_key_factory.rb
index 5bc90b2..da61c5b 100644
--- a/test/test_key_factory.rb
+++ b/test/test_key_factory.rb
@@ -1,7 +1,7 @@
require 'common'
require 'net/ssh/key_factory'
-class TestKeyFactory < Test::Unit::TestCase
+class TestKeyFactory < NetSSHTest
def setup
@key_file = File.expand_path("/key-file")
end
diff --git a/test/test_known_hosts.rb b/test/test_known_hosts.rb
index 6f46523..8f25d88 100644
--- a/test/test_known_hosts.rb
+++ b/test/test_known_hosts.rb
@@ -1,6 +1,6 @@
require 'common'
-class TestKnownHosts < Test::Unit::TestCase
+class TestKnownHosts < NetSSHTest
def perform_test(source)
kh = Net::SSH::KnownHosts.new(source)
diff --git a/test/transport/hmac/test_md5.rb b/test/transport/hmac/test_md5.rb
index 7cae775..54f5541 100644
--- a/test/transport/hmac/test_md5.rb
+++ b/test/transport/hmac/test_md5.rb
@@ -5,7 +5,7 @@ require 'net/ssh/transport/hmac/md5'
module Transport; module HMAC
- class TestMD5 < Test::Unit::TestCase
+ class TestMD5 < NetSSHTest
def test_expected_digest_class
assert_equal OpenSSL::Digest::MD5, subject.digest_class
assert_equal OpenSSL::Digest::MD5, subject.new.digest_class
diff --git a/test/transport/hmac/test_none.rb b/test/transport/hmac/test_none.rb
index 7b49fe8..89779fb 100644
--- a/test/transport/hmac/test_none.rb
+++ b/test/transport/hmac/test_none.rb
@@ -3,7 +3,7 @@ require 'net/ssh/transport/hmac/none'
module Transport; module HMAC
- class TestNone < Test::Unit::TestCase
+ class TestNone < NetSSHTest
def test_expected_digest_class
assert_equal nil, subject.digest_class
assert_equal nil, subject.new.digest_class
diff --git a/test/transport/hmac/test_ripemd160.rb b/test/transport/hmac/test_ripemd160.rb
index 8255a73..ba6f427 100644
--- a/test/transport/hmac/test_ripemd160.rb
+++ b/test/transport/hmac/test_ripemd160.rb
@@ -5,7 +5,7 @@ require 'net/ssh/transport/hmac/ripemd160'
module Transport; module HMAC
- class TestRipemd160 < Test::Unit::TestCase
+ class TestRipemd160 < NetSSHTest
def test_expected_digest_class
assert_equal OpenSSL::Digest::RIPEMD160, subject.digest_class
assert_equal OpenSSL::Digest::RIPEMD160, subject.new.digest_class
diff --git a/test/transport/hmac/test_sha1.rb b/test/transport/hmac/test_sha1.rb
index 1cc133a..fb2ecfb 100644
--- a/test/transport/hmac/test_sha1.rb
+++ b/test/transport/hmac/test_sha1.rb
@@ -5,7 +5,7 @@ require 'net/ssh/transport/hmac/sha1'
module Transport; module HMAC
- class TestSHA1 < Test::Unit::TestCase
+ class TestSHA1 < NetSSHTest
def test_expected_digest_class
assert_equal OpenSSL::Digest::SHA1, subject.digest_class
assert_equal OpenSSL::Digest::SHA1, subject.new.digest_class
diff --git a/test/transport/hmac/test_sha2_256.rb b/test/transport/hmac/test_sha2_256.rb
index aa6bd6e..8dd5322 100644
--- a/test/transport/hmac/test_sha2_256.rb
+++ b/test/transport/hmac/test_sha2_256.rb
@@ -5,7 +5,7 @@ require 'net/ssh/transport/hmac/sha2_256'
module Transport; module HMAC
- class TestSHA2_256 < Test::Unit::TestCase
+ class TestSHA2_256 < NetSSHTest
def test_expected_digest_class
assert_equal OpenSSL::Digest::SHA256, subject.digest_class
assert_equal OpenSSL::Digest::SHA256, subject.new.digest_class
diff --git a/test/transport/hmac/test_sha2_512.rb b/test/transport/hmac/test_sha2_512.rb
index 7237613..e7abe0c 100644
--- a/test/transport/hmac/test_sha2_512.rb
+++ b/test/transport/hmac/test_sha2_512.rb
@@ -5,7 +5,7 @@ require 'net/ssh/transport/hmac/sha2_512'
module Transport; module HMAC
- class TestSHA2_512 < Test::Unit::TestCase
+ class TestSHA2_512 < NetSSHTest
def test_expected_digest_class
assert_equal OpenSSL::Digest::SHA512, subject.digest_class
assert_equal OpenSSL::Digest::SHA512, subject.new.digest_class
diff --git a/test/transport/kex/test_diffie_hellman_group1_sha1.rb b/test/transport/kex/test_diffie_hellman_group1_sha1.rb
index 2acf626..fad630d 100644
--- a/test/transport/kex/test_diffie_hellman_group1_sha1.rb
+++ b/test/transport/kex/test_diffie_hellman_group1_sha1.rb
@@ -4,7 +4,7 @@ require 'ostruct'
module Transport; module Kex
- class TestDiffieHellmanGroup1SHA1 < Test::Unit::TestCase
+ class TestDiffieHellmanGroup1SHA1 < NetSSHTest
include Net::SSH::Transport::Constants
def setup
diff --git a/test/transport/kex/test_ecdh_sha2_nistp256.rb b/test/transport/kex/test_ecdh_sha2_nistp256.rb
index f4114a2..e613b28 100644
--- a/test/transport/kex/test_ecdh_sha2_nistp256.rb
+++ b/test/transport/kex/test_ecdh_sha2_nistp256.rb
@@ -10,7 +10,7 @@ else
module Transport; module Kex
- class TestEcdhSHA2NistP256 < Test::Unit::TestCase
+ class TestEcdhSHA2NistP256 < NetSSHTest
include Net::SSH::Transport::Constants
def setup
diff --git a/test/transport/test_algorithms.rb b/test/transport/test_algorithms.rb
index 8d2a112..06de8e6 100644
--- a/test/transport/test_algorithms.rb
+++ b/test/transport/test_algorithms.rb
@@ -3,7 +3,7 @@ require 'net/ssh/transport/algorithms'
module Transport
- class TestAlgorithms < Test::Unit::TestCase
+ class TestAlgorithms < NetSSHTest
include Net::SSH::Transport::Constants
def test_allowed_packets
diff --git a/test/transport/test_cipher_factory.rb b/test/transport/test_cipher_factory.rb
index 614c792..607ff53 100644
--- a/test/transport/test_cipher_factory.rb
+++ b/test/transport/test_cipher_factory.rb
@@ -5,7 +5,7 @@ require 'net/ssh/transport/cipher_factory'
module Transport
- class TestCipherFactory < Test::Unit::TestCase
+ class TestCipherFactory < NetSSHTest
def self.if_supported?(name)
yield if Net::SSH::Transport::CipherFactory.supported?(name)
end
diff --git a/test/transport/test_hmac.rb b/test/transport/test_hmac.rb
index a9b2de8..55c4655 100644
--- a/test/transport/test_hmac.rb
+++ b/test/transport/test_hmac.rb
@@ -3,7 +3,7 @@ require 'net/ssh/transport/hmac'
module Transport
- class TestHMAC < Test::Unit::TestCase
+ class TestHMAC < NetSSHTest
Net::SSH::Transport::HMAC::MAP.each do |name, value|
method = name.tr("-", "_")
define_method("test_get_with_#{method}_returns_new_hmac_instance") do
diff --git a/test/transport/test_identity_cipher.rb b/test/transport/test_identity_cipher.rb
index 6bfcce0..74fa5b1 100644
--- a/test/transport/test_identity_cipher.rb
+++ b/test/transport/test_identity_cipher.rb
@@ -3,7 +3,7 @@ require 'net/ssh/transport/identity_cipher'
module Transport
- class TestIdentityCipher < Test::Unit::TestCase
+ class TestIdentityCipher < NetSSHTest
def test_block_size_should_be_8
assert_equal 8, cipher.block_size
diff --git a/test/transport/test_packet_stream.rb b/test/transport/test_packet_stream.rb
index e011c3d..f3e67f6 100644
--- a/test/transport/test_packet_stream.rb
+++ b/test/transport/test_packet_stream.rb
@@ -6,7 +6,7 @@ require 'net/ssh/transport/packet_stream'
module Transport
- class TestPacketStream < Test::Unit::TestCase
+ class TestPacketStream < NetSSHTest
include Net::SSH::Transport::Constants
def test_client_name_when_getnameinfo_works
diff --git a/test/transport/test_server_version.rb b/test/transport/test_server_version.rb
index 8ca08ed..8aa1c27 100644
--- a/test/transport/test_server_version.rb
+++ b/test/transport/test_server_version.rb
@@ -3,7 +3,7 @@ require 'net/ssh/transport/server_version'
module Transport
- class TestServerVersion < Test::Unit::TestCase
+ class TestServerVersion < NetSSHTest
def test_1_99_server_version_should_be_acceptible
s = subject(socket(true, "SSH-1.99-Testing_1.0\r\n"))
diff --git a/test/transport/test_session.rb b/test/transport/test_session.rb
index 50adeec..205908e 100644
--- a/test/transport/test_session.rb
+++ b/test/transport/test_session.rb
@@ -11,7 +11,7 @@ end
module Transport
- class TestSession < Test::Unit::TestCase
+ class TestSession < NetSSHTest
include Net::SSH::Transport::Constants
def test_constructor_defaults
diff --git a/test/transport/test_state.rb b/test/transport/test_state.rb
index 9bfb3f1..592974e 100644
--- a/test/transport/test_state.rb
+++ b/test/transport/test_state.rb
@@ -5,7 +5,7 @@ require 'net/ssh/transport/state'
module Transport
- class TestState < Test::Unit::TestCase
+ class TestState < NetSSHTest
def setup
@socket = @state = @deflater = @inflater = nil
diff --git a/test/verifiers/test_secure.rb b/test/verifiers/test_secure.rb
index 37e5d23..f1ab021 100644
--- a/test/verifiers/test_secure.rb
+++ b/test/verifiers/test_secure.rb
@@ -2,7 +2,7 @@ require 'common'
require 'net/ssh/verifiers/secure'
require 'ostruct'
-class TestSecure < Test::Unit::TestCase
+class TestSecure < NetSSHTest
def test_raises_unknown_key_error_if_empty
secure_verifier = Net::SSH::Verifiers::Secure.new
host_keys = []