Skip to content

Commit c981a0b

Browse files
committed
Tests: Wait for the minio-server to initialize before using it
This should help fix flakiness we're seeing with webresources where tests fail because we try to create the bucket before the minio server has initialized and therefore it causes test failures. This also adds a `set -e` so that if the command does still fail it should fail fast rather than after trying to run all the tests, and make it clearer where the error actually originates from Change-type: patch
1 parent 67ee7c8 commit c981a0b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

docker-compose.test-custom.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@ services:
3838
entrypoint: >
3939
/bin/sh -c "
4040
set -e;
41+
42+
while ! curl -I minio-server:9000/minio/health/live; do
43+
sleep 1;
44+
done
45+
4146
/usr/bin/mc config host add minio-server http://minio-server:9000 USERNAME PASSWORD;
4247
/usr/bin/mc mb --ignore-existing minio-server/balena-pine-web-resources;
4348
sleep infinity;

0 commit comments

Comments
 (0)