test(e2e): lock the behavior of the foreground up by ndeloof · Pull Request #14300 · docker/compose · GitHub
Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions pkg/e2e/testdata/TestUpDryRunCreatesNothing/compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
services:
db:
image: alpine
command: sleep infinity
init: true
healthcheck:
test: ["CMD", "false"]
interval: 1s
timeout: 1s
retries: 100
web:
image: alpine
command: echo web-started
depends_on:
db:
condition: service_healthy
13 changes: 13 additions & 0 deletions pkg/e2e/testdata/TestUpInteractiveHookLogs/compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
services:
app:
image: alpine
command: sh -c 'echo "app-read:$(cat /shared/init.txt)"; sleep 3'
volumes:
- data:/shared
pre_start:
- image: alpine
command: sh -c 'echo "pre-start-file-content" > /shared/init.txt'
post_start:
- command: echo post-start-hook-ran
volumes:
data:
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
services:
quick:
image: alpine
command: echo hi
long:
image: alpine
command: sleep infinity
init: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
services:
app:
image: alpine
command: sh -c 'echo "value=$VALUE"; sleep 2'
environment:
VALUE: ${VALUE:-one}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
services:
app:
image: alpine
command: sh -c 'if [ -f /tmp/ran ]; then echo second-run; else touch /tmp/ran; fi'
22 changes: 22 additions & 0 deletions pkg/e2e/testdata/TestUpInteractiveWaitsForHealthy/compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
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:
106 changes: 106 additions & 0 deletions pkg/e2e/up_interactive_test.go
Loading