Skip to content

The agent that grows with you

test(a2a): the ::1 bind test skips on hosts without IPv6

Teknium8ddf6d123474
diff --git a/tests/plugins/test_a2a_plugin.py b/tests/plugins/test_a2a_plugin.py
index c3983750aa3..2a38f4d6b5d 100644
--- a/tests/plugins/test_a2a_plugin.py
+++ b/tests/plugins/test_a2a_plugin.py
@@ -953,6 +953,11 @@ def test_ipv6_loopback_bind_serves_and_advertises_a_bracketed_url(monkeypatch, s
peer can parse (IPv6 literal in exactly one pair of brackets)."""
monkeypatch.delenv("A2A_BEARER_TOKEN", raising=False)
monkeypatch.delenv("A2A_PEER_TOKENS", raising=False)
+ try:
+ with socket.socket(socket.AF_INET6) as probe:
+ probe.bind(("::1", 0))
+ except OSError:
+ pytest.skip("host cannot bind IPv6 '::1'")
monkeypatch.setenv("A2A_HOST", spelling)
adapter, _ = _make_live_adapter(monkeypatch)
base = f"http://[::1]:{adapter.port}"