testcontainers / testcontainers-go

Testcontainers for Go is a Go package that makes it simple to create and clean up container-based dependencies for automated integration/smoke tests. The clean, easy-to-use API enables developers to programmatically define containers that should be run as part of a test and clean up those resources when the test is done.
https://golang.testcontainers.org
MIT License
3.67k stars 504 forks source link

fix!: port forwarding clean up and make private #2881

Closed stevenh closed 2 weeks ago

stevenh commented 2 weeks ago

Ensure that when the port forward container is shutdown all forwarding is also stopped by switching to a context to handle cancellation correctly.

Ensure that port forwarding connection attempts are cancelled correctly when the container context is cancelled, previously these could wait for a longer timeout.

Don't cancel port forwarding when the context used to start a container is cancelled as this is unexpected behaviour as its a non-explicit use of the context after the function has returned.

Ensure forwarding clean up errors are reported on container stop and termination.

Ensure port forwarding connections are cleaned up if one of the requested ports reports an error on setup.

Port forwarding test style clean up.

Update sshd module to the latest version.

BREAKING_CHANGE: make port forwarding type and constructor private.

netlify[bot] commented 2 weeks ago

Deploy Preview for testcontainers-go ready!

Name Link
Latest commit 8516ea520534bf37782013d8c1f8b61cd402a28b
Latest deploy log https://app.netlify.com/sites/testcontainers-go/deploys/672cc366b53fa10008f4a3ce
Deploy Preview https://deploy-preview-2881--testcontainers-go.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.