Описать запуск и сохранить результаты проверки

This commit is contained in:
2026-10-27 21:50:36 +03:00
parent d942679e5c
commit 2b6a04975f
13 changed files with 140 additions and 32 deletions
+3
View File
@@ -0,0 +1,3 @@
Command: docker compose --env-file .env config --quiet
Exit code: 0
Stdout: (empty)
+4
View File
@@ -0,0 +1,4 @@
Command: docker compose --env-file .env up -d --build --scale api=2; docker compose --env-file .env ps
Result: API image built; the one-shot migration job exited 0; postgres, redis, api-1, api-2 and lb became healthy.
LB bound to 127.0.0.1:8081. API, PostgreSQL and Redis host ports are not published.
Images: python:3.12.8-slim, postgres:16.4-alpine, redis:7.4.2-alpine, nginx:1.27.4-alpine.
+4
View File
@@ -0,0 +1,4 @@
Command: make check (GNU Make 4.3, Linux test runner)
Output:
python3 scripts/check_contract.py
PASS: offline skeleton structure, local refs and Python syntax; application NOT tested.
+4
View File
@@ -0,0 +1,4 @@
Command: make test-idempotency BASE_URL=http://lb:8080
Output:
python3 tests/idempotency.py --base-url "http://lb:8080"
PASS: 16 concurrent requests across 2 API replicas returned one Message; changed body returned 409.
+4
View File
@@ -0,0 +1,4 @@
Command: make test BASE_URL=http://lb:8080 (Linux runner attached to Compose network)
Output:
python3 tests/smoke.py --base-url "http://lb:8080"
PASS: lab3 public API scenario; infrastructure and grading evidence remain separate.
+4
View File
@@ -0,0 +1,4 @@
Command: make validate
Output:
python3 scripts/validate_openapi.py
PASS: full OpenAPI 3.1 and JSON Schema validation; application NOT tested.
+6
View File
@@ -0,0 +1,6 @@
Commands: docker compose --env-file .env run --rm migrate (twice); query schema_migrations
Output versions:
1
2
3
Both reruns exited 0; migration version rows were not duplicated.
+3
View File
@@ -0,0 +1,3 @@
Commands: sh -n scripts/restart.sh; sh -n scripts/stop-one.sh
Output:
PASS: POSIX hook syntax
+9
View File
@@ -0,0 +1,9 @@
Date: 2026-10-27
Code under test: d942679
Scenario: public tests/resilience.py failover mode. The selected X-Instance-Id was mapped to one API container and stopped; the 15-second test loop then sent writes through the LB using the same session.
Aggregate stdout:
observed_instances_before=2
successful_writes=108
failed_attempts=1
first_recovery_seconds=3.312
PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence.
+6
View File
@@ -0,0 +1,6 @@
Date: 2026-10-27
Code under test: d942679
Scenario: public tests/resilience.py persistence mode. A temporary Windows-compatible action wrapper ran docker compose restart postgres redis api lb; named volumes were retained.
Output:
Executing explicit persistence hook; hook output suppressed to avoid leaking secrets.
PASS: persistence preserved confirmed data and existing session. Hook scope needs operator evidence.
+6
View File
@@ -0,0 +1,6 @@
Дата и время: 2026-10-27, Europe/Moscow
Коммит реализации под проверкой: d942679
Docker Desktop Linux: 32 vCPU; 16 598 642 688 bytes RAM доступно Docker.
Лимит API: 1 CPU и 536 870 912 bytes памяти на реплику; запущено две реплики.
Профили: публичный smoke на синтетических данных; идемпотентность — 16 одновременных запросов с одним ключом; persistence — restart API/PostgreSQL/Redis/LB с сохранёнными volumes; failover — 15-секундный поток POST, 108 успешных ответов, 1 переходная ошибка, первая успешная запись через 3.312 секунды.
Failover — проверка критерия уровня 3, не нагрузочный benchmark; throughput и p95/p99 не заявляются.