2026-11-20T04:53:36+03:00
make test-attachments

BASE_URL="http://localhost:8080" python3 scripts/attachments-check.py
ok: upload 201 ready, sha256=99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75, size=111817
ok: jpeg upload/download byte-identical; jpeg declared as png -> 415
ok: png with 40,000,000 pixels accepted and downloaded byte-identical
ok: filename with slash -> 400
ok: filename with NUL -> 400
ok: empty filename -> 400
ok: declared jpeg with png body -> 415
ok: truncated png -> 415
ok: 10485761 bytes -> 413
ok: text/plain -> 415
ok: unknown variant -> 400
ok: variant=original -> 200
ok: unknown attachment id -> 404
ok: upload by outsider -> 404
ok: attachment from another chat -> 404
ok: unknown attachment id in message -> 404
ok: duplicate attachment_ids -> 400
ok: eleven attachment_ids -> 400
ok: empty text without attachments -> 400
ok: idempotent replay with same attachment set -> same message
ok: absent attachment_ids equals [] for idempotency
ok: same key with a different attachment set -> 409
ok: history exposes attachment_ids on every message
PASS: 23 attachment contract checks
