fix: increase testcontainer creation timeout

This commit is contained in:
Peter 2022-08-06 18:38:31 +02:00
parent 15b17deaba
commit b407ad3755
Signed by: prskr
GPG key ID: C1DB5D2E8DB512F9
2 changed files with 3 additions and 3 deletions

View file

@ -15,7 +15,7 @@ func PrepareRedisContainer(tb testing.TB) *config.Server {
tb.Helper()
const redisPort = "6379/tcp"
ctx, cancel := context.WithTimeout(context.Background(), 1*time.Minute)
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Minute)
tb.Cleanup(cancel)
container, err := testcontainers.GenericContainer(ctx, testcontainers.GenericContainerRequest{

View file

@ -26,7 +26,7 @@ func PreparePostgresContainer(tb testing.TB) (name string, cfg *config.Server) {
const postgresPort = "5432/tcp"
ctx, cancel := context.WithTimeout(context.Background(), 1*time.Minute)
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Minute)
tb.Cleanup(cancel)
container, err := testcontainers.GenericContainer(ctx, testcontainers.GenericContainerRequest{
@ -77,7 +77,7 @@ func PrepareMariaDBContainer(tb testing.TB) (name string, cfg *config.Server) {
const mysqlPort = "3306/tcp"
ctx, cancel := context.WithTimeout(context.Background(), 1*time.Minute)
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Minute)
tb.Cleanup(cancel)
container, err := testcontainers.GenericContainer(ctx, testcontainers.GenericContainerRequest{