Files
mtusi2026lab2/student-tests/run_all.sh
T
Ilya e914e384fc
Skeleton contracts / contracts (pull_request) Canceled after 0s
выполнение лр2 на 4
2026-10-07 18:28:12 +03:00

25 lines
834 B
Bash
Executable File

#!/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"