Fail attachment scenarios on invalid outcomes

This commit is contained in:
Artyom
2026-11-06 01:59:03 +03:00
parent 1aec062aba
commit 763b025557
2 changed files with 7 additions and 0 deletions
@@ -28,3 +28,6 @@ intent → PUT под блокировкой → ready COMMIT не меняет
Системный прокси macOS ломает loopback → NO_PROXY для localhost/127.0.0.1/::1.
Доказательства могут завершиться раньше ошибки из pipe → capture проверяет исходный exit code.
Старые цифры REPORT относятся к asyncpg → отдельные текущие заметки и явная маркировка старой серии.
Сценарии возвращают ненулевой exit при неверных статусах отказа S3, превышении границы 6 с
или готовом вложении после обрыва. Статус JSON сам по себе не считается успешной проверкой.
+4
View File
@@ -150,6 +150,8 @@ def s3_outage(c, args):
got = wait(lambda: content(c, bob, att), 30)
check(got["bytes"] == FIXTURE, "attachment changed across S3 outage")
expected = {"upload": 503, "download": 503, "text_message": 201}
check(all(during[k]["status"] == v for k, v in expected.items()), f"S3 outage: {during}")
check(all(during[k]["seconds"] < 6 for k in ("upload", "download")), "S3 timeout exceeded")
return {
"scenario": "s3-outage",
"s3_container_during_outage": stopped,
@@ -200,6 +202,8 @@ def abort_upload(c, args):
)
rows = out.stdout.split()
counts = dict(zip(rows[::2], (int(x) for x in rows[1::2])))
check(out.returncode == 0, "cannot inspect aborted upload")
check(counts.get("ready", 0) == 0, "aborted upload became ready")
alive = c.call("GET", "/api/v1/users/me", actor=alice, schema="User")["status"]
return {
"scenario": "abort-upload",