Skip to content

Commit bc6454e

Browse files
committed
Fix testcontainers Port type after dependency update
testcontainers-go now returns network.Port (from moby/moby/api) instead of nat.Port (from docker/go-connections). Update test signatures in customlabels and luajit to match.
1 parent 621e9bc commit bc6454e

3 files changed

Lines changed: 7 additions & 7 deletions

File tree

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ require (
1616
github.com/aws/aws-sdk-go-v2/service/s3 v1.97.1
1717
github.com/cilium/ebpf v0.21.0
1818
github.com/coreos/pkg v0.0.0-20240122114842-bbd7aa9bf6fb
19-
github.com/docker/go-connections v0.6.0
2019
github.com/elastic/go-freelru v0.16.0
2120
github.com/elastic/go-perf v0.0.0-20260224073651-af0ee0c731b7
2221
github.com/google/uuid v1.6.0
2322
github.com/klauspost/compress v1.18.5
2423
github.com/mdlayher/kobject v0.0.0-20200520190114-19ca17470d7d
2524
github.com/minio/sha256-simd v1.0.1
25+
github.com/moby/moby/api v1.54.1
2626
github.com/open-telemetry/sig-profiling/tools/profcheck v0.0.0-20260303084341-52f633d434c9
2727
github.com/parca-dev/oomprof v0.1.6
2828
github.com/parca-dev/usdt v0.0.2
@@ -82,6 +82,7 @@ require (
8282
github.com/cpuguy83/dockercfg v0.3.2 // indirect
8383
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
8484
github.com/distribution/reference v0.6.0 // indirect
85+
github.com/docker/go-connections v0.6.0 // indirect
8586
github.com/docker/go-units v0.5.0 // indirect
8687
github.com/ebitengine/purego v0.10.0 // indirect
8788
github.com/felixge/httpsnoop v1.0.4 // indirect
@@ -108,7 +109,6 @@ require (
108109
github.com/mitchellh/reflectwalk v1.0.2 // indirect
109110
github.com/moby/docker-image-spec v1.3.1 // indirect
110111
github.com/moby/go-archive v0.2.0 // indirect
111-
github.com/moby/moby/api v1.54.1 // indirect
112112
github.com/moby/moby/client v0.4.0 // indirect
113113
github.com/moby/patternmatcher v0.6.1 // indirect
114114
github.com/moby/sys/sequential v0.6.0 // indirect

interpreter/customlabels/integrationtests/node_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import (
3030

3131
"time"
3232

33-
"github.com/docker/go-connections/nat"
33+
"github.com/moby/moby/api/types/network"
3434
"github.com/stretchr/testify/require"
3535
testcontainers "github.com/testcontainers/testcontainers-go"
3636
"github.com/testcontainers/testcontainers-go/wait"
@@ -52,7 +52,7 @@ var files = []string{
5252
"broken.md",
5353
}
5454

55-
func runTest(t *testing.T, ctx context.Context, host string, port nat.Port) {
55+
func runTest(t *testing.T, ctx context.Context, host string, port network.Port) {
5656
enabledTracers, err := tracertypes.Parse("labels,v8")
5757
require.NoError(t, err)
5858

@@ -292,7 +292,7 @@ func startNightlyContainer(ctx context.Context,
292292
return cont
293293
}
294294

295-
func testHTTPEndpoint(t *testing.T, host string, port nat.Port) {
295+
func testHTTPEndpoint(t *testing.T, host string, port network.Port) {
296296
const numGoroutines = 10
297297
const requestsPerGoroutine = 10000
298298

interpreter/luajit/luajit_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import (
2222
"testing"
2323
"time"
2424

25-
"github.com/docker/go-connections/nat"
25+
"github.com/moby/moby/api/types/network"
2626
"github.com/stretchr/testify/require"
2727
testcontainers "github.com/testcontainers/testcontainers-go"
2828
"github.com/testcontainers/testcontainers-go/wait"
@@ -220,7 +220,7 @@ func startContainer(ctx context.Context, t *testing.T, image string) testcontain
220220
}
221221

222222
func makeRequests(ctx context.Context, t *testing.T, wg *sync.WaitGroup,
223-
res, h string, p nat.Port) {
223+
res, h string, p network.Port) {
224224
wg.Add(1)
225225
numRequests := 0
226226
tick := time.NewTicker(5 * time.Second)

0 commit comments

Comments
 (0)