Skip to content

Commit

Permalink
test: fix waiting for mysql container start
Browse files Browse the repository at this point in the history
  • Loading branch information
OpatrilPeter committed Sep 24, 2024
1 parent 8ca035a commit c4f3369
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/runtest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ TEST_MYSQL_DOCKER_IMAGE="${TEST_MYSQL_DOCKER_IMAGE:-mysql:8.0.39-debian}"
docker build --pull --tag=${IMAGE_NAME} --build-arg=TEST_MYSQL_DOCKER_IMAGE="${TEST_MYSQL_DOCKER_IMAGE}" db
docker rm --force ${CONTAINER_NAME} >/dev/null 2>&1 || true
docker run --detach --publish-all --name ${CONTAINER_NAME} ${IMAGE_NAME}
while [ -z "$(docker inspect --format='{{.NetworkSettings.IPAddress}}' ${CONTAINER_NAME})" ]; do
echo "Waiting for container ${CONTAINER_NAME} to start ..."
sleep 1
done
MYSQL_HOST=`docker inspect --format='{{.NetworkSettings.IPAddress}}' ${CONTAINER_NAME}`
set +e

Expand Down

0 comments on commit c4f3369

Please sign in to comment.