feat: implement lab 4 attachments and storage reconciliation
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
# Что доказывает: уровень 4 — собственные тесты проходят через LB
|
||||
# рабочего стенда с двумя репликами: вложения (слишком большой файл,
|
||||
# повреждённое изображение, подмена MIME, чужое attachment_id, вложение
|
||||
# другого чата, опасный filename, 10 одновременных загрузок, скачивание
|
||||
# через другую реплику), обязательные сценарии лаб 1–3, гонки,
|
||||
# идемпотентность через разные реплики.
|
||||
# Дата: 2026-10-23T16:47:29Z (UTC)
|
||||
# Окружение: macOS 26.6.2, Apple M3 Pro; Docker 29.9.2, Compose 5.6.1;
|
||||
# uv Python 3.13.15, pytest 9.1.1.
|
||||
# Стенд: рабочий (`make up`, проект vladimirceva-lab4), HAProxy
|
||||
# 127.0.0.1:8180 (порт из .env), 2 реплики, EXPECT_REPLICAS=2.
|
||||
# Код: src_sha256 bc10d566e2f63173541445a2f6273b967447e13e5dd7f1fb76900934e5692cbe.
|
||||
# Как повторить: make up; make student-test [BASE_URL=http://localhost:<HOST_PORT>]
|
||||
# Проверки отказов (24, маркер fault) здесь не идут — только на своём
|
||||
# стенде: tests/failure-checks.txt.
|
||||
|
||||
$ make student-test BASE_URL=http://localhost:8180
|
||||
BASE_URL=http://localhost:8180 EXPECT_REPLICAS=2 uv run pytest
|
||||
============================= test session starts ==============================
|
||||
platform darwin -- Python 3.13.15, pytest-9.1.1, pluggy-1.6.0
|
||||
rootdir: <репозиторий>
|
||||
configfile: pyproject.toml
|
||||
testpaths: student-tests
|
||||
plugins: anyio-4.15.1
|
||||
collected 154 items / 24 deselected / 130 selected
|
||||
|
||||
student-tests/test_attachments.py ...................................... [ 29%]
|
||||
........ [ 35%]
|
||||
student-tests/test_auth.py ...................... [ 52%]
|
||||
student-tests/test_balancing.py ... [ 54%]
|
||||
student-tests/test_cache.py .... [ 57%]
|
||||
student-tests/test_idempotency.py ................... [ 72%]
|
||||
student-tests/test_race.py .... [ 75%]
|
||||
student-tests/test_request_id.py ............. [ 85%]
|
||||
student-tests/test_rubric.py ................... [100%]
|
||||
|
||||
===================== 130 passed, 24 deselected in 34.66s ======================
|
||||
|
||||
# Итог: 130 passed, пропусков нет (тесты реплик идут: EXPECT_REPLICAS=2),
|
||||
# из них 46 — test_attachments.py. Пользовательские ошибки (413, 415, 400,
|
||||
# 404) не превращаются в 500 — каждый негативный тест проверяет статус и
|
||||
# форму ошибки контракта.
|
||||
Reference in New Issue
Block a user