Files
mtusi2026lab2/student-tests/run_all.sh

22 lines
604 B
Bash
Executable File

#!/bin/sh
set -eu
cd "$(dirname "$0")/.."
PY="${PYTHON:-python3}"
export BASE_URL="${BASE_URL:-http://localhost:8080}"
export SHORT_TTL_URL="${SHORT_TTL_URL:-http://localhost:8081}"
docker compose --profile ttl-test up -d --no-build --wait api-short-ttl >/dev/null 2>&1
for t in own_tests.py concurrency_test.py auth_test.py db_integrity_test.py dependency_test.py; do
echo "== $t"
"$PY" "student-tests/$t" "$BASE_URL"
echo
done
echo "== sigterm_test.sh"
sh student-tests/sigterm_test.sh
docker compose --profile ttl-test stop api-short-ttl >/dev/null 2>&1
echo
echo "ALL STUDENT TESTS PASSED"