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.3k stars 450 forks source link

chore: test cleanups #2608

Closed ash2k closed 5 days ago

ash2k commented 6 days ago

What does this PR do?

I was debugging failures in CI and found a few issues in code. See individual commits. I think the failure was not a real log reading failure - the container just failed to start for an unexpected reason but the test didn't catch it because it didn't check the error message.

Then, panic is a red herring too because the returned container is nil.

Why is it important?

We want clear test signals that help pinpoint the bugs, we don't want hard to understand failures.

Related issues

netlify[bot] commented 6 days ago

Deploy Preview for testcontainers-go ready!

Name Link
Latest commit 9d6ff022a3e926b588ad17b5a1536388efa4bd52
Latest deploy log https://app.netlify.com/sites/testcontainers-go/deploys/667cd99ddac08f00081f4e17
Deploy Preview https://deploy-preview-2608--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.

mdelapenya commented 5 days ago

The tests failing for the rootless mode are not related. Merging