forked from mtusi2026/mtusi2026lab2
ЛР 2: PostgreSQL, сессии Basic/Bearer, Redis-кэш, тесты и отчёт
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
# 2026-10-15T10:02Z
|
||||
$ python student-tests/run.py
|
||||
== аутентификация ==
|
||||
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 - 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
|
||||
|
||||
21 passed, 0 failed
|
||||
|
||||
$ python student-tests/race.py
|
||||
sent=100 accepted=100 received=100 unique_ids=100 all_texts_present=True
|
||||
PASS
|
||||
Reference in New Issue
Block a user