You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a breaking change in the testcontainers-go dependency, that requires CustomizeRequestOption functions to return an error now. There are multiple places where this func signature is used. To stay up to date with the testcontainers project, the functions need to be updated.
As far as I understood, updating the dependency will also bump the minimal go version for wiremock-testcontainers-go to go 1.21
I believe I've run into an issue related to this tweak
I've been trying to use the examples/quickstart/quickstart_test.go
and found that there is an 'replace' (override) in examples/quickstart/go.mod
like this:
replace github.com/wiremock/wiremock-testcontainers-go => ../../../wiremock-testcontainers-go // needed to use new method written localy in the quickstart_test.go
AFAIK I need to remove that in order to use wiremock-testcontainers-go in my own project
So I removed the line above
Then when I run quickstart_test.go I see errors:
/Users/connor/go/pkg/mod/github.com/wiremock/[email protected]/tc-wiremock.go:94:9: cannot use func(req *testcontainers.GenericContainerRequest) {…} (value of type func(req *testcontainers.GenericContainerRequest)) as testcontainers.CustomizeRequestOption value in return statement
/Users/connor/go/pkg/mod/github.com/wiremock/[email protected]/tc-wiremock.go:107:9: cannot use func(req *testcontainers.GenericContainerRequest) {…} (value of type func(req *testcontainers.GenericContainerRequest)) as testcontainers.CustomizeRequestOption value in return statement
/Users/connor/go/pkg/mod/github.com/wiremock/[email protected]/tc-wiremock.go:119:9: cannot use func(req *testcontainers.GenericContainerRequest) {…} (value of type func(req *testcontainers.GenericContainerRequest)) as testcontainers.CustomizeRequestOption value in return statement
which led me to this thread/issue.
Fix
The fix I believe is to:
remove the 'replace' (override) in examples/quickstart/go.mod as above
Summary
There is a breaking change in the testcontainers-go dependency, that requires
CustomizeRequestOption
functions to return anerror
now. There are multiple places where this func signature is used. To stay up to date with the testcontainers project, the functions need to be updated.As far as I understood, updating the dependency will also bump the minimal go version for
wiremock-testcontainers-go
togo 1.21
References
testcontainers/testcontainers-go#2267
The text was updated successfully, but these errors were encountered: