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

Add getConnectionString() for MongoDBContainer #5271

Merged
merged 5 commits into from
May 10, 2022

Conversation

mdedetrich
Copy link
Contributor

The Mongodb module currently does not have a helper method for getting the raw connection string without pointing to a database (there is getReplicaSetUrl but that always points to a database). Some tests work with their own database that aren't named test (i.e. akka/alpakka#2857). Furthermore (and as can be seen in the referenced PR) MONGODB_INTERNAL_PORT is private so creating your own getReplicaSetUrl has even more boilerplate.

I am not sure if there is a better name than getReplicaSetUrl, if not let me know.

@mdedetrich mdedetrich changed the title Add getConnectionString() Add getConnectionString() for MongoDBContainer Apr 15, 2022
@kiview
Copy link
Member

kiview commented Apr 18, 2022

Something seems to be wrong with the Javadoc, can you please check this locally? Also, could you add a test that uses the new method?

Copy link
Member

@eddumelendez eddumelendez left a comment

Choose a reason for hiding this comment

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

the javadoc should be link instead of value. After that the checks should pass.

mdedetrich and others added 2 commits April 20, 2022 03:09
…ngoDBContainer.java

Co-authored-by: Eddú Meléndez Gonzales <eddu.melendez@gmail.com>
…ngoDBContainer.java

Co-authored-by: Eddú Meléndez Gonzales <eddu.melendez@gmail.com>
@mdedetrich
Copy link
Contributor Author

@kiview I will write a test tomorrow

@kiview kiview requested a review from a team as a code owner May 10, 2022 05:43
@kiview kiview merged commit d4e7671 into testcontainers:master May 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants