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
I would like to propose to use this project https://golang.testcontainers.org/quickstart/ for our integration tests when it is needed to launch some containers. Example: To execute this image_test.go test, a local registry container is needed
We can easily use testcontainer to bootstrap a container as you can see hereafter:
Proposition
I would like to propose to use this project https://golang.testcontainers.org/quickstart/ for our integration tests when it is needed to launch some containers. Example: To execute this
image_test.go
test, a local registry container is neededWe can easily use testcontainer to bootstrap a container as you can see hereafter:
there is even a trick to bind the needed port (e.g 5001) to the port used by the docker registry:
5000
Test output will be now
NOTE: Test is failing as the imageTag assumes that we pushed the image to the registry
localhost:5001
but as testcontainer generates random port, then test will fail: https://golang.testcontainers.org/features/networking/#exposing-container-ports-to-the-host. To be investigatedThe text was updated successfully, but these errors were encountered: