Лаба 4: вложения в S3, уровни 3-5, reconciler (трек 2)

This commit is contained in:
2026-11-14 09:19:07 +03:00
parent ec540a1a72
commit 0dc99c9e33
63 changed files with 4810 additions and 18 deletions
+12
View File
@@ -0,0 +1,12 @@
#!/bin/sh
# Одна сессия, 10 запросов через LB: в ответах должны быть >=2 разных X-Instance-Id.
set -eu
BASE="${BASE_URL:-http://localhost:8080}"
U="demo_$(date +%s)"
curl -sf -X POST "$BASE/api/v1/users" -H 'Content-Type: application/json' \
-d "{\"username\":\"$U\",\"display_name\":\"Demo\",\"password\":\"demo-password-123\"}" >/dev/null
TOKEN=$(curl -sf -X POST "$BASE/api/v1/auth/sessions" -u "$U:demo-password-123" \
| python3 -c 'import sys,json; print(json.load(sys.stdin)["token"])')
for i in 1 2 3 4 5 6 7 8 9 10; do
curl -si "$BASE/api/v1/users/me" -H "Authorization: Bearer $TOKEN" | grep -i '^x-instance-id'
done | sort | uniq -c