From 03e4ab7b1c22e3254e4c5855f9facb9388b4cf34 Mon Sep 17 00:00:00 2001 From: Yash Raj Pandey Date: Mon, 7 Sep 2026 16:46:28 -0400 Subject: [PATCH] test(proxy): assert the hydration ran in the failure-path test test_add_deployment_survives_a_non_llm_hydration_failure passed with the fix reverted. Reverting stops _init_non_llm_objects_in_db from being called at all, so nothing raised and the test proved nothing. Record that the override ran and assert it. Both added tests now fail with litellm/proxy/proxy_server.py reverted to the base. Co-Authored-By: Claude Opus 5 --- tests/test_litellm/proxy/test_proxy_server.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/test_litellm/proxy/test_proxy_server.py b/tests/test_litellm/proxy/test_proxy_server.py index 06f47a7715b..dfa89468fa0 100644 --- a/tests/test_litellm/proxy/test_proxy_server.py +++ b/tests/test_litellm/proxy/test_proxy_server.py @@ -1104,6 +1104,7 @@ async def test_add_deployment_survives_a_non_llm_hydration_failure(): def __init__(self): super().__init__() self.reconcile_ran = False + self.hydration_attempted = False async def _get_models_from_db(self, prisma_client): return [] @@ -1113,6 +1114,7 @@ async def test_add_deployment_survives_a_non_llm_hydration_failure(): return frozenset() async def _init_non_llm_objects_in_db(self, prisma_client): + self.hydration_attempted = True raise RuntimeError("guardrail table unavailable") proxy_config = FailingHydrationProxyConfig() @@ -1123,6 +1125,7 @@ async def test_add_deployment_survives_a_non_llm_hydration_failure(): ) assert proxy_config.reconcile_ran is True + assert proxy_config.hydration_attempted is True assert outcome.still_desired == frozenset()