From a9b001a4eb924cb3f0517e55ef941adcffd1f4b0 Mon Sep 17 00:00:00 2001 From: ko1 Date: Tue, 16 May 2017 04:23:10 +0000 Subject: [PATCH] skip openssl related tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58739 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/net/ftp/test_ftp.rb | 4 ++++ test/net/smtp/test_smtp.rb | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/test/net/ftp/test_ftp.rb b/test/net/ftp/test_ftp.rb index 6976f11b8f..6f726e1090 100644 --- a/test/net/ftp/test_ftp.rb +++ b/test/net/ftp/test_ftp.rb @@ -2080,6 +2080,8 @@ EOF end def test_abort_tls + return unless defined?(OpenSSL) + commands = [] server = create_ftp_server { |sock| sock.print("220 (test_ftp).\r\n") @@ -2124,6 +2126,8 @@ EOF ftp.abort assert_equal("ABOR\r\n", commands.shift) assert_equal(nil, commands.shift) + rescue RuntimeError, LoadError + # skip (require openssl) ensure ftp.close if ftp end diff --git a/test/net/smtp/test_smtp.rb b/test/net/smtp/test_smtp.rb index 98b7cad345..23e1542d8f 100644 --- a/test/net/smtp/test_smtp.rb +++ b/test/net/smtp/test_smtp.rb @@ -135,6 +135,8 @@ module Net sock.close if sock servers.each(&:close) end + rescue LoadError + # skip (require openssl) end def test_tls_connect_timeout @@ -151,6 +153,8 @@ module Net smtp.start do end end + rescue LoadError + # skip (require openssl) ensure sock.close if sock servers.each(&:close)