forked from mtusi2026/mtusi2026lab5
feat: крролик, по тщ 5 лаба
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user