From 21a40e94ac3404542c2bd83c388253ccf0fc96b0 Mon Sep 17 00:00:00 2001 From: nobu Date: Sat, 13 Dec 2014 07:12:56 +0000 Subject: [PATCH] skip old OpenSSL * test/open-uri/test_ssl.rb, test/webrick/test_httpproxy.rb: also depends on test/openssl/utils.rb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48825 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/open-uri/test_ssl.rb | 5 ++++- test/webrick/test_httpproxy.rb | 6 +++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/test/open-uri/test_ssl.rb b/test/open-uri/test_ssl.rb index d56ca86fa1..fa40f6db65 100644 --- a/test/open-uri/test_ssl.rb +++ b/test/open-uri/test_ssl.rb @@ -170,8 +170,9 @@ class TestOpenURISSL } end -end if defined?(OpenSSL) +end if defined?(OpenSSL::TestUtils) +if defined?(OpenSSL::TestUtils) # mkdir demoCA demoCA/private demoCA/newcerts # touch demoCA/index.txt # echo 00 > demoCA/serial @@ -385,3 +386,5 @@ TIvZKDovHJ3UV163xaECQEVQR2ZW6SHZQA6vP/IFd6vnCECXiCpRs36GsLIDLm02 P0ZCl31aopNsBcKLiy2v1X116XDwLSHjuc9NmsSX4nk= -----END RSA PRIVATE KEY----- End + +end diff --git a/test/webrick/test_httpproxy.rb b/test/webrick/test_httpproxy.rb index 304762c465..501bb4cbe5 100644 --- a/test/webrick/test_httpproxy.rb +++ b/test/webrick/test_httpproxy.rb @@ -123,7 +123,7 @@ class TestWEBrickHTTPProxy < Test::Unit::TestCase nil, nil, OpenSSL::Digest::SHA1.new ) return cert - end + end if defined?(OpenSSL::TestUtils) def test_connect # Testing CONNECT to proxy server @@ -172,7 +172,7 @@ class TestWEBrickHTTPProxy < Test::Unit::TestCase } } } - end if defined?(OpenSSL) + end if defined?(OpenSSL::TestUtils) def test_upstream_proxy # Testing GET or POST through the upstream proxy server @@ -240,7 +240,7 @@ class TestWEBrickHTTPProxy < Test::Unit::TestCase assert_equal(3, proxy_handler_called, up_log.call + log.call) assert_equal(3, request_handler_called, up_log.call + log.call) - if defined?(OpenSSL) + if defined?(OpenSSL::TestUtils) # Testing CONNECT to the upstream proxy server # # client -------> proxy -------> proxy -------> https