stack-orchestrator/testcontainers-compose-test.py

9 lines
385 B
Python
Raw Normal View History

2022-08-04 02:37:16 +00:00
from testcontainers.compose import DockerCompose
from testcontainers.core.docker_client import DockerClient
from testcontainers.core.exceptions import NoSuchPortExposed
from testcontainers.core.waiting_utils import wait_for_logs
with DockerCompose(filepath=".", compose_file_name="docker-compose-test.yaml") as compose:
port = compose.get_service_port("db", 5432)
print(port)