$ make test-failures
BASE_URL="http://localhost:8080" RUN_FAILURE_TESTS=1 poetry run pytest student-tests/test_dependency_failures.py -s
/Users/enterxx/Library/Python/3.9/lib/python/site-packages/urllib3/__init__.py:35: NotOpenSSLWarning: urllib3 v2 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with 'LibreSSL 2.8.3'. See: https://github.com/urllib3/urllib3/issues/3020
  warnings.warn(
============================= test session starts ==============================
platform darwin -- Python 3.12.12, pytest-9.1.1, pluggy-1.6.0 -- /Users/enterxx/Library/Caches/pypoetry/virtualenvs/max2-jSniokBX-py3.12/bin/python
cachedir: .pytest_cache
rootdir: /Users/enterxx/Desktop/university/4course/mtusi2026lab3
configfile: pyproject.toml
plugins: anyio-4.15.1
collecting ... collected 4 items

student-tests/test_dependency_failures.py::test_valkey_down_cache_is_bypassed PASSED
student-tests/test_dependency_failures.py::test_logout_during_valkey_outage_is_not_resurrected PASSED
student-tests/test_dependency_failures.py::test_postgres_down_returns_bounded_503_and_no_anonymous_access PASSED
student-tests/test_dependency_failures.py::test_session_survives_postgres_restart PASSED

============================== 4 passed in 11.79s ==============================
$ docker compose ps --format "{{.Name}}\t{{.Status}}"
messenger-lab3-api-1	Up 12 hours (healthy)
messenger-lab3-api-2	Up 12 hours (healthy)
messenger-lab3-nginx-1	Up 12 hours (healthy)
messenger-lab3-postgres-1	Up Less than a second (health: starting)
messenger-lab3-valkey-1	Up 8 seconds (healthy)
