mirror of
https://github.com/gofiber/storage.git
synced 2025-10-05 16:48:25 +08:00
chore: remove wait strategy, it's handled by the module
This commit is contained in:
@@ -11,7 +11,6 @@ import (
|
|||||||
|
|
||||||
"github.com/testcontainers/testcontainers-go"
|
"github.com/testcontainers/testcontainers-go"
|
||||||
"github.com/testcontainers/testcontainers-go/modules/redis"
|
"github.com/testcontainers/testcontainers-go/modules/redis"
|
||||||
"github.com/testcontainers/testcontainers-go/wait"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
@@ -90,10 +89,6 @@ func newConfigFromContainer(t testing.TB, opts ...testStoreOption) Config {
|
|||||||
|
|
||||||
tcOpts := []testcontainers.ContainerCustomizer{}
|
tcOpts := []testcontainers.ContainerCustomizer{}
|
||||||
|
|
||||||
waitStrategies := []wait.Strategy{
|
|
||||||
wait.ForListeningPort(redisPort).WithStartupTimeout(time.Second * 10),
|
|
||||||
}
|
|
||||||
|
|
||||||
if settings.withTLS {
|
if settings.withTLS {
|
||||||
tcOpts = append(tcOpts, redis.WithTLS())
|
tcOpts = append(tcOpts, redis.WithTLS())
|
||||||
|
|
||||||
@@ -116,8 +111,6 @@ func newConfigFromContainer(t testing.TB, opts ...testStoreOption) Config {
|
|||||||
tcOpts = append(tcOpts, testcontainers.WithCmd(cmds...))
|
tcOpts = append(tcOpts, testcontainers.WithCmd(cmds...))
|
||||||
}
|
}
|
||||||
|
|
||||||
tcOpts = append(tcOpts, testcontainers.WithWaitStrategy(waitStrategies...))
|
|
||||||
|
|
||||||
c, err := redis.Run(ctx, img, tcOpts...)
|
c, err := redis.Run(ctx, img, tcOpts...)
|
||||||
testcontainers.CleanupContainer(t, c)
|
testcontainers.CleanupContainer(t, c)
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
|
Reference in New Issue
Block a user