Openldap module support#2117
Conversation
✅ Deploy Preview for testcontainers-go ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
* main: enable golangci-lint for redis module (testcontainers#2126) Go install gotestsum and golangci-lint (testcontainers#2127) improve OSSF score (testcontainers#2125) chore: run make lint on new modules (testcontainers#2122) enable golangci-lint for pulsar (testcontainers#2121) lint: enable testifylint (testcontainers#2120) chore(deps): bump github.com/nats-io/nats.go in /modules/nats (testcontainers#2094) chore(deps): bump golang.org/x/sys from 0.15.0 to 0.16.0 (testcontainers#2104) Revert "chore(deps): bump actions/upload-artifact from 3.1.3 to 4.0.0 (testcontainers#2088)"
mdelapenya
left a comment
There was a problem hiding this comment.
LGTM, thank you @jespino for this contribution!
Are you willing to add more features/options in this PR to it? If not, I think we can merge it
| } | ||
|
|
||
| // LoadLdif loads an ldif file into the OpenLDAP container | ||
| func (c *OpenLDAPContainer) LoadLdif(ctx context.Context, ldif []byte) error { |
There was a problem hiding this comment.
Do we want this API method here, or as a functional option to be passed to the RunContainer function? If the latter, I'd go with adding a post-starts hook doing what you already did in this method. More on this here: https://golang.testcontainers.org/features/creating_container/#lifecycle-hooks
To simplify that, the library comes with a WithStartupCommand option that you could leverage: https://golang.testcontainers.org/modules/cassandra/#startup-commands
There was a problem hiding this comment.
@jespino I think you want to add this method also as part of the functional options. Is it fine if we merge the PR as is and that option comes as a follow-up? I'd like to have it as part of the PR, but I also see it important to value your work merging the PR now.
There was a problem hiding this comment.
I'm actually working on that right now, I'm struggling to find the way of doing it in a way that I feel comfortable with.
There was a problem hiding this comment.
Great then! Let me know if I can be of any help
* main: (74 commits) chore(deps): bump github.com/docker/compose/v2 in /modules/compose (testcontainers#2162) feat(modules.cockroachdb) Adds cockroachdb module (testcontainers#2131) chore(deps): bump golang.org/x/crypto in /modules/minio (testcontainers#2161) chore(deps): bump golang.org/x/crypto in /modules/openldap (testcontainers#2165) chore(deps): bump github.com/google/uuid from 1.5.0 to 1.6.0 (testcontainers#2169) chore(deps): bump google.golang.org/api from 0.156.0 to 0.159.0, google.golang.org/grpc from 1.60.1 to 1.61.0, cloud.google.com/go/pubsub from 1.33.0 to 1.35.0 in /modules/gcloud (testcontainers#2168) chore(deps): bump github.com/hashicorp/consul/api in /examples/consul (testcontainers#2152) chore(deps): bump github.com/couchbase/gocb/v2 in /modules/couchbase (testcontainers#2145) chore(deps): bump k8s.io/api, k8s.io/apimachinery and k8s.io/client-go from 0.29.0 to 0.29.1 in /modules/k3s (testcontainers#2167) chore: do not compile modules on macos workers on GH (testcontainers#2164) Openldap module support (testcontainers#2117) Adding inbucket module (testcontainers#2142) testifylint: enable compares rule (testcontainers#2143) Bump containerd version to v1.7.12 (testcontainers#2137) feat: Add Minio module (testcontainers#2132) Adding LogConsumers start as part of the ContainerRequest (testcontainers#2073) chore: bring back assertion for network aliases for bridge in rootless mode (testcontainers#2141) chore(deps): bump github.com/docker/compose/v2 from 2.23.3 to 2.24.0 in /modules/compose (testcontainers#2096) chore(deps): bump github.com/dvsekhvalnov/jose2go in /modules/pulsar (testcontainers#2136) fix: skip-host-cache option removed in latest MySQL 8.3.0 version (testcontainers#2130) ...
What does this PR do?
This PR adds the OpenLDAP module.
Why is it important?
LDAP is a widely used technology that is a nice to have for testing purposes.
How to test this PR
This PR includes its own unit tests