#!/bin/sh # All student tests in one command. Needs the running compose stack; starts the # short-TTL instance itself. dependency_test/sigterm_test STOP AND START containers. # Usage: BASE_URL=http://localhost:8080 student-tests/run_all.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"