Skip to content

Commit 0e3c655

Browse files
fix(tests): ensure Nginx is fully spun up before starting MC container (#3763)
1 parent 2d1e96f commit 0e3c655

File tree

5 files changed

+48
-5
lines changed

5 files changed

+48
-5
lines changed

tests/setuponlytests/generic-packs/docker-compose.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,15 @@ services:
33
image: nginx
44
volumes:
55
- ./web:/usr/share/nginx/html
6+
healthcheck:
7+
test: ["CMD", "curl", "--fail", "http://localhost/configs.zip"]
8+
interval: 3s
9+
timeout: 5s
10+
retries: 3
611
mc:
712
depends_on:
8-
- web
13+
web:
14+
condition: service_healthy
915
image: ${IMAGE_TO_TEST:-itzg/minecraft-server}
1016
environment:
1117
EULA: "true"

tests/setuponlytests/icon-gif-multiframe/docker-compose.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,16 @@ services:
33
image: nginx
44
volumes:
55
- ./web:/usr/share/nginx/html
6+
healthcheck:
7+
test:
8+
["CMD", "curl", "--fail", "http://localhost/motion-tween-example.gif"]
9+
interval: 3s
10+
timeout: 5s
11+
retries: 3
612
mc:
713
depends_on:
8-
- web
14+
web:
15+
condition: service_healthy
916
image: ${IMAGE_TO_TEST:-itzg/minecraft-server}
1017
environment:
1118
EULA: "true"

tests/setuponlytests/icon-png-atscale/docker-compose.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,21 @@ services:
33
image: nginx
44
volumes:
55
- ./web:/usr/share/nginx/html
6+
healthcheck:
7+
test:
8+
[
9+
"CMD",
10+
"curl",
11+
"--fail",
12+
"http://localhost/4737386_minecraft_squircle_icon.png",
13+
]
14+
interval: 3s
15+
timeout: 5s
16+
retries: 3
617
mc:
718
depends_on:
8-
- web
19+
web:
20+
condition: service_healthy
921
image: ${IMAGE_TO_TEST:-itzg/minecraft-server}
1022
environment:
1123
EULA: "true"

tests/setuponlytests/icon-png-scale/docker-compose.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,21 @@ services:
33
image: nginx
44
volumes:
55
- ./web:/usr/share/nginx/html
6+
healthcheck:
7+
test:
8+
[
9+
"CMD",
10+
"curl",
11+
"--fail",
12+
"http://localhost/4737386_minecraft_squircle_icon.png",
13+
]
14+
interval: 3s
15+
timeout: 5s
16+
retries: 3
617
mc:
718
depends_on:
8-
- web
19+
web:
20+
condition: service_healthy
921
image: ${IMAGE_TO_TEST:-itzg/minecraft-server}
1022
environment:
1123
EULA: "true"

tests/setuponlytests/packwiz/docker-compose.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,15 @@ services:
33
image: nginx
44
volumes:
55
- ./web:/usr/share/nginx/html
6+
healthcheck:
7+
test: ["CMD", "curl", "--fail", "http://localhost/pack.toml"]
8+
interval: 3s
9+
timeout: 5s
10+
retries: 3
611
mc:
712
depends_on:
8-
- web
13+
web:
14+
condition: service_healthy
915
image: ${IMAGE_TO_TEST:-itzg/minecraft-server}
1016
environment:
1117
EULA: "true"

0 commit comments

Comments
 (0)