fix: mongodb replicaset should work with auth#2847
Merged
mdelapenya merged 13 commits intotestcontainers:mainfrom Oct 28, 2024
Merged
fix: mongodb replicaset should work with auth#2847mdelapenya merged 13 commits intotestcontainers:mainfrom
mdelapenya merged 13 commits intotestcontainers:mainfrom
Conversation
✅ Deploy Preview for testcontainers-go ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
mdelapenya
reviewed
Oct 23, 2024
Member
mdelapenya
left a comment
There was a problem hiding this comment.
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
mdelapenya
previously approved these changes
Oct 23, 2024
Member
mdelapenya
left a comment
There was a problem hiding this comment.
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?
Member
|
@abhipranay I added a commit on top with the fix for the lint: running |
mdelapenya
added a commit
that referenced
this pull request
Oct 28, 2024
mdelapenya
added a commit
to mdelapenya/testcontainers-go
that referenced
this pull request
Oct 29, 2024
* 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)
ttruongatl
pushed a commit
to ttruongatl/testcontainers-go
that referenced
this pull request
Feb 15, 2025
* added custom entrypoint to setup keyfile with proper user permissions * added testcases for replicaset with auth * implementation to support replicaset with auth * removed unnecessary files * cleanup * added autodetection for user:group and entrypoint * added tests for replica set and auth for different images * renamed entrypoint to differentiate between custom entrypoint of testcontainers * code cleanup * renamed newly added tests * fixed names of tests to use slash separated options * fix: lint --------- Co-authored-by: Manuel de la Peña <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
This PR fixes the bug for mongodb module where container doesn't start when
WithReplicaSetoption is used in combination withWithUsernameandWithPassword.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.Envto share data across funtions.Related issues