Replies: 1 comment 2 replies
-
Hi, can you share a project that reproduces the issue, please? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Module
Core
Testcontainers version
1.19.3
Using the latest Testcontainers version?
Yes
Hi,
after updating our testcontainers dependency from 1.18.3 to 1.19.3, we get a number of errors in the testing stage of our buildpipeline when our testmethod calls stop() on a DockerComposeContainer instance. The error messages indicate that the environment variables referenced in our docker compose YAML file do not get dereferenced in the respective
docke-compose ... down
call which leads to the mentioned errors. We did not have this problem in pre 1.19.0 versions and have, for now, indeed downgraded our testcontainers dependency to 1.18.3.After some digging in the testcontainers code, I think the problem is this line in the stop() method:
testcontainers-java/core/src/main/java/org/testcontainers/containers/DockerComposeContainer.java
Line 175 in 10ecdce
The runWithCompose method is called without the env field leading to the aforementioned problems. I think this line should be:
this.composeDelegate.runWithCompose(this.localCompose, cmd, this.env);
If I am not mistanken, this should result in a behaviour equivalent to pre-1.19.X verions.
Any thoughts on this?
Best regards
Beta Was this translation helpful? Give feedback.
All reactions