Uh oh!
There was an error while loading. Please reload this page.
fix(postgres): get_connection_url(driver=None) should return postgres://... - #588
Conversation
| set value. Pass :code:`driver=None` to get URLs without a driver. | ||
| """ | ||
| driver_str = self.driver if driver is _UNSET else f"+{driver}" | ||
| driver_str = "" if driver is None else self.driver if driver is _UNSET else f"+{driver}" |
There was a problem hiding this comment.
I would rather self.driver did not contain the leading +, then this could be simpler. But I imagine that could be a breaking change if people are relying on the internals of this class
There was a problem hiding this comment.
Agreed. I think we can introduce a Breaking change at a later stage, as part of some larger changes to inheritance for DB containers. This only looks good for now, and I think people would expect that if you pass None, the driver should be empty.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@## main #588 +/- ##
=======================================
Coverage ? 76.26% =======================================
Files ? 11 Lines ? 573 Branches ? 83 =======================================
Hits ? 437 Misses ? 110 Partials ? 26 ☔ View full report in Codecov by Sentry. |
🤖 I have created a release *beep* *boop* --- ## [4.7.1](testcontainers-v4.7.0...testcontainers-v4.7.1) (2024-07-02) ### Bug Fixes * **core:** bad rebase from [#579](#579) ([#635](#635)) ([4766e48](4766e48)) * **modules:** Mailpit Container ([#625](#625)) ([0b866ff](0b866ff)) * **modules:** SFTP Server Container ([#629](#629)) ([2e7dbf1](2e7dbf1)) * **network:** Now able to use Network without context, and has labels to be automatically cleaned up ([#627](#627)) ([#630](#630)) ([e93bc29](e93bc29)) * **postgres:** get_connection_url(driver=None) should return postgres://... ([#588](#588)) ([01d6c18](01d6c18)), closes [#587](#587) * update test module import ([#623](#623)) ([16f6ca4](16f6ca4)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Fixes#587