diff --git a/test/helper.go b/test/helper.go index 8cd3a9e..493f7fa 100644 --- a/test/helper.go +++ b/test/helper.go @@ -15,6 +15,7 @@ import ( "gorm.io/gorm" "gorm.io/gorm/logger" + _ "github.com/lib/pq" "github.com/testcontainers/testcontainers-go" "github.com/testcontainers/testcontainers-go/wait" ) @@ -28,8 +29,7 @@ const ( func StartPostgresContainer(ctx context.Context) (*postgrescontainer.PostgresContainer, *gorm.DB, error) { - pgContainer, err := postgrescontainer.RunContainer(ctx, - testcontainers.WithImage("postgres:alpine"), + pgContainer, err := postgrescontainer.Run(ctx, "postgres:alpine", postgrescontainer.WithDatabase(databaseName), postgrescontainer.WithUsername(databaseUser), postgrescontainer.WithPassword(databasePassword),