Skip to content

Commit

Permalink
redis
Browse files Browse the repository at this point in the history
  • Loading branch information
dominikus1993 committed Mar 29, 2024
1 parent 0057ee2 commit 29c63dd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion redis/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package redis
import "github.com/dominikus1993/integrationtestcontainers-go/common"

var defaultMongoContainerConfiguration = &RedisContainerConfiguration{
image: "redis:6",
image: "redis:7",
port: 6379,
exposedPort: 6379,
}
Expand Down
3 changes: 2 additions & 1 deletion redis/redis.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ func StartContainer(ctx context.Context, config *RedisContainerConfiguration) (*
req := testcontainers.ContainerRequest{
Image: config.image,
ExposedPorts: []string{fmt.Sprintf("%d/tcp", config.exposedPort)},
WaitingFor: wait.ForLog("* Ready to accept connections"),
WaitingFor: wait.ForExec([]string{"redis-cli", "ping"}),
}

container, err := testcontainers.GenericContainer(ctx, testcontainers.GenericContainerRequest{
ContainerRequest: req,
Started: true,
Expand Down

0 comments on commit 29c63dd

Please sign in to comment.