summaryrefslogtreecommitdiff
path: root/test/open-uri
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-12-09 17:51:43 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-12-09 17:51:43 +0000
commitbf4b7f3b8cd13a27fe3ebd1f59f8c04fdf3c716e (patch)
treed1c886200b68694f8fb0943359dfd70bcc832f75 /test/open-uri
parent9d237f434ed56ff980979b71aaea50371163879b (diff)
* test/net/http/test_https.rb
(TestNetHTTPS#test_certificate_verify_failure): on Windows, Errno::ECONNRESET will be raised when the verify is failure at the client side, and it'll be eaten by WEBrick. * test/open-uri/test_ssl.rb (TestOpenURISSL#test_validation_failure): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48751 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/open-uri')
-rw-r--r--test/open-uri/test_ssl.rb12
1 files changed, 8 insertions, 4 deletions
diff --git a/test/open-uri/test_ssl.rb b/test/open-uri/test_ssl.rb
index d1ea57174a..d56ca86fa1 100644
--- a/test/open-uri/test_ssl.rb
+++ b/test/open-uri/test_ssl.rb
@@ -91,10 +91,14 @@ class TestOpenURISSL
end
def test_validation_failure
- log_tester = lambda {|server_log|
- assert_equal(1, server_log.length)
- assert_match(/ERROR OpenSSL::SSL::SSLError:/, server_log[0])
- }
+ unless /mswin|mingw/ =~ RUBY_PLATFORM
+ # on Windows, Errno::ECONNRESET will be raised, and it'll be eaten by
+ # WEBrick
+ log_tester = lambda {|server_log|
+ assert_equal(1, server_log.length)
+ assert_match(/ERROR OpenSSL::SSL::SSLError:/, server_log[0])
+ }
+ end
with_https(log_tester) {|srv, dr, url, server_thread, server_log|
setup_validation(srv, dr)
assert_raise(OpenSSL::SSL::SSLError) { open("#{url}/data") {} }