From 0f9476ea392f569fdaeba4ed56cfc8cfa02133af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20de=20la=20Pe=C3=B1a?= Date: Wed, 19 Feb 2025 16:29:52 +0100 Subject: [PATCH] chore: wait for couchbase's listening port --- couchbase/couchbase_test.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/couchbase/couchbase_test.go b/couchbase/couchbase_test.go index dd8b6ed6..1995d70d 100644 --- a/couchbase/couchbase_test.go +++ b/couchbase/couchbase_test.go @@ -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 {