From c173a2f47c325dfabea60ea7d5b17f9758668ce6 Mon Sep 17 00:00:00 2001 From: Tatsuo Ishii Date: Tue, 30 Sep 2025 18:04:06 +0900 Subject: [PATCH] Test: adapt 023.ssl_connection to PostgreSQL 18. PostgreSQL 18 heavily changed psql's \conninfo output format, which made the test fail because the test relies on \conninfo. This commit makes the test script aware the PostgreSQL version to fix the issue. Backpatch-through: v4.2 --- .../tests/023.ssl_connection/test.sh | 20 ++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/src/test/regression/tests/023.ssl_connection/test.sh b/src/test/regression/tests/023.ssl_connection/test.sh index 6b1dbb8af..2b5f3b693 100755 --- a/src/test/regression/tests/023.ssl_connection/test.sh +++ b/src/test/regression/tests/023.ssl_connection/test.sh @@ -65,7 +65,13 @@ $PSQL -h localhost test < result \q EOF -grep SSL result +# PostgreSQL 18 or later prints tablular output for \conninfo. +# For SSL, "SSL Connection | true (or false)" +if [ $PGVERSION -ge 18 ];then + grep "SSL Connection" result|grep true +else + grep SSL result +fi if [ $? != 0 ];then echo "Checking SSL connection between frontend and Pgpool-II failed." @@ -75,7 +81,11 @@ fi echo "Checking SSL connection between frontend and Pgpool-II was ok." -grep SSL result |grep TLSv1.2 +if [ $PGVERSION -ge 18 ];then + grep "SSL Protocol" result|grep TLSv1.2 +else + grep SSL result |grep TLSv1.2 +fi # if SSl protocol version TLSv1.2 if [ $? = 0 ];then @@ -111,7 +121,11 @@ $PSQL -h localhost test < result \q EOF -grep SSL result +if [ $PGVERSION -ge 18 ];then + grep "SSL Connection" result|grep true +else + grep SSL result +fi if [ $? = 0 ];then echo "Checking SSL connection between frontend and Pgpool-II succeeded despite bad ssl_ecdh_curve." -- 2.39.5