Skip to content

Commit

Permalink
Tests: Wait for the minio-server to initialize before using it
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Page- committed Oct 10, 2024
1 parent 67ee7c8 commit c981a0b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions docker-compose.test-custom.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ services:
entrypoint: >
/bin/sh -c "
set -e;
while ! curl -I minio-server:9000/minio/health/live; do
sleep 1;
done
/usr/bin/mc config host add minio-server http://minio-server:9000 USERNAME PASSWORD;
/usr/bin/mc mb --ignore-existing minio-server/balena-pine-web-resources;
sleep infinity;
Expand Down

0 comments on commit c981a0b

Please sign in to comment.