-
Notifications
You must be signed in to change notification settings - Fork 296
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
Make DockerCompose.get_service_info public #240
Conversation
Codecov Report
@@ Coverage Diff @@
## master #240 +/- ##
=======================================
Coverage 86.05% 86.05%
=======================================
Files 27 27
Lines 746 746
Branches 70 70
=======================================
Hits 642 642
Misses 80 80
Partials 24 24
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Co-authored-by: Till Hoffmann <[email protected]>
In the future it would make sense to depreciate the get_host and get_port methods in favour of this. |
@@ -64,8 +64,7 @@ def test_can_parse_multiple_compose_files(): | |||
assert host == "0.0.0.0" | |||
assert port == "3306" | |||
|
|||
host = compose.get_service_host("hub", 4444) |
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 more small change: let's check both methods for getting the information here to ensure we main backwards compatibility.
hi @csikb unfortunately this module has changed and your PR doesn't land so neatly - feel free to reply to this issue if this API is not sufficient as it seems to be similar in intent: it returns this object which contains the testcontainers-python/core/testcontainers/compose/compose.py Lines 29 to 38 in 5bef18a
unfortunately it doesn't quite work as expected on #457 (we normalize the host in the public API of the module), arguably we should normalize it "sooner"? |
I'm new to Python. I welcome every suggestion. :)