This repository has been archived by the owner on Jun 28, 2024. It is now read-only.
Use pg.get_container_host_ip and pg.get_connection_url #65
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
get_container_host_ip()
andget_connection_url()
are provided by test containers as the way to get the correct URL to use, so they are preferred first.TC_HOST
is provided as an override for environments where testcontainers does not resolve the correct host address, in this case GitHub actions (removes hard-coded fallback that does not work on all platforms).Docker Desktop
check is a workaround for this issue Docker in Docker on Mac requires to use host.docker.internal testcontainers/testcontainers-python#159 which affects any platform using docker desktop, not just darwin.Note there is a completely separate issue (I will add to README in other PR) of finding the correct docker socket when using docker desktop. Docker patched this back for mac, but did not do the same for linux, so linux users must use a workaround like testcontainers/testcontainers-node#407 (comment) or testcontainers/testcontainers-node#407 (comment)