Skip to content

Commit 7579c4f

Browse files
Fix postgres container health checks
Signed-off-by: Marcus Brandenburger <[email protected]>
1 parent 1f7f06b commit 7579c4f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

platform/view/services/storage/driver/sql/postgres/test_utils.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ func startPostgresWithLogger(c ContainerConfig, t Logger, printLogs bool) (func(
176176
nat.Port("5432/tcp"): struct{}{},
177177
},
178178
Healthcheck: &container.HealthConfig{
179-
Test: []string{"CMD-SHELL", "pg_isready -U postgres"},
179+
Test: []string{"CMD-SHELL", fmt.Sprintf("pg_isready -U %s -d %s", c.User, c.DBName)},
180180
Interval: time.Second,
181181
Timeout: time.Second,
182182
Retries: 10,

0 commit comments

Comments
 (0)