выполнение лр2 на 4

This commit is contained in:
Ilya
2026-10-07 18:28:12 +03:00
parent 65003b6119
commit e914e384fc
32 changed files with 2054 additions and 15 deletions
+24
View File
@@ -0,0 +1,24 @@
#!/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"