compose/pkg/e2e/testdata/TestUpInteractiveWaitsForHealthy/compose.yaml
Nicolas De Loof 07306856b4 test(e2e): lock the behavior of the foreground up
Most e2e coverage of the start phase runs detached; the foreground
`up`, whose create and start phases are driven by separate code paths,
had none for hooks, health-gated dependencies, a container that exits as
soon as it starts, restarts of exited containers, recreation, dependency
timeouts or dry-run. Add scenarios that fix these observables before the
machinery behind it changes.

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2026-10-26 10:52:50 +01:00

22 lines
508 B
YAML

services:
db:
image: alpine
command: sh -c 'sleep 3; touch /shared/ready; sleep 60'
init: true
volumes:
- shared:/shared
healthcheck:
test: ["CMD", "test", "-f", "/shared/ready"]
interval: 1s
timeout: 1s
retries: 30
web:
image: alpine
command: sh -c 'if [ -f /shared/ready ]; then echo web-saw-ready; else echo web-too-early; fi'
volumes:
- shared:/shared
depends_on:
db:
condition: service_healthy
volumes:
shared: