Перенести собственную реализацию лабораторной 2 с сохранением контракта лабораторной 3

This commit is contained in:
2026-10-23 18:28:16 +03:00
parent 0ab3a341aa
commit 366b4be7b8
24 changed files with 983 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
"""Дождаться HTTP readiness перед запуском проверок."""
import argparse
import time
import urllib.request
parser=argparse.ArgumentParser()
parser.add_argument('--base-url',default='http://localhost:8080')
args=parser.parse_args()
for _ in range(120):
try:
with urllib.request.urlopen(args.base_url+'/health/ready',timeout=2) as response:
if response.status==200:
print('PASS: API ready')
break
except Exception:
time.sleep(0.5)
else:
raise SystemExit('API readiness timeout')