chore: wait for couchbase's listening port

This commit is contained in:
Manuel de la Peña
2025-02-19 16:29:52 +01:00
parent e91a22a066
commit 0f9476ea39

View File

@@ -9,6 +9,7 @@ import (
"github.com/stretchr/testify/require"
"github.com/testcontainers/testcontainers-go"
"github.com/testcontainers/testcontainers-go/modules/couchbase"
"github.com/testcontainers/testcontainers-go/wait"
)
const (
@@ -36,6 +37,7 @@ func newTestStore(t testing.TB) (*Storage, error) {
img,
couchbase.WithAdminCredentials(couchbaseUser, couchbasePass),
couchbase.WithBuckets(bucket),
testcontainers.WithWaitStrategy(wait.ForListeningPort("8091/tcp")),
)
testcontainers.CleanupContainer(t, c)
if err != nil {