From 61b3530aa04d496b0006afa069748ac05cf2c5e4 Mon Sep 17 00:00:00 2001 From: Your Name Date: Fri, 30 May 2025 20:47:51 +1200 Subject: [PATCH] :-'Generic Commit' --- test-docker.sh | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/test-docker.sh b/test-docker.sh index ae61e8c..5fe9573 100755 --- a/test-docker.sh +++ b/test-docker.sh @@ -77,19 +77,31 @@ fi #------------------------------------------------------------------------------------------------ title "Running tests" +# clear any existing containers. docker compose -f "${COMPOSE_FILE}" down docker compose -f "${COMPOSE_FILE}" rm -v +# run the container. docker compose -f "${COMPOSE_FILE}" up -d +# wait a bit. sleep 1 # wait until healthy. -wait_for_container "sos-test" +if ! wait_for_container "sos-test"; then + echo "----------------------------------------" + echo "Container sos-test is not healthy" + echo "----------------------------------------" + docker logs sos-test + docker inspect sos-test + die "Container sos-test is not healthy" +fi +# run the tests. "${SCRIPT_DIR}/test.sh" "http://localhost:7703" RESULT=$? +# clean up. docker compose -f "${COMPOSE_FILE}" down docker compose -f "${COMPOSE_FILE}" rm -v