# HG changeset patch # User Augie Fackler # Date 2017-01-20 15:17:34 # Node ID 7bfe02b57695900ef996989286c1fdc2a13aec82 # Parent 41e31a6f5296f1516456caca514fa3ff88e3bc42 tests: also allow "Protocol not supported" in test-http-proxy error I've seen this in a (misconfigured) FreeBSD jail which has ::1 as an entry for localhost, but IPv6 support is disabled in the jail. It took me months to figure out what was going on (and I only figured it out when tinyproxy.py got confused by similar IPv4-level misconfiguration of the localhost domain in /etc/hosts.) I don't feel strongly about this patch: on the one hand, it's papering over a host-level misconfiguration, but on the other it avoids some weird and hard to diagnose problems that can occur in weirdly restricted environments. diff --git a/tests/test-http-proxy.t b/tests/test-http-proxy.t --- a/tests/test-http-proxy.t +++ b/tests/test-http-proxy.t @@ -83,10 +83,11 @@ url with user name and password updating to branch default 1 files updated, 0 files merged, 0 files removed, 0 files unresolved -bad host:port for proxy +bad host:port for proxy ("Protocol not supported" can happen on +misconfigured hosts) $ http_proxy=localhost:$HGPORT2 hg clone --config http_proxy.always=True http://localhost:$HGPORT/ f - abort: error: Connection refused + abort: error: (Connection refused|Protocol not supported) (re) [255] do not use the proxy if it is in the no list