mirror of
https://github.com/HoneyryderChuck/httpx.git
synced 2025-10-04 00:00:37 -04:00
test reproducing ssl error blocking clean connection exit
This commit is contained in:
parent
cc4b8d4c9e
commit
dc7b41e7da
20
standalone_tests/clean_exit_on_ssl_corruption_test.rb
Normal file
20
standalone_tests/clean_exit_on_ssl_corruption_test.rb
Normal file
@ -0,0 +1,20 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require "test_helper"
|
||||
require "support/http_helpers"
|
||||
require "support/minitest_extensions"
|
||||
|
||||
class HTTPX::SSL
|
||||
def write(*)
|
||||
raise OpenSSL::SSL::SSLError, "SSL_write"
|
||||
end
|
||||
end
|
||||
|
||||
class CleanExitOnSslCorruptionTest < Minitest::Test
|
||||
include HTTPHelpers
|
||||
|
||||
def test_clean_exit_on_ssl_write_error
|
||||
response = HTTPX.get("https://#{httpbin}/get")
|
||||
verify_error_response(response, OpenSSL::SSL::SSLError)
|
||||
end
|
||||
end
|
Loading…
x
Reference in New Issue
Block a user