X Tutup
Skip to content

Allow environment variables to be added from a map#150

Merged
rnorth merged 1 commit intotestcontainers:masterfrom
haines:with-env-map
Jun 10, 2016
Merged

Allow environment variables to be added from a map#150
rnorth merged 1 commit intotestcontainers:masterfrom
haines:with-env-map

Conversation

@haines
Copy link
Copy Markdown
Contributor

@haines haines commented Jun 1, 2016

Adds withEnv(Map<String, String>) to the Container interface, so that a bunch of environment variables from another source can be added at once.

return self();
}

/**
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.

you can do it as default method on Container interface as well since it's just a shortcut :)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I would have preferred to do that but unfortunately then the withEnv method would return Container rather than GenericContainer, which is annoying. I've raised #151 because I've run into this type-casting problem before.

@rnorth rnorth merged commit d91124d into testcontainers:master Jun 10, 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

X Tutup