feat: крролик, по тщ 5 лаба

This commit is contained in:
Enterxx2
2026-11-10 12:38:09 +03:00
parent 1d8dfb7ea4
commit 595a959b96
65 changed files with 2692 additions and 216 deletions
+3 -2
View File
@@ -13,7 +13,7 @@ import subprocess
import httpx
import pytest
from helpers import ROOT, auth, png_bytes, upload_raw
from helpers import ROOT, auth, png_bytes, upload_raw, wait_attachment
pytestmark = pytest.mark.skipif(
os.environ.get("RUN_FAILURE_TESTS") != "1",
@@ -44,12 +44,13 @@ def test_download_survives_stop_of_uploading_replica(
content = png_bytes(800, 600, noise=True)
uploaded = upload_raw(api, alice, chat["id"], content)
assert uploaded.status_code == 201, uploaded.text
assert uploaded.status_code == 202, uploaded.text
attachment = uploaded.json()
uploader = uploaded.headers["X-Instance-Id"]
run_script("stop-one.sh", TARGET_INSTANCE_ID=uploader)
try:
attachment = wait_attachment(api, bob, attachment["id"])
served_by = set()
for _ in range(DOWNLOADS_AFTER_STOP):
response = api.get(