-
-
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
Container definition API #7714
Container definition API #7714
Conversation
Co-authored-by: Sergei Egorov <bsideup@gmail.com>
modules/mongodb/src/main/java/org/testcontainers/containers/MongoDBContainer.java
Outdated
Show resolved
Hide resolved
modules/mongodb/src/main/java/org/testcontainers/containers/MongoDBContainer.java
Outdated
Show resolved
Hide resolved
core/src/test/java/org/testcontainers/containers/ExposedHostTest.java
Outdated
Show resolved
Hide resolved
private List<Bind> binds = new ArrayList<>(); | ||
|
||
private boolean privilegedMode; | ||
|
||
@NonNull | ||
private List<VolumesFrom> volumesFroms = new ArrayList<>(); |
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.
Will we move it in a follow-up PR to avoid breaking changes?
modules/neo4j/src/test/java/org/testcontainers/containers/Neo4jContainerTest.java
Outdated
Show resolved
Hide resolved
core/src/test/java/org/testcontainers/containers/ExposedHostTest.java
Outdated
Show resolved
Hide resolved
Map<String, String> combinedLabels = new HashMap<>(); | ||
combinedLabels.putAll(labels); | ||
if (createCommand.getLabels() != null) { | ||
combinedLabels.putAll(createCommand.getLabels()); | ||
} | ||
|
||
createCommand.withLabels(combinedLabels); |
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.
This is a breaking change, as previously we were combining the labels
Map<String, String> combinedLabels = new HashMap<>(); | ||
combinedLabels.putAll(labels); | ||
if (createCommand.getLabels() != null) { | ||
combinedLabels.putAll(createCommand.getLabels()); | ||
} | ||
|
||
createCommand.withLabels(combinedLabels); |
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.
This breaks the order with regards to CreateContainerCmdModifier
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.
Since this is a change to to an undocumented internal behavior, we are fine with accepting it.
Sadly it broke our tests. 😄 |
Sorry, but that doesn't provide much information about the issue you are having. We have been reported about some regressions and some of them are fixed now, see this list. There is one more that should be fixed tomorrow. If you can not find yours, please feel free to open a new issue. |
Hi @eddumelendez, |
Introduce
ContainerDef
and apply it toPortForwardingContainer
and
MongoDBContainer
.