2
Skeleton contracts / contracts (pull_request) Canceled after 0s

This commit is contained in:
2026-10-16 19:49:48 +03:00
parent 65003b6119
commit c4ec287633
57 changed files with 4749 additions and 19 deletions
+9
View File
@@ -0,0 +1,9 @@
#!/bin/sh
# Проверка expiry: пересоздаёт api с SESSION_TTL_SECONDS=2, гоняет tests_student/test_expiry.py, возвращает штатный TTL.
set -eu
cd "$(dirname "$0")/.."
DC="docker compose --env-file .env"
wait_healthy() { i=0; until [ "$(docker inspect -f '{{.State.Health.Status}}' "$($DC ps -q api)")" = "healthy" ]; do i=$((i+1)); [ $i -le 60 ] || exit 1; sleep 1; done; }
trap 'SESSION_TTL_SECONDS= $DC up -d --force-recreate api >/dev/null; wait_healthy' EXIT
SESSION_TTL_SECONDS=2 $DC up -d --force-recreate api; wait_healthy
(cd tests_student && python3 test_expiry.py 2)