Skip to content

Commit 8eb656e

Browse files
committed
wip: add default network mode specifically for windows
1 parent b5afc24 commit 8eb656e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test/integration/helpers/helpers.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import (
88
"fmt"
99
"io"
1010
"log"
11+
"runtime"
1112
"strings"
1213
"sync"
1314
"testing"
@@ -413,6 +414,12 @@ func createNeo4jContainer(ctx context.Context) (testcontainers.Container, string
413414
WaitingFor: wait.ForListeningPort("7687/tcp").WithStartupTimeout(119 * time.Second),
414415
}
415416

417+
// On Windows, Docker doesn't support bridge networks for Linux containers
418+
// Use default network mode instead
419+
if runtime.GOOS == "windows" {
420+
req.NetworkMode = "default"
421+
}
422+
416423
ctr, err := testcontainers.GenericContainer(ctx, testcontainers.GenericContainerRequest{
417424
ContainerRequest: req,
418425
Started: true,

0 commit comments

Comments
 (0)