mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-07 08:26:10 +00:00
test(proxy): cover enabled health task start
This commit is contained in:
parent
6e23f10639
commit
deed877da7
1 changed files with 17 additions and 0 deletions
|
|
@ -6869,6 +6869,23 @@ async def test_update_general_settings_updates_router_health_options(monkeypatch
|
|||
assert fake_router.health_check_ignore_transient_errors is True
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_reconcile_background_health_check_task_starts_enabled_task(monkeypatch):
|
||||
from litellm.proxy import proxy_server as ps
|
||||
|
||||
async def _noop_background_health_check():
|
||||
return None
|
||||
|
||||
monkeypatch.setattr(ps, "use_background_health_checks", True)
|
||||
monkeypatch.setattr(ps, "background_health_check_task", None)
|
||||
monkeypatch.setattr(ps, "_run_background_health_check", _noop_background_health_check)
|
||||
|
||||
await ps._reconcile_background_health_check_task()
|
||||
|
||||
assert ps.background_health_check_task is not None
|
||||
await ps.background_health_check_task
|
||||
|
||||
|
||||
# store_model_in_db DB Config Override Tests
|
||||
# ============================================================================
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue