File tree Expand file tree Collapse file tree 1 file changed +16
-8
lines changed
Expand file tree Collapse file tree 1 file changed +16
-8
lines changed Original file line number Diff line number Diff line change @@ -11,15 +11,15 @@ import (
1111 "github.com/pelletier/go-toml/v2"
1212 "github.com/rs/zerolog"
1313 "github.com/stretchr/testify/require"
14- "github.com/testcontainers/testcontainers-go"
15- "github.com/testcontainers/testcontainers-go/network"
1614 "os"
1715 "path/filepath"
1816 "strings"
1917 "sync"
2018 "testing"
2119 "text/template"
2220 "time"
21+
22+ tc "github.com/testcontainers/testcontainers-go"
2323)
2424
2525const (
@@ -146,14 +146,22 @@ func Load[X any](t *testing.T) (*X, error) {
146146}
147147
148148func DefaultNetwork (once * sync.Once ) error {
149- var net * testcontainers.DockerNetwork
150149 var err error
150+ name := "ctf"
151151 once .Do (func () {
152- net , err = network .New (
153- context .Background (),
154- network .WithLabels (map [string ]string {"framework" : "ctf" }),
155- )
156- DefaultNetworkName = net .Name
152+ f := false
153+ //nolint:staticcheck
154+ _ , err := tc .GenericNetwork (context .Background (), tc.GenericNetworkRequest {
155+ //nolint:staticcheck
156+ NetworkRequest : tc.NetworkRequest {
157+ Name : name ,
158+ EnableIPv6 : & f ,
159+ },
160+ })
161+ if err != nil {
162+ panic (fmt .Errorf ("failed to create default network: %w" , err ))
163+ }
164+ DefaultNetworkName = name
157165 })
158166 return err
159167}
You can’t perform that action at this time.
0 commit comments