Skip to content

More customizable postgres container#220

Merged
rnorth merged 3 commits intotestcontainers:masterfrom
barlog-m:master
Sep 22, 2016
Merged

More customizable postgres container#220
rnorth merged 3 commits intotestcontainers:masterfrom
barlog-m:master

Conversation

@barlog-m
Copy link
Copy Markdown
Contributor

@barlog-m barlog-m commented Sep 9, 2016

Postgres docker container can be with custom database name, user name and password. Sometimes it is necessary.

}

public PostgreSQLContainer(String dockerImageName) {
public PostgreSQLContainer(final String dockerImageName) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

use this(dockerImageName, "test", "test", "test")

@rnorth
Copy link
Copy Markdown
Member

rnorth commented Sep 11, 2016

Looks good to me - just one thing. I've generally erred away from constructor args for containers (apart from specifying container image name), and gone for fluent setters instead.

Is there a reason why the fluent setter pattern can't be used here? I'd prefer to be as consistent as possible...

Copy link
Copy Markdown
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.

This looks good to me - I'll check out and have a play locally, then merge. Thanks for this.

@rnorth rnorth merged commit beabd2b into testcontainers:master Sep 22, 2016
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.

3 participants