-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add docker compose support for --build and --rmi options #1625
Conversation
import org.junit.Rule; | ||
import org.testcontainers.containers.DockerComposeContainer; | ||
|
||
public class DockerComposeContainerWithBuildTest extends BaseDockerComposeTest { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am afraid this test does not test it, and only covers the setter. If we break withBuild
, the test will continue to pass.
Also, the used compose file (https://github.com/testcontainers/testcontainers-java/blob/151b93ac065a420d0a803d2ebb8ba6d152c783a4/core/src/test/resources/compose-test.yml ) is rather heavy (mysql)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Regarding the test I was working on a version which tests the created image and so on.
Due to time issues I was not bale to finish it.
I can use a lighter compose file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've taken this on and am pushing the proposed change now.
/** | ||
* Remove all images used by any service. | ||
*/ | ||
all, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
perhaps we should use standard naming convention for enums (upper case) and have a field with flag's value?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, can do it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've taken this on and am pushing the proposed change now.
doTest(ALL, false, false); | ||
} | ||
|
||
private void doTest(final DockerComposeContainer.RemoveImages removeMode, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rnorth WDYT about using the parameterized runner instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May as well - done!
Replaces #1336
(credit to @sonerd)