ЛР4 БВТ2304 Запорожец на 3
Вложения: приватный S3-bucket (RustFS 1.0.4) + метаданные в PostgreSQL, upload PNG/JPEG с лимитами до декодирования, авторизованный download, attachment_ids в сообщениях, идемпотентный bootstrap bucket, failover/persistence/S3-down тесты и REPORT.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Executable
+15
@@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Один вход (одна сессия) -> 10 запросов через LB: какие реплики обслужили. Токен не печатается."""
|
||||
import os
|
||||
import sys
|
||||
from collections import Counter
|
||||
from pathlib import Path
|
||||
|
||||
sys.path.insert(0, str(Path(__file__).resolve().parents[1] / 'tests'))
|
||||
from client import Client # noqa: E402
|
||||
|
||||
c = Client(os.environ.get('BASE_URL', 'http://lb:8080'))
|
||||
alice = c.user('instances')
|
||||
served = [c.call('GET', '/api/v1/users/me', actor=alice, schema='User')['headers']['X-Instance-Id'] for _ in range(10)]
|
||||
print('X-Instance-Id sequence:', ' '.join(served))
|
||||
print('distinct replicas for one session without re-login:', dict(Counter(served)))
|
||||
Reference in New Issue
Block a user