add code for level 4

This commit is contained in:
Матвей
2026-10-08 19:08:55 +03:00
parent b158c88087
commit 13fa322ca2
21 changed files with 390 additions and 27 deletions
+16
View File
@@ -0,0 +1,16 @@
#!/usr/bin/env python3
"""Проверка 503 readiness при остановленном PostgreSQL."""
from pathlib import Path
import sys
sys.path.insert(0, str(Path(__file__).resolve().parents[1] / "tests"))
from client import Client, run # noqa: E402
def main() -> None:
Client().call("GET", "/health/ready", 503)
print("PASS: readiness rejects unavailable PostgreSQL")
if __name__ == "__main__":
run(main)