mirror of
https://github.com/HoneyryderChuck/httpx.git
synced 2025-10-04 00:00:37 -04:00
test bad certs errors with badssl.com instead
This commit is contained in:
parent
574a478cc8
commit
e253a70270
@ -34,11 +34,9 @@ class FaradayTest < Minitest::Test
|
||||
assert JSON.parse(res.body.to_s)["gzipped"]
|
||||
end
|
||||
|
||||
SYSTEM_CERT_STORE_DIR = "/usr/share/ca-certificates/mozilla"
|
||||
def test_adapter_get_ssl_fails_with_bad_cert
|
||||
conn = create_connection(ssl: { ca_path: SYSTEM_CERT_STORE_DIR, verify: OpenSSL::SSL::VERIFY_PEER })
|
||||
err = assert_raises Faraday::Adapter::HTTPX::SSL_ERROR do
|
||||
conn.get(build_path("/get"))
|
||||
get("https://wrong.host.badssl.com/")
|
||||
end
|
||||
assert_includes err.message, "certificate"
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user