forked from mtusi2026/mtusi2026lab3
ЛР 3: балансировка, общая идемпотентность и исследование масштабирования
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Internal diagnostic only: invoke while PostgreSQL is deliberately stopped.
|
||||
|
||||
Business acceptance and all load/failure tests use the LB; no host API port is exposed.
|
||||
"""
|
||||
from pathlib import Path
|
||||
import sys
|
||||
|
||||
sys.path.insert(0, str(Path(__file__).resolve().parents[1] / 'tests'))
|
||||
from client import Client
|
||||
|
||||
c = Client('http://api:8080', timeout=8)
|
||||
c.call('GET', '/health/live', schema='Health')
|
||||
c.call('GET', '/health/ready', 503)
|
||||
print('PASS: DB unavailable -> process live=200, readiness=503 with API error envelope.')
|
||||
Reference in New Issue
Block a user