Skip to content

add support for extra hosts to GenericContainer - #135

Merged
rnorth merged 2 commits into
testcontainers:masterfrom
tbinias:container-extra-hosts
Apr 24, 2016
Merged

rnorth merged 2 commits into
testcontainers:masterfrom
tbinias:container-extra-hosts

Conversation

@tbinias

@tbinias tbinias commented Apr 23, 2016

Copy link
Copy Markdown
Contributor

Hi, we are using testcontainers in our project to run end2end tests with selenium. Our web application runs on a vagrant box and rely on host names for rendering different states.

I have added support for the extra hosts property of the docker API for a GenericContainer.

It would be nice if this change will find it's way into your project.

@tbinias

tbinias commented Apr 23, 2016

Copy link
Copy Markdown
Contributor Author

The failing tests seams to be related to a missing virtuoso-rule. The test 'org.testcontainers.containers.VirtuosoJDBCDriverTest' also fails local on the master branch.

With the following patch tests are fine:
missing_rule_on_virtuoso_test.patch.txt

@rnorth

rnorth commented Apr 24, 2016

Copy link
Copy Markdown
Member

Hi,
This sounds good - I'll have a quick look at the code, but this would be a good feature to have. Thank you!

Re the test failures, this seems quite odd. I'll try and reproduce, but basically the patch that worked for you shouldn't really have changed anything - the JDBC support doesn't use a JUnit rule (it instead uses a proxying JDBC driver). So perhaps this is some kind of coincidence. I'll look into it - the verbose logs in the virtuoso module probably make it hard to figure out what's going on too!

Thanks
Richard

@NonNull
private List<String> portBindings = new ArrayList<>();

@NonNull

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.

Is it just Github's rendering, or is this indented by a few too many spaces?

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.

Just forgot to change the indent to space in my workspace, sorry.

@rnorth

rnorth commented Apr 24, 2016

Copy link
Copy Markdown
Member

I'm re-running the tests, as the build worked for me locally. Perhaps there was a temporary problem pulling the virtuoso container image and/or a problem with the image itself. I should separately stop the virtuoso container from using latest and instead use a tagged version.

@rnorth

rnorth commented Apr 24, 2016

Copy link
Copy Markdown
Member

FWIW I'll accept this PR with only Travis CI passing, as the CircleCI builds are not receiving the patch on master to disable Virtuoso build. FYI @tbinias, when you're ready.

@tbinias

tbinias commented Apr 24, 2016

Copy link
Copy Markdown
Contributor Author

@rnorth: I'm done.

@rnorth

rnorth commented Apr 24, 2016

Copy link
Copy Markdown
Member

Great, looks good to me.
Thank you!

@rnorth
rnorth merged commit 6d3ac72 into testcontainers:master Apr 24, 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.

2 participants