From 49da3fb07f421ba45cd3c2969b5c7d37973da7e3 Mon Sep 17 00:00:00 2001 From: Rahim Kanji Date: Wed, 18 Feb 2026 00:10:23 +0500 Subject: [PATCH] Created new group 'pgsql17-repl' --- test/tap/groups/groups.json | 1 + test/tap/groups/pgsql17-repl/env.sh | 5 ++ .../tap/groups/pgsql17-repl/pre-proxysql.bash | 47 +++++++++++++++++++ 3 files changed, 53 insertions(+) create mode 100644 test/tap/groups/pgsql17-repl/env.sh create mode 100644 test/tap/groups/pgsql17-repl/pre-proxysql.bash diff --git a/test/tap/groups/groups.json b/test/tap/groups/groups.json index f49a560c6..1a11fd322 100644 --- a/test/tap/groups/groups.json +++ b/test/tap/groups/groups.json @@ -225,6 +225,7 @@ "mysql-watchdog_test-t": [ "default-g4", "mysql-auto_increment_delay_multiplex=0-g4", "mysql-multiplexing=false-g4", "mysql-query_digests=0-g4", "mysql-query_digests_keep_comment=1-g4" ], "pgsql-extended_query_protocol_query_rules_test-t": [ "default-g4", "mysql-auto_increment_delay_multiplex=0-g4", "mysql-multiplexing=false-g4", "mysql-query_digests=0-g4", "mysql-query_digests_keep_comment=1-g4" ], "pgsql-extended_query_protocol_test-t": [ "default-g4", "mysql-auto_increment_delay_multiplex=0-g4", "mysql-multiplexing=false-g4", "mysql-query_digests=0-g4", "mysql-query_digests_keep_comment=1-g4" ], + "pgsql-query_rules_routing-t": [ "pgsql17-repl-g4" ], "pgsql-multiplex_status_test-t": [ "default-g4", "mysql-auto_increment_delay_multiplex=0-g4", "mysql-multiplexing=false-g4", "mysql-query_digests=0-g4", "mysql-query_digests_keep_comment=1-g4" ], "pgsql-proxysql_cmd_test-t": [ "default-g4", "mysql-auto_increment_delay_multiplex=0-g4", "mysql-multiplexing=false-g4", "mysql-query_digests=0-g4", "mysql-query_digests_keep_comment=1-g4" ], "pgsql-query_cancel_session_termination_test-t": [ "default-g4", "mysql-auto_increment_delay_multiplex=0-g4", "mysql-multiplexing=false-g4", "mysql-query_digests=0-g4", "mysql-query_digests_keep_comment=1-g4" ], diff --git a/test/tap/groups/pgsql17-repl/env.sh b/test/tap/groups/pgsql17-repl/env.sh new file mode 100644 index 000000000..175012779 --- /dev/null +++ b/test/tap/groups/pgsql17-repl/env.sh @@ -0,0 +1,5 @@ +# PostgreSQL 17 Replication Test Group +# +# Tests for replication, query routing, read-only detection + +export TEST_PY_TAP_INCL="pgsql-query_rules_routing-t" diff --git a/test/tap/groups/pgsql17-repl/pre-proxysql.bash b/test/tap/groups/pgsql17-repl/pre-proxysql.bash new file mode 100644 index 000000000..a83347a6c --- /dev/null +++ b/test/tap/groups/pgsql17-repl/pre-proxysql.bash @@ -0,0 +1,47 @@ +#!/usr/bin/env bash +# +# change infra config for PostgreSQL 17 replication +# inherits env from tester script +# + +INFRA=infra-$(basename $(dirname "$0") | sed 's/-g[0-9]//' | sed 's/_.*//') + +# destroy running infras +$JENKINS_SCRIPTS_PATH/infra-default/docker-compose-destroy.bash + +# cleanup ProxySQL before starting new infra +psql -h127.0.0.1 -p6132 -Uadmin -dadmin -c " \ +DELETE FROM pgsql_users; \ +LOAD PGSQL USERS TO RUNTIME; \ +SAVE PGSQL USERS TO DISK; \ +DELETE FROM pgsql_servers; \ +DELETE FROM pgsql_hostgroup_parameters; \ +DELETE FROM pgsql_replication_hostgroups; \ +LOAD PGSQL SERVERS TO RUNTIME; \ +SAVE PGSQL SERVERS TO DISK; \ +DELETE FROM pgsql_query_rules; \ +LOAD PGSQL QUERY RULES TO RUNTIME; \ +SAVE PGSQL QUERY RULES TO DISK; \ +DELETE FROM mysql_users; \ +LOAD MYSQL USERS TO RUNTIME; \ +SAVE MYSQL USERS TO DISK; \ +DELETE FROM mysql_servers; \ +DELETE FROM mysql_replication_hostgroups; \ +DELETE FROM mysql_group_replication_hostgroups; \ +DELETE FROM mysql_galera_hostgroups; \ +LOAD MYSQL SERVERS TO RUNTIME; \ +SAVE MYSQL SERVERS TO DISK; \ +DELETE FROM mysql_query_rules; \ +LOAD MYSQL QUERY RULES TO RUNTIME; \ +SAVE MYSQL QUERY RULES TO DISK; \ +" 2>&1 + +# load environment for infra +source $JENKINS_SCRIPTS_PATH/${INFRA}/.env + +# Start infra (this will configure ProxySQL via docker-proxy-post.bash) +$JENKINS_SCRIPTS_PATH/infra-docker-hoster/docker-compose-init.bash +$JENKINS_SCRIPTS_PATH/${INFRA}/docker-compose-init.bash + +# wait for infra to stabilize +sleep 10