Created At: 2026-11-18T07:56:31Z Completed At: 2026-11-18T07:56:39Z Command exited with code 1. Command output: ============================= test session starts ============================== platform linux -- Python 3.12.3, pytest-9.2.0, pluggy-1.7.0 -- /root/telegram-saas/.venv/bin/python3 cachedir: .pytest_cache rootdir: /root/telegram-saas configfile: pyproject.toml testpaths: tests plugins: anyio-4.16.0, asyncio-1.5.0 asyncio: mode=Mode.AUTO, debug=False, asyncio_default_fixture_loop_scope=function, asyncio_default_test_loop_scope=function collecting ... collected 56 items tests/integration/test_auth.py::test_auth_workflow PASSED [ 1%] tests/integration/test_celery_telegram_tasks.py::test_telegram_update_task_execution PASSED [ 3%] tests/integration/test_emojis_api.py::test_search_emojis_by_term PASSED [ 5%] tests/integration/test_emojis_api.py::test_search_emojis_by_category PASSED [ 7%] tests/integration/test_emojis_api.py::test_get_categories_list PASSED [ 8%] tests/integration/test_health.py::test_health_liveness PASSED [ 10%] tests/integration/test_health.py::test_health_readiness FAILED [ 12%] tests/integration/test_i18n_api.py::test_get_locales_list PASSED [ 14%] tests/integration/test_i18n_api.py::test_get_translation_bundle PASSED [ 16%] tests/integration/test_i18n_api.py::test_update_user_locale PASSED [ 17%] tests/integration/test_i18n_api.py::test_save_custom_translation_override PASSED [ 19%] tests/integration/test_message_studio_api.py::test_bot_message_studio_lifecycle PASSED [ 21%] tests/integration/test_multi_bot_engine.py::test_multi_tenant_multi_bot_engine_lifecycle PASSED [ 23%] tests/integration/test_text_designer_api.py::test_text_designer_api_endpoints PASSED [ 25%] tests/tenant_isolation/test_tenant_isolation.py::test_strict_tenant_isolation PASSED [ 26%] tests/unit/test_bot_engine.py::test_bot_token_validation_with_getme PASSED [ 28%] tests/unit/test_bot_engine.py::test_bot_token_encryption_and_decryption PASSED [ 30%] tests/unit/test_bot_engine.py::test_webhook_secret_generation_and_verification PASSED [ 32%] tests/unit/test_bot_engine.py::test_rate_limit_retry_handling PASSED [ 33%] tests/unit/test_emojis.py::test_telegram_html_emoji_formatting PASSED [ 35%] tests/unit/test_emojis.py::test_telegram_markdown_emoji_formatting PASSED [ 37%] tests/unit/test_emojis.py::test_id_precision_is_preserved_as_string PASSED [ 39%] tests/unit/test_formatter_and_engine.py::test_box_header_formatting PASSED [ 41%] tests/unit/test_formatter_and_engine.py::test_separator_presets PASSED [ 42%] tests/unit/test_formatter_and_engine.py::test_info_block_formatting PASSED [ 44%] tests/unit/test_formatter_and_engine.py::test_progress_bar_generation PASSED [ 46%] tests/unit/test_formatter_and_engine.py::test_progress_step_header PASSED [ 48%] tests/unit/test_formatter_and_engine.py::test_telegram_message_builder PASSED [ 50%] tests/unit/test_i18n.py::test_supported_locales_catalog PASSED [ 51%] tests/unit/test_i18n.py::test_rtl_detection PASSED [ 53%] tests/unit/test_i18n.py::test_plural_rules PASSED [ 55%] tests/unit/test_i18n.py::test_formatting PASSED [ 57%] tests/unit/test_i18n.py::test_fallback_resolution PASSED [ 58%] tests/unit/test_i18n.py::test_translation_engine PASSED [ 60%] tests/unit/test_i18n.py::test_interpolation PASSED [ 62%] tests/unit/test_i18n.py::test_missing_translation_fallback PASSED [ 64%] tests/unit/test_i18n.py::test_telegram_keyboard_builder PASSED [ 66%] tests/unit/test_message_studio.py::test_variable_interpolation PASSED [ 67%] tests/unit/test_message_studio.py::test_missing_variables_fallback PASSED [ 69%] tests/unit/test_message_studio.py::test_keyboard_matrix_ordering PASSED [ 71%] tests/unit/test_message_studio.py::test_aiogram_keyboard_generation PASSED [ 73%] tests/unit/test_message_studio.py::test_default_system_templates PASSED [ 75%] tests/unit/test_security.py::test_password_hashing PASSED [ 76%] tests/unit/test_security.py::test_aes_256_gcm_encryption PASSED [ 78%] tests/unit/test_security.py::test_jwt_tokens PASSED [ 80%] tests/unit/test_security.py::test_token_hashing PASSED [ 82%] tests/unit/test_unicode_styler.py::test_small_caps_transformation PASSED [ 83%] tests/unit/test_unicode_styler.py::test_tag_and_variable_preservation PASSED [ 85%] tests/unit/test_unicode_styler.py::test_other_unicode_styles PASSED [ 87%] tests/unit/test_unicode_styler.py::test_symbol_catalog_contents PASSED [ 89%] tests/unit/test_validators_and_presets.py::test_html_validator_valid PASSED [ 91%] tests/unit/test_validators_and_presets.py::test_html_validator_invalid_tags PASSED [ 92%] tests/unit/test_validators_and_presets.py::test_html_validator_unclosed_tags PASSED [ 94%] tests/unit/test_validators_and_presets.py::test_message_length_validator PASSED [ 96%] tests/unit/test_validators_and_presets.py::test_callback_data_validator PASSED [ 98%] tests/unit/test_validators_and_presets.py::test_preset_manager_loads_all_presets PASSED [100%] =================================== FAILURES =================================== ____________________________ test_health_readiness _____________________________ async_client = @pytest.mark.asyncio async def test_health_readiness(async_client: AsyncClient): response = await async_client.get("/api/v1/health/detailed") > assert response.status_code == 200 E assert 503 == 200 E + where 503 = .status_code tests/integration/test_health.py:17: AssertionError ----------------------------- Captured stdout call ----------------------------- 2026-11-18 07:56:36 [info ] initializing_redis_pool url=redis://127.0.0.1:6379/0 ------------------------------ Captured log call ------------------------------- ERROR sqlalchemy.pool.impl.AsyncAdaptedQueuePool:base.py:389 Exception terminating connection > Traceback (most recent call last): File "asyncpg/protocol/protocol.pyx", line 585, in asyncpg.protocol.protocol.BaseProtocol.close File "asyncpg/protocol/protocol.pyx", line 677, in _drain_cancels File "asyncpg/protocol/protocol.pyx", line 624, in asyncpg.protocol.protocol.BaseProtocol._request_cancel File "/root/telegram-saas/.venv/lib/python3.12/site-packages/asyncpg/connection.py", line 1712, in _cancel_current_command self._cancellations.add(self._loop.create_task( ^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/asyncio/base_events.py", line 456, in create_task self._check_closed() File "/usr/lib/python3.12/asyncio/base_events.py", line 541, in _check_closed raise RuntimeError('Event loop is closed') RuntimeError: Event loop is closed During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/root/telegram-saas/.venv/lib/python3.12/site-packages/asyncpg/connection.py", line 1536, in close await self._protocol.close(timeout) File "asyncpg/protocol/protocol.pyx", line 610, in close File "asyncpg/protocol/protocol.pyx", line 697, in asyncpg.protocol.protocol.BaseProtocol._handle_waiter_on_connection_lost File "/usr/lib/python3.12/asyncio/base_events.py", line 795, in call_soon self._check_closed() File "/usr/lib/python3.12/asyncio/base_events.py", line 541, in _check_closed raise RuntimeError('Event loop is closed') RuntimeError: Event loop is closed During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/root/telegram-saas/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 370, in _close_connection self._dialect.do_terminate(connection) File "/root/telegram-saas/.venv/lib/python3.12/site-packages/sqlalchemy/dialects/postgresql/asyncpg.py", line 1190, in do_terminate dbapi_connection.terminate() File "/root/telegram-saas/.venv/lib/python3.12/site-packages/sqlalchemy/connectors/asyncio.py", line 440, in terminate await_(asyncio.shield(self._terminate_graceful_close())) File "/root/telegram-saas/.venv/lib/python3.12/site-packages/sqlalchemy/util/concurrency.py", line 171, in await_ return current.parent.switch(awaitable) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/telegram-saas/.venv/lib/python3.12/site-packages/sqlalchemy/util/concurrency.py", line 209, in greenlet_spawn value = await result ^^^^^^^^^^^^ File "/root/telegram-saas/.venv/lib/python3.12/site-packages/sqlalchemy/dialects/postgresql/asyncpg.py", line 955, in _terminate_graceful_close await self._connection.close(timeout=2) File "/root/telegram-saas/.venv/lib/python3.12/site-packages/asyncpg/connection.py", line 1539, in close self._abort() File "/root/telegram-saas/.venv/lib/python3.12/site-packages/asyncpg/connection.py", line 1600, in _abort self._protocol.abort() File "asyncpg/protocol/protocol.pyx", line 567, in asyncpg.protocol.protocol.BaseProtocol.abort File "/usr/lib/python3.12/asyncio/sslproto.py", line 250, in abort self._force_close(None) File "/usr/lib/python3.12/asyncio/sslproto.py", line 255, in _force_close self._ssl_protocol._abort(exc) File "/usr/lib/python3.12/asyncio/sslproto.py", line 671, in _abort self._transport._force_close(exc) File "/usr/lib/python3.12/asyncio/selector_events.py", line 906, in _force_close self._loop.call_soon(self._call_connection_lost, exc) File "/usr/lib/python3.12/asyncio/base_events.py", line 795, in call_soon self._check_closed() File "/usr/lib/python3.12/asyncio/base_events.py", line 541, in _check_closed raise RuntimeError('Event loop is closed') RuntimeError: Event loop is closed =============================== warnings summary =============================== tests/integration/test_message_studio_api.py::test_bot_message_studio_lifecycle /usr/lib/python3.12/asyncio/locks.py:167: RuntimeWarning: coroutine 'Connection._cancel' was never awaited self._waiters = collections.deque() Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info ============================ FAILED tests/integration/test_health.py::test_health_readiness - assert 503 =... =================== 1 failed, 55 passed, 1 warning in 3.25s ====================