mirror of
https://github.com/HoneyryderChuck/httpx.git
synced 2025-11-27 00:03:01 -05:00
socks5 test covering failed authenticationn path
This commit is contained in:
parent
c5512dbbeb
commit
cbfdfed6c4
@ -119,14 +119,24 @@ module Requests
|
|||||||
# verify_body_length(response)
|
# verify_body_length(response)
|
||||||
# end
|
# end
|
||||||
|
|
||||||
def test_plugin_socks5_proxy_error
|
def test_plugin_socks5_proxy_negotiation_error
|
||||||
proxy = URI(socks5_proxy.first)
|
proxy = URI(socks5_proxy.first)
|
||||||
proxy.password = nil
|
proxy.password = nil
|
||||||
|
|
||||||
session = HTTPX.plugin(:proxy).with_proxy(uri: [proxy])
|
session = HTTPX.plugin(:proxy).with_proxy(uri: [proxy])
|
||||||
uri = build_uri("/get")
|
uri = build_uri("/get")
|
||||||
response = session.get(uri)
|
response = session.get(uri)
|
||||||
verify_error_response(response, HTTPX::Socks5Error)
|
verify_error_response(response, /negotiation error/)
|
||||||
|
end
|
||||||
|
|
||||||
|
def test_plugin_socks5_proxy_authentication_error
|
||||||
|
proxy = URI(socks5_proxy.first)
|
||||||
|
proxy.password = "1"
|
||||||
|
|
||||||
|
session = HTTPX.plugin(:proxy).with_proxy(uri: [proxy])
|
||||||
|
uri = build_uri("/get")
|
||||||
|
response = session.get(uri)
|
||||||
|
verify_error_response(response, /authentication error/)
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_plugin_ssh_proxy
|
def test_plugin_ssh_proxy
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user