testcontainers-go
testcontainers-go copied to clipboard
fix: mongodb replicaset should work with auth
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 with WithUsername
and WithPassword
.
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
- Closes #2755