17 lines
431 B
Python
17 lines
431 B
Python
#!/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)
|