-
-
Notifications
You must be signed in to change notification settings - Fork 503
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
feat(MustConn): Add MustConnectionString on (some) dbs #2343
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.
One point about the unit tests, I could not figure out a way to get a panic out of the ConnectionString methods.
It's fine, I would not worry to get 100% coverage meanwhile it's clear, which this PR is.
Other than that, LGTM, thank you!
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 implementing this 👏
* main: (21 commits) feat: optimizes file copies to and from containers (testcontainers#2450) fix(exec): updates the `Multiplexed` opt to combine stdout and stderr (testcontainers#2452) Upgrade neo4j module to use features from v0.29.1 of testcontainers-go (testcontainers#2463) bug:Fix AMQPS url (testcontainers#2462) chore: more compose updates in comments chore: use "docker compose" (v2) instead of "docker-compose" (v1) (testcontainers#2464) chore(deps): bump github/codeql-action from 2.22.12 to 3.24.9 (testcontainers#2459) refactor: Add Weaviate modules tests (testcontainers#2447) feat(exitcode): Add exit code sugar method (testcontainers#2342) feat: add module to support InfluxDB v1.x (testcontainers#1703) feat: authenticate docker on PullImage (testcontainers#2446) feat: add distribution-registry module (testcontainers#2341) chore(deps): Bumping ChromaGo client version (testcontainers#2402) chore(deps): bump github.com/docker/docker from 25.0.3+incompatible to 25.0.5+incompatible (testcontainers#2444) feat: support passing io.Reader as ContainerFile (testcontainers#2401) chore: bump ryuk to latest (testcontainers#2395) feat(MustConn): Add MustConnectionString on (some) dbs (testcontainers#2343) fix: typo in ci-test-go.yml (testcontainers#2394) feat: support for waiting for response headers (testcontainers#2349) chore(deps): bump google.golang.org/protobuf from 1.32.0 to 1.33.0 (testcontainers#2392) ...
What does this PR do?
Adds
MustConnectionString
on a variety of DB containers. I skipped MSSQL because that was failing to run tests for me locally.There are probably more I can add them. Should I just add them to all containers with a
ConnectionString
method?Why is it important?
Not sure again, just looking at
good first issue
tags.#2134
How to test this PR
Run the unit tests.
One point about the unit tests, I could not figure out a way to get a
panic
out of theConnectionString
methods. I looked for ways to corrupt/mutate the exposed_ports and host, but could not figure out an entrypoint. So there is no test that it actually panics if unable to provide the connstring.