File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -352,6 +352,21 @@ writeShellApplication {
352352 rm -f "$PATCHED_TESTS_DIR/expected/roles.out.bak"
353353 fi
354354
355+ # Patch http.sql and http.out to use http_mock_host instead of localhost
356+ # This is needed because localhost inside container doesn't reach host's mock server
357+ if [[ -f "$PATCHED_TESTS_DIR/sql/http.sql" ]]; then
358+ sed -i.bak \
359+ -e "s@'http://localhost:'@'http://' || (SELECT value FROM test_config WHERE key = 'http_mock_host') || ':'@g" \
360+ "$PATCHED_TESTS_DIR/sql/http.sql"
361+ rm -f "$PATCHED_TESTS_DIR/sql/http.sql.bak"
362+ fi
363+ if [[ -f "$PATCHED_TESTS_DIR/expected/http.out" ]]; then
364+ sed -i.bak \
365+ -e "s@'http://localhost:'@'http://' || (SELECT value FROM test_config WHERE key = 'http_mock_host') || ':'@g" \
366+ "$PATCHED_TESTS_DIR/expected/http.out"
367+ rm -f "$PATCHED_TESTS_DIR/expected/http.out.bak"
368+ fi
369+
355370 log_info "Running pg_regress..."
356371 local regress_exit=0
357372
You can’t perform that action at this time.
0 commit comments