Files
hermes-agent/tests
赵桂雄 60f3763c23 test(gateway): keep the runner's system proxy out of the media-retry connect guard
test_blocks_private_dns_answer_at_connect_time clears the six proxy env
vars, but httpx resolves environment proxies through
urllib.request.getproxies(), which on macOS falls back to the System
Configuration (scutil --proxy) when no proxy env var is set. On a runner
with a system-wide proxy the request dials the proxy rather than the
rebinding host, and the test fails with:

    AssertionError: TCP connect attempted for 127.0.0.1:7890

httpx binds that name at import time (httpx/_utils.py does
``from urllib.request import getproxies``), so patching
urllib.request.getproxies has no effect; patch the httpx-side binding.

Test-only change: production proxy semantics are untouched, and the
mutation check still holds (removing the connect-time guard in
tools/url_safety.py turns this test red again).

One of the test-isolation gaps reported in #110728 (the system-proxy one).
2026-09-15 05:26:25 -07:00
..
…