Skip to content

Commit 22c9c38

Browse files
anandgupta42claude
andcommitted
fix: pass explicit postgres user in Verdaccio sanity test
The sanity container runs as root, so the CLI's auto-discovery connected to postgres as "root" — which doesn't exist. Fix: - Add TEST_PG_USER=postgres to docker-compose env vars - Export ALTIMATE_CODE_CONN_PG_TEST with explicit user/password in smoke-tests.sh so the CLI uses the correct credentials Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent bde8c84 commit 22c9c38

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

test/sanity/docker-compose.verdaccio.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ services:
2222
- ALTIMATE_CODE_CONN_SNOWFLAKE_TEST
2323
- TEST_PG_HOST=postgres
2424
- TEST_PG_PORT=5432
25+
- TEST_PG_USER=postgres
2526
- TEST_PG_PASSWORD=testpass123
2627
- TEST_MONGODB_HOST=mongodb
2728
- TEST_MONGODB_PORT=27017

test/sanity/phases/smoke-tests.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,10 @@ test_postgres() {
9191
fi
9292
fi
9393
cd "$WORKDIR" || return 1
94+
# Export explicit connection config so the CLI doesn't guess the user
95+
local pg_user="${TEST_PG_USER:-postgres}"
96+
local pg_pass="${TEST_PG_PASSWORD:-testpass123}"
97+
export ALTIMATE_CODE_CONN_PG_TEST="{\"type\":\"postgres\",\"host\":\"${pg_host}\",\"port\":${pg_port},\"user\":\"${pg_user}\",\"password\":\"${pg_pass}\",\"database\":\"postgres\"}"
9498
altimate_run "postgres" "run SELECT 1 against postgres at ${pg_host}:${pg_port}"
9599
local output=$(get_output "postgres")
96100
if echo "$output" | grep -qi "TIMEOUT\|unhandled"; then

0 commit comments

Comments
 (0)