Problem
tests/compat/test-connections.sh reports 6 failures on this machine but none are real rpg bugs:
A1–A5: \conninfo format mismatch
psql 18 changed \conninfo output from a one-liner:
You are connected to database "postgres" as user "postgres" on host "localhost" (address "::1") at port "5432".
to a tabular format:
Connection Information
Parameter | Value
----------------------+-----------
Database | postgres
...
rpg outputs the classic one-liner (correct behavior, matches psql < 18). The test does a literal string compare against whatever psql outputs, so it fails on any machine with psql 18+.
Fix: Don't use \conninfo for connection-path tests. Use SELECT current_database(), current_user, inet_server_addr()::text, inet_server_port() instead — stable output across all psql versions, and still proves the connection path works.
A7: Wrong password test uses trust-auth port
Test expects non-zero exit when connecting with wrong password, but the test port uses trust auth — Postgres ignores the password and lets anyone in. Test always gets exit 0.
Fix: Run A7 against a SCRAM-auth port (TEST_PG_SCRAM_PORT, default 5432 or a dedicated port). CI already has a SCRAM service available.
Impact
These failures make the test suite output look alarming and mask real failures. The connection paths themselves (A1–A5) are working correctly.
Fix
- Replace
\conninfo with a stable SQL query in A1–A5
- Add
TEST_PG_SCRAM_HOST/TEST_PG_SCRAM_PORT/TEST_PG_SCRAM_PASSWORD env vars for A7
- Update
.github/workflows/checks.yml to pass the SCRAM service connection details to the test step (service already exists as the default postgres service with POSTGRES_PASSWORD)
Problem
tests/compat/test-connections.shreports 6 failures on this machine but none are real rpg bugs:A1–A5:
\conninfoformat mismatchpsql 18 changed
\conninfooutput from a one-liner:to a tabular format:
rpg outputs the classic one-liner (correct behavior, matches psql < 18). The test does a literal string compare against whatever psql outputs, so it fails on any machine with psql 18+.
Fix: Don't use
\conninfofor connection-path tests. UseSELECT current_database(), current_user, inet_server_addr()::text, inet_server_port()instead — stable output across all psql versions, and still proves the connection path works.A7: Wrong password test uses trust-auth port
Test expects non-zero exit when connecting with wrong password, but the test port uses
trustauth — Postgres ignores the password and lets anyone in. Test always gets exit 0.Fix: Run A7 against a SCRAM-auth port (
TEST_PG_SCRAM_PORT, default 5432 or a dedicated port). CI already has a SCRAM service available.Impact
These failures make the test suite output look alarming and mask real failures. The connection paths themselves (A1–A5) are working correctly.
Fix
\conninfowith a stable SQL query in A1–A5TEST_PG_SCRAM_HOST/TEST_PG_SCRAM_PORT/TEST_PG_SCRAM_PASSWORDenv vars for A7.github/workflows/checks.ymlto pass the SCRAM service connection details to the test step (service already exists as the defaultpostgresservice withPOSTGRES_PASSWORD)