level 3 basics
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
Grade 3 checks. No tokens, passwords, or connection strings.
|
||||
|
||||
make check equivalent:
|
||||
.venv/Scripts/python.exe scripts/check_contract.py
|
||||
PASS: offline skeleton structure, local refs and Python syntax; application NOT tested.
|
||||
|
||||
Pinned image smoke, http://127.0.0.1:8080:
|
||||
.venv/Scripts/python.exe tests/smoke.py --base-url http://127.0.0.1:8080
|
||||
PASS: lab2 public API scenario; infrastructure and grading evidence remain separate.
|
||||
|
||||
Persistence on the same image. The public harness executes scripts/restart.sh.
|
||||
On this Windows host CreateProcess cannot run a shell script (WinError 193), and the
|
||||
only WSL distro is docker-desktop. The harness was therefore run inside docker:28-cli
|
||||
with python3, the compose network, and the Docker socket. The hook was still
|
||||
scripts/restart.sh. BASE_URL was http://api:8080.
|
||||
PASS: persistence preserved confirmed data and existing session.
|
||||
|
||||
Containers before and after that hook kept the same IDs (restart, not recreate):
|
||||
api 15bfccf88c7a
|
||||
postgres cbe7139645a5
|
||||
Volume still present: mtusi2026lab2-fork_pgdata
|
||||
|
||||
Second API start, same volume, migrations not re-inserted:
|
||||
before: migrations=1 users=14 messages=6
|
||||
after: migrations=1 users=14 messages=6
|
||||
|
||||
Unknown member:
|
||||
.venv/Scripts/python.exe scripts/check_grade3.py
|
||||
PASS: unknown member returns 400 and leaves no chat row
|
||||
|
||||
Short TTL, separate from persistence. API recreated with SESSION_TTL_SECONDS=2,
|
||||
then .env restored to 3600 and the API recreated again.
|
||||
PASS: same token got 401 after 3 seconds.
|
||||
|
||||
Postgres stopped, API left running:
|
||||
GET /health/live 200 {"status":"ok"}
|
||||
GET /health/ready 503 {"error":{"code":"unavailable","message":"Хранилище недоступно",...}}
|
||||
request_id in the body matched X-Request-Id. Body had no SQL.
|
||||
Postgres was started again; /health/ready returned 200.
|
||||
Reference in New Issue
Block a user