# student-tests # date: 2026-11-11T23:52:05 commit: 276dbda $ C:\Users\79152\AppData\Local\Python\pythoncore-3.14-64\python.exe student-tests/run.py --base-url http://localhost:8080 == аутентификация == ok - wrong password -> 401 + Basic challenge ok - unknown user -> 401 (same as wrong password) ok - no token -> 401 + Bearer challenge ok - X-User-Id alone gives no access ok - unknown/forged token -> 401 ok - Basic on business endpoint -> 401 ok - X-User-Id cannot override bearer identity ok - password shorter than 12 -> 400 == logout == ok - logout -> 204 ok - token after logout -> 401 ok - second logout -> 401 == гонка регистрации одного username == ok - 20 parallel registrations -> one 201, nineteen 409 (got [201, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409]) == ошибки и доступ (из lab1) == ok - malformed JSON -> 400 ok - duplicate username -> 409 ok - invalid username 'review123\n' -> 400, not 500 (got 400) ok - invalid username 'review123\r\n' -> 400, not 500 (got 400) ok - invalid username ' review123' -> 400, not 500 (got 400) ok - invalid username 'Review123' -> 400, not 500 (got 400) ok - invalid username 'ab' -> 400, not 500 (got 400) ok - blank message -> 400 ok - sender_id in body is rejected ok - outsider POST to foreign chat -> 404 ok - outsider GET foreign history -> 404 ok - invalid chat uuid -> 400 == пагинация == ok - 5 messages / limit 2 -> 3 pages, no duplicates ok - cursor from another chat -> 400 == Content-Type == ok - valid JSON with text/plain -> 415 (got 415) ok - message with text/plain -> 415 (got 415) ok - text/plain without token -> 401 first (got 401) ok - application/json; charset=utf-8 accepted (got 201) 30 passed, 0 failed [exit 0] $ C:\Users\79152\AppData\Local\Python\pythoncore-3.14-64\python.exe student-tests/idempotency.py --base-url http://localhost:8080 == 20 параллельных запросов с одним ключом == ok - all parallel repeats -> 201 (got [201]) ok - all responses carry the same message id (1 distinct) ok - requests were served by >=2 replicas (2) ok - exactly one message in history ok - every replay returns the identical Message == семантика ключа == ok - same key, different body -> 409 (got 409) ok - other JSON formatting = same request (got 201) ok - same key in another chat is independent ok - same key from another user is independent ok - missing Idempotency-Key -> 400 (got 400) ok - invalid key 'has space'... -> 400 (got 400) ok - invalid key 'xxxxxxxxxxxx'... -> 400 (got 400) ok - invalid key 'slash/key'... -> 400 (got 400) ok - replay without session -> 401, access re-checked (got 401) == неопределённый результат: клиент повторяет с тем же ключом == ok - retry after uncertain result -> 201 ok - still exactly one message 16 passed, 0 failed [exit 0]