Skip to content
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

Improve the usability of GenericContainer #550

Merged
merged 3 commits into from
Jan 27, 2018
Merged

Conversation

bsideup
Copy link
Member

@bsideup bsideup commented Jan 20, 2018

What was changed:

  • store envs as Map, not List, so that one can get all envs as a map:
container.getEnvMap()
  • add withEnv with mapper:
.withEnv("JAVA_OPTS", it -> it.orElse("") + " -javaagent:/foo.jar")
  • use READ_WRITE bind mode if none was provided:
.withFileSystemBind("/foo", "/bar")

Also deprecated some methods from Container interface like fetchDockerDaemonInfo because we don't want to have them in our public API

@bsideup bsideup requested review from rnorth and kiview January 20, 2018 06:49
@rnorth
Copy link
Member

rnorth commented Jan 21, 2018

@@ -383,6 +408,7 @@ default Integer getFirstMappedPort() {
*/
SELF withLogConsumer(Consumer<OutputFrame> consumer);

@Deprecated
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this related to the change? Same question for deprecation getContainerInfo().

I don't mind deprecating these, as it makes things cleaner, but would it be possible to have a comment indicating a recommended alternative approach?

Copy link
Member

@rnorth rnorth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only the strange CircleCI failures and one minor comment re deprecated methods, otherwise LGTM!

Oops - also, please could you add an entry to the changelog?

@bsideup
Copy link
Member Author

bsideup commented Jan 22, 2018

@rnorth CircleCI failed because it was using the old configuration:
https://circleci.com/gh/testcontainers/testcontainers-java/829#config/containers/0

I've added deprecation notes and entries to CHANGELOG.md :)

@bsideup bsideup merged commit 39d5275 into master Jan 27, 2018
@bsideup bsideup deleted the container_usability branch January 27, 2018 11:13
@bsideup bsideup added this to the 1.6.0 milestone Jan 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants