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.49k stars 478 forks source link

[Bug]: TESTCONTAINERS_HUB_IMAGE_NAME_PREFIX trailing slash not handled properly #2746

Closed driverpt closed 2 weeks ago

driverpt commented 3 weeks ago

Testcontainers version

0.33.0

Using the latest Testcontainers version?

Yes

Host OS

MacOS

Host arch

x86

Go version

1.23

Docker version

Docker version 27.1.1, build 6312585

Docker info

N/A

What happened?

If we add a trailing slash to TESTCONTAINERS_HUB_IMAGE_NAME_PREFIX, which we do by convention, Test Containers doesn't handle this very well. All containers end up having something like i.e.:<custom_url>//<image> which causes it to fail.

Relevant log output

No response

Additional information

No response

mdelapenya commented 3 weeks ago

Where does that message come from? 😱