[ruby/net-http] fix a false-negative test
* no_proxy is meant to operate on the destination address, not on the name of the proxy * if both end with `'.example'`, the test does not nail down the behaviour https://github.com/ruby/net-http/commit/bb9a5cfa3d
This commit is contained in:
parent
f757a5d3ce
commit
f109269a03
@ -126,10 +126,10 @@ class TestNetHTTP < Test::Unit::TestCase
|
||||
|
||||
def test_proxy_address_no_proxy
|
||||
TestNetHTTPUtils.clean_http_proxy_env do
|
||||
http = Net::HTTP.new 'hostname.example', nil, 'proxy.example', nil, nil, nil, 'example'
|
||||
http = Net::HTTP.new 'hostname.example', nil, 'proxy.com', nil, nil, nil, 'example'
|
||||
assert_nil http.proxy_address
|
||||
|
||||
http = Net::HTTP.new '10.224.1.1', nil, 'proxy.example', nil, nil, nil, 'example,10.224.0.0/22'
|
||||
http = Net::HTTP.new '10.224.1.1', nil, 'proxy.com', nil, nil, nil, 'example,10.224.0.0/22'
|
||||
assert_nil http.proxy_address
|
||||
end
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user