Pass env to ComposeDelegate in DockerComposeContainer#stop#8493
Pass env to ComposeDelegate in DockerComposeContainer#stop#8493eddumelendez merged 4 commits intotestcontainers:mainfrom
Conversation
This fixes issues on stopping when ENV-Variables are used inside the compose file. Issue was introduced in 7112db5. Fixes testcontainers#8492 Signed-off-by: Michael Musenbrock <michael.musenbrock@gmail.com>
This is the same change as in DockerComposeContainer, even though no error is reported here, because COMPOSE_PROJECT_NAME seems sufficient Signed-off-by: Michael Musenbrock <michael.musenbrock@gmail.com>
Signed-off-by: Michael Musenbrock <michael.musenbrock@gmail.com>
|
Hi @eddumelendez , I need to answer why ComposePassthroughTest is passing with two aspects:
For example having the following yaml: services:
redis:
image: redis
ports:
- ${REDIS_PORT}And then running: Whereas running both commands without So, even with this yaml DockerComposePassthroughTest would pass, BUT not ComposePassthroughTest
For example having the following yaml: services:
redis:
image: redis
environment:
test=${REDIS_PORT}And running WITHOUT |
|
I have added two tests, as described above, the |
core/src/main/java/org/testcontainers/containers/ComposeContainer.java
Outdated
Show resolved
Hide resolved
core/src/main/java/org/testcontainers/containers/DockerComposeContainer.java
Outdated
Show resolved
Hide resolved
|
Thanks for your contribution and detailed explanation, @mmusenbr ! |
…#8493) This issue was introduced in 7112db5. `DockerComposeContainer` and `ComposeContainer` now passes the env to the stop command in both implementations. Fixes testcontainers#8492 --------- Signed-off-by: Michael Musenbrock <michael.musenbrock@gmail.com> Co-authored-by: Eddú Meléndez Gonzales <eddu.melendez@gmail.com>
This fixes issues on stopping when ENV-Variables are used inside the compose file. Issue was introduced in 7112db5.
Fixes #8492