@@ -108,7 +108,7 @@ writeShellApplication {
108108 "index_advisor"
109109 )
110110
111- # Tests to skip for multigres images (pgsodium requires getkey script not present in multigres )
111+ # Tests to skip for multigres images (pgsodium not installed; vault has z_multigres-17_ variant )
112112 MULTIGRES_SKIP_TESTS=(
113113 "pgsodium"
114114 "vault"
@@ -136,6 +136,17 @@ writeShellApplication {
136136 fi
137137 done
138138
139+ # Build list of multigres-17-specific test basenames
140+ local multigres_17_variants=()
141+ for f in "$TESTS_SQL_DIR"/z_multigres-17_*.sql; do
142+ if [[ -f "$f" ]]; then
143+ local variant_name
144+ variant_name=$(basename "$f" .sql)
145+ local base_name="'' ${variant_name#z_multigres-17_}"
146+ multigres_17_variants+=("$base_name")
147+ fi
148+ done
149+
139150 # Build list of multigres-orioledb-17-specific test basenames
140151 local multigres_orioledb_variants=()
141152 for f in "$TESTS_SQL_DIR"/z_multigres-orioledb-17_*.sql; do
@@ -192,7 +203,7 @@ writeShellApplication {
192203 multigres-orioledb-17) [[ "$_basename" == z_multigres-orioledb-17_* ]] && tests+=("$_basename") ;;
193204 esac
194205 else
195- # For orioledb-like versions, use z_ variants where they exist instead of the base test
206+ # For variant versions, use z_ overrides where they exist instead of the base test
196207 if [[ "$version" == "orioledb-17" ]]; then
197208 local has_variant=false
198209 for variant in "'' ${orioledb_variants[@]}"; do
@@ -204,6 +215,17 @@ writeShellApplication {
204215 if [[ "$has_variant" == "false" ]]; then
205216 tests+=("$_basename")
206217 fi
218+ elif [[ "$version" == "multigres-17" ]]; then
219+ local has_variant=false
220+ for variant in "'' ${multigres_17_variants[@]}"; do
221+ if [[ "$_basename" == "$variant" ]]; then
222+ has_variant=true
223+ break
224+ fi
225+ done
226+ if [[ "$has_variant" == "false" ]]; then
227+ tests+=("$_basename")
228+ fi
207229 elif [[ "$version" == "multigres-orioledb-17" ]]; then
208230 local has_variant=false
209231 for variant in "'' ${multigres_orioledb_variants[@]}"; do
@@ -277,22 +299,21 @@ writeShellApplication {
277299
278300 log_info "Multigres: initializing PostgreSQL cluster..."
279301 docker exec -u postgres "$container" \
280- initdb \
281- -D /var/lib/postgresql/data \
282- --allow-group-access \
283- --locale-provider=icu \
284- --encoding=UTF-8 \
285- --icu-locale=en_US.UTF-8
302+ bash -c "echo '$POSTGRES_PASSWORD' > /tmp/pgpwfile && \
303+ initdb \
304+ -D /var/lib/postgresql/data \
305+ --username=supabase_admin \
306+ --pwfile=/tmp/pgpwfile \
307+ --allow-group-access \
308+ --locale-provider=icu \
309+ --encoding=UTF-8 \
310+ --icu-locale=en_US.UTF-8 && \
311+ rm /tmp/pgpwfile"
286312
287313 log_info "Multigres: starting PostgreSQL (config at /etc/postgresql)..."
288314 docker exec -u postgres "$container" \
289315 pg_ctl start -D /etc/postgresql -w -t 60
290316
291- log_info "Multigres: bootstrapping supabase_admin role..."
292- docker exec -u postgres "$container" \
293- psql -U postgres -d postgres \
294- -c "CREATE ROLE supabase_admin WITH SUPERUSER LOGIN PASSWORD '$POSTGRES_PASSWORD'; ALTER DATABASE postgres OWNER TO supabase_admin;"
295-
296317 log_info "Multigres: running schema migrations..."
297318 docker exec \
298319 -e POSTGRES_PASSWORD="$POSTGRES_PASSWORD" \
0 commit comments