-
-
Notifications
You must be signed in to change notification settings - Fork 511
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
fix: mongodb replicaset should work with auth #2847
fix: mongodb replicaset should work with auth #2847
Conversation
✅ Deploy Preview for testcontainers-go ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It LGTM, although I left a few comments. I tested it locally and it indeed resolves the issues described in the original ticket, so thank you for working on this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for contributing the fix! Also for creating such a great commit history that allowed me to loop through it with ease.
@stevenh do you want to take a final look on it?
@abhipranay I added a commit on top with the fix for the lint: running |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
* main: chore: use require.Len instead of assert.Len (testcontainers#2854) chore: bump ryuk to 0.11.0 (testcontainers#2853) chore: enable usestdlibvars linter (testcontainers#2850) fix(compose): container initialisation (testcontainers#2844) fix!: data races (testcontainers#2843) fix: mongodb replicaset should work with auth (testcontainers#2847)
What does this PR do?
This PR fixes the bug for mongodb module where container doesn't start when
WithReplicaSet
option is used in combination withWithUsername
andWithPassword
.Why is it important?
Fixes the issue mentioned in #2755.
Idea here is to use wrapping entrypoint so that security keyfile can be created with proper permissions and under correct ownership.
Wrapper entrypoint is used only when necessary and not always.
The functional option pattern make it difficult to figure out what were all the configured options so we are using
req.Env
to share data across funtions.Related issues