From 8d9d5843b55f47d24031165f99b07d41715b93e9 Mon Sep 17 00:00:00 2001 From: Thomas Munro Date: Wed, 19 Mar 2025 16:16:15 +1300 Subject: oauth: Use IPv4-only issuer in oauth_validator tests The test authorization server implemented in oauth_server.py does not listen on IPv6. Most of the time, libcurl happily falls back to IPv4 after failing its initial connection, but on NetBSD, something is consistently showing up on the unreserved IPv6 port and causing a test failure. Rather than deal with dual-stack details across all test platforms, change the issuer to enforce the use of IPv4 only. (This elicits more punishing timeout behavior from libcurl, so it's a useful change from the testing perspective as well.) Author: Jacob Champion Reported-by: Thomas Munro Discussion: https://postgr.es/m/CAOYmi%2Bn4EDOOUL27_OqYT2-F2rS6S%2B3mK-ppWb2Ec92UEoUbYA%40mail.gmail.com --- src/test/modules/oauth_validator/t/oauth_server.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/test/modules/oauth_validator/t/oauth_server.py') diff --git a/src/test/modules/oauth_validator/t/oauth_server.py b/src/test/modules/oauth_validator/t/oauth_server.py index 4faf3323d38..5bc30be87fd 100755 --- a/src/test/modules/oauth_validator/t/oauth_server.py +++ b/src/test/modules/oauth_validator/t/oauth_server.py @@ -251,7 +251,7 @@ class OAuthHandler(http.server.BaseHTTPRequestHandler): def config(self) -> JsonObject: port = self.server.socket.getsockname()[1] - issuer = f"http://localhost:{port}" + issuer = f"http://127.0.0.1:{port}" if self._alt_issuer: issuer += "/alternate" elif self._parameterized: -- cgit v1.2.3