pgsql: oauth: Use IPv4-only issuer in oauth_validator tests

From: Thomas Munro <tmunro(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: oauth: Use IPv4-only issuer in oauth_validator tests
Date: 2025-03-19 03:46:08
Message-ID: E1tukNc-003CXa-0f@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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 <jacob(dot)champion(at)enterprisedb(dot)com>
Reported-by: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
Discussion: https://postgr.es/m/CAOYmi%2Bn4EDOOUL27_OqYT2-F2rS6S%2B3mK-ppWb2Ec92UEoUbYA%40mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/8d9d5843b55f47d24031165f99b07d41715b93e9

Modified Files
--------------
src/test/modules/oauth_validator/t/001_server.pl | 2 +-
src/test/modules/oauth_validator/t/OAuth/Server.pm | 4 ++--
src/test/modules/oauth_validator/t/oauth_server.py | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Thomas Munro 2025-03-19 04:06:17 pgsql: oauth: Disallow synchronous DNS in libcurl
Previous Message Amit Langote 2025-03-19 03:14:56 pgsql: Ensure first ModifyTable rel initialized if all are pruned