Реализовать лабораторную 3 на основе lab2: балансировка и идемпотентность

This commit is contained in:
Владислав Гавриленко
2026-11-13 01:30:14 +03:00
parent 0ab3a341aa
commit 4322edcbec
21 changed files with 870 additions and 31 deletions
+21
View File
@@ -0,0 +1,21 @@
Date: 2026-11-13 (Europe/Moscow)
Target: http://localhost:8083 (HAProxy -> 2 API processes -> PostgreSQL)
$ make check
PASS: offline skeleton structure, local refs and Python syntax; application NOT tested.
$ make validate PYTHON=.venv/bin/python
PASS: full OpenAPI 3.1 and JSON Schema validation; application NOT tested.
$ make test BASE_URL=http://localhost:8083
PASS: lab3 public API scenario; infrastructure and grading evidence remain separate.
$ python3 student-tests/check.py --base-url http://localhost:8083
PASS: validation, access, Unicode, pagination and cursor scope
PASS: malformed JSON and duplicate username
PASS: Unicode/colon passwords, length boundaries, invalid chat creation
$ python3 student-tests/idempotency.py --base-url http://localhost:8083
PASS: 32 concurrent retries across >=2 replicas: one message; conflict, access, key scope and validation
$ postman request http://localhost:8083/health/ready --script-post-request <health assertions>
200 OK; 1 test passed (status, JSON and both tracing headers); exit 0
$ docker compose exec -T api python - < student-tests/db_check.py
PASS: repeated migrations preserve row counts; scrypt/token digests; FK and transaction rollback
$ docker compose exec -T lb haproxy -c -f /usr/local/etc/haproxy/haproxy.cfg
exit 0 (configuration valid)