Skip to content

Commit 9d4c3c2

Browse files
authored
test(inputs.mongodb): Fix integration tests (#17922)
1 parent 1e660fc commit 9d4c3c2

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

plugins/inputs/mongodb/mongodb_server_test.go

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import (
44
"fmt"
55
"testing"
66

7-
"github.com/docker/go-connections/nat"
87
"github.com/stretchr/testify/require"
98
"github.com/testcontainers/testcontainers-go/wait"
109

@@ -18,13 +17,9 @@ func createTestServer(t *testing.T) *testutil.Container {
1817
container := testutil.Container{
1918
Image: "mongo",
2019
ExposedPorts: []string{servicePort},
21-
WaitingFor: wait.ForAll(
22-
wait.NewHTTPStrategy("/").WithPort(nat.Port(servicePort)),
23-
wait.ForLog("Waiting for connections"),
24-
),
20+
WaitingFor: wait.ForLog("Waiting for connections"),
2521
}
26-
err := container.Start()
27-
require.NoError(t, err, "failed to start container")
22+
require.NoError(t, container.Start(), "failed to start container")
2823

2924
return &container
3025
}

0 commit comments

Comments
 (0)