mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-05 02:41:56 +00:00
fix: allow S3 callback health test
This commit is contained in:
parent
3583ac1159
commit
cdc630c4f8
2 changed files with 19 additions and 0 deletions
|
|
@ -126,6 +126,7 @@ services = Union[
|
|||
"datadog_llm_observability",
|
||||
"generic_api",
|
||||
"arize",
|
||||
"s3",
|
||||
"sqs",
|
||||
],
|
||||
str,
|
||||
|
|
@ -200,6 +201,7 @@ async def health_services_endpoint( # noqa: PLR0915
|
|||
"datadog_llm_observability",
|
||||
"generic_api",
|
||||
"arize",
|
||||
"s3",
|
||||
"sqs",
|
||||
]:
|
||||
raise HTTPException(
|
||||
|
|
|
|||
|
|
@ -0,0 +1,17 @@
|
|||
from unittest.mock import AsyncMock, patch
|
||||
|
||||
import pytest
|
||||
|
||||
from litellm.proxy.health_endpoints._health_endpoints import health_services_endpoint
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_health_services_endpoint_accepts_s3_callback():
|
||||
with (
|
||||
patch("litellm.success_callback", ["s3"]),
|
||||
patch("litellm.acompletion", new=AsyncMock(return_value={})),
|
||||
):
|
||||
result = await health_services_endpoint(service="s3")
|
||||
|
||||
assert result["status"] == "success"
|
||||
assert "s3" in result["message"]
|
||||
Loading…
Add table
Reference in a new issue