-
-
Notifications
You must be signed in to change notification settings - Fork 600
[Enhancement]: Expose the compose recreate options #1276
Copy link
Copy link
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Proposal
Currently, the implementation uses by default the "diverged" recreate strategy for docker-compose setups, and doesn't provide a way to override that:
testcontainers-go/modules/compose/compose_api.go
Lines 194 to 195 in bc15b11
| Recreate: api.RecreateDiverged, | |
| RecreateDependencies: api.RecreateDiverged, |
Does it make sense to also provide these as options?
The issue I am facing is when trying to start the compose setup incrementally, i.e. start a container, run some tests, start another container that uses the first one as a dependency and run some other tests. This gives me the following errors:
- if I specify the container dependencies as part of
RunServices (deps), it fails withThe container name "..." is already in use by container - If I dont, I get the
no such service: ...error
So, I guess if we have the Recreate and RecreateDependencies options exposed, that would help with this, and also allow for more flexible testing setups.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request