This commit is contained in:
@@ -77,19 +77,31 @@ fi
|
|||||||
#------------------------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------------------------
|
||||||
title "Running tests"
|
title "Running tests"
|
||||||
|
|
||||||
|
# clear any existing containers.
|
||||||
docker compose -f "${COMPOSE_FILE}" down
|
docker compose -f "${COMPOSE_FILE}" down
|
||||||
docker compose -f "${COMPOSE_FILE}" rm -v
|
docker compose -f "${COMPOSE_FILE}" rm -v
|
||||||
|
|
||||||
|
# run the container.
|
||||||
docker compose -f "${COMPOSE_FILE}" up -d
|
docker compose -f "${COMPOSE_FILE}" up -d
|
||||||
|
|
||||||
|
# wait a bit.
|
||||||
sleep 1
|
sleep 1
|
||||||
|
|
||||||
# wait until healthy.
|
# 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"
|
"${SCRIPT_DIR}/test.sh" "http://localhost:7703"
|
||||||
RESULT=$?
|
RESULT=$?
|
||||||
|
|
||||||
|
# clean up.
|
||||||
docker compose -f "${COMPOSE_FILE}" down
|
docker compose -f "${COMPOSE_FILE}" down
|
||||||
docker compose -f "${COMPOSE_FILE}" rm -v
|
docker compose -f "${COMPOSE_FILE}" rm -v
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user