File tree Expand file tree Collapse file tree 4 files changed +6
-4
lines changed
Expand file tree Collapse file tree 4 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ import (
1919 "github.com/docker/model-runner/pkg/distribution/registry"
2020 "github.com/stretchr/testify/require"
2121 "github.com/testcontainers/testcontainers-go"
22+ tc "github.com/testcontainers/testcontainers-go/modules/registry"
2223 "github.com/testcontainers/testcontainers-go/network"
2324 "github.com/testcontainers/testcontainers-go/wait"
2425)
@@ -132,10 +133,7 @@ func setupTestEnv(t *testing.T) *testEnv {
132133
133134func ociRegistry (t * testing.T , ctx context.Context , net * testcontainers.DockerNetwork ) string {
134135 t .Log ("Starting OCI registry container..." )
135- ctr , err := testcontainers .Run (
136- ctx , "registry:3" ,
137- testcontainers .WithExposedPorts ("5000/tcp" ),
138- testcontainers .WithWaitStrategy (wait .ForHTTP ("/v2/" ).WithPort ("5000/tcp" ).WithStartupTimeout (30 * time .Second )),
136+ ctr , err := tc .Run (context .Background (), "registry:3" ,
139137 network .WithNetwork ([]string {"registry.local" }, net ),
140138 )
141139 require .NoError (t , err )
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ require (
2424 github.com/spf13/pflag v1.0.9
2525 github.com/stretchr/testify v1.11.1
2626 github.com/testcontainers/testcontainers-go v0.39.0
27+ github.com/testcontainers/testcontainers-go/modules/registry v0.39.0
2728 go.opentelemetry.io/otel v1.37.0
2829 go.uber.org/mock v0.5.0
2930 golang.org/x/sync v0.17.0
Original file line number Diff line number Diff line change @@ -334,6 +334,8 @@ github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu
334334github.com/stretchr/testify v1.11.1 /go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U =
335335github.com/testcontainers/testcontainers-go v0.39.0 h1:uCUJ5tA+fcxbFAB0uP3pIK3EJ2IjjDUHFSZ1H1UxAts =
336336github.com/testcontainers/testcontainers-go v0.39.0 /go.mod h1:qmHpkG7H5uPf/EvOORKvS6EuDkBUPE3zpVGaH9NL7f8 =
337+ github.com/testcontainers/testcontainers-go/modules/registry v0.39.0 h1:Wq08A4G5o/OYb68xWVzVWSHrpckpYab4+5u+8T5UaYQ =
338+ github.com/testcontainers/testcontainers-go/modules/registry v0.39.0 /go.mod h1:RIRXImSUJ5MYAiM8Hl39JdMD6pHsRsgfhgR+L22dhMk =
337339github.com/theupdateframework/notary v0.7.1-0.20210315103452-bf96a202a09a h1:tlJ7tGUHvcvL1v3yR6NcCc9nOqh2L+CG6HWrYQtwzQ0 =
338340github.com/theupdateframework/notary v0.7.1-0.20210315103452-bf96a202a09a /go.mod h1:Y94A6rPp2OwNfP/7vmf8O2xx2IykP8pPXQ1DLouGnEw =
339341github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU =
Original file line number Diff line number Diff line change @@ -133,6 +133,7 @@ github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8
133133github.com/coreos/go-systemd/v22 v22.5.0 /go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc =
134134github.com/cpuguy83/go-md2man/v2 v2.0.3 /go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o =
135135github.com/cpuguy83/go-md2man/v2 v2.0.5 /go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o =
136+ github.com/creack/pty v1.1.18 /go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4 =
136137github.com/danieljoos/wincred v1.2.2 h1:774zMFJrqaeYCK2W57BgAem/MLi6mtSE47MB6BOJ0i0 =
137138github.com/danieljoos/wincred v1.2.2 /go.mod h1:w7w4Utbrz8lqeMbDAK0lkNJUv5sAOkFi7nd/ogr0Uh8 =
138139github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 h1:8UrgZ3GkP4i/CLijOJx79Yu+etlyjdBU4sfcs2WYQMs =
You can’t perform that action at this time.
0 commit comments