Skip to content

Commit bb9a5cf

Browse files
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
1 parent 196f3d7 commit bb9a5cf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/net/http/test_http.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,10 @@ def test_proxy_address
126126

127127
def test_proxy_address_no_proxy
128128
TestNetHTTPUtils.clean_http_proxy_env do
129-
http = Net::HTTP.new 'hostname.example', nil, 'proxy.example', nil, nil, nil, 'example'
129+
http = Net::HTTP.new 'hostname.example', nil, 'proxy.com', nil, nil, nil, 'example'
130130
assert_nil http.proxy_address
131131

132-
http = Net::HTTP.new '10.224.1.1', nil, 'proxy.example', nil, nil, nil, 'example,10.224.0.0/22'
132+
http = Net::HTTP.new '10.224.1.1', nil, 'proxy.com', nil, nil, nil, 'example,10.224.0.0/22'
133133
assert_nil http.proxy_address
134134
end
135135
end

0 commit comments

Comments
 (0)