forked from mtusi2026/mtusi2026lab2
выполнение лр2 на 4
This commit is contained in:
Executable
+24
@@ -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"
|
||||
Reference in New Issue
Block a user