oauth: Use IPv4-only issuer in oauth_validator tests
authorThomas Munro <tmunro@postgresql.org>
Wed, 19 Mar 2025 03:16:15 +0000 (16:16 +1300)
committerThomas Munro <tmunro@postgresql.org>
Wed, 19 Mar 2025 03:45:01 +0000 (16:45 +1300)
commit8d9d5843b55f47d24031165f99b07d41715b93e9
tree9fef3f5f031f444a7c8f139f9a12a843c4822213
parent28317de723b60b61c40e7de4341a3029f698ddaf
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.champion@enterprisedb.com>
Reported-by: Thomas Munro <thomas.munro@gmail.com>
Discussion: http://postgr.es/m/CAOYmi%2Bn4EDOOUL27_OqYT2-F2rS6S%2B3mK-ppWb2Ec92UEoUbYA%40mail.gmail.com
src/test/modules/oauth_validator/t/001_server.pl
src/test/modules/oauth_validator/t/OAuth/Server.pm
src/test/modules/oauth_validator/t/oauth_server.py