testcontainers-python icon indicating copy to clipboard operation
testcontainers-python copied to clipboard

Feature: dependsOn functionality for DockerContainer

Open mgorsk1 opened this issue 1 year ago • 1 comments

What are you trying to do?

Improve TC-python feature parity with TC-java by enabling container to specify dependsOn, which should work similar to how depends_on in docker-compose does - container B that depends on container A won't be started until container A is in running state.

Why should it be done this way?

Control order/behavior for container startup in multi-container scenarios.

Other references:

Include any other relevant reading material about the enhancement.

mgorsk1 avatar Aug 13 '24 12:08 mgorsk1

I have implemented the depends_on functionality for DockerContainer, mirroring the dependsOn behavior in TC-java so that dependent containers only start once their dependencies are in the running state. The PR for this enhancement is now open: #728. Please check it out, and let me know if any changes are needed.

hari134 avatar Oct 26 '24 13:10 hari134