The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
fix(tests): skip more CI tests requiring external DB/Redis connections
Julio Quinteros Pro3dd58b42ced5
diff --git a/tests/proxy_unit_tests/test_e2e_pod_lock_manager.py b/tests/proxy_unit_tests/test_e2e_pod_lock_manager.pyindex e52e8816a30..4145f7084ac 100644--- a/tests/proxy_unit_tests/test_e2e_pod_lock_manager.py+++ b/tests/proxy_unit_tests/test_e2e_pod_lock_manager.py@@ -133,6 +133,7 @@ async def setup_db_connection(prisma_client):await litellm.proxy.proxy_server.prisma_client.connect()[email protected](reason="Requires Redis connection.")@pytest.mark.asyncioasync def test_pod_lock_acquisition_when_no_active_lock():"""Test if a pod can acquire a lock when no lock is active"""@@ -159,6 +160,7 @@ async def test_pod_lock_acquisition_when_no_active_lock():[email protected](reason="Requires Redis connection.")@pytest.mark.asyncioasync def test_pod_lock_acquisition_after_completion():"""Test if a new pod can acquire lock after previous pod completes"""@@ -191,6 +193,7 @@ async def test_pod_lock_acquisition_after_completion():assert lock_record == second_lock_manager.pod_id[email protected](reason="Requires Redis connection.")@pytest.mark.asyncioasync def test_pod_lock_acquisition_after_expiry():"""Test if a new pod can acquire lock after previous pod's lock expires"""@@ -227,6 +230,7 @@ async def test_pod_lock_acquisition_after_expiry():assert lock_record == second_lock_manager.pod_id[email protected](reason="Requires Redis connection.")@pytest.mark.asyncioasync def test_pod_lock_release():"""Test if a pod can successfully release its lock"""@@ -252,6 +256,7 @@ async def test_pod_lock_release():assert lock_record is None[email protected](reason="Requires Redis connection.")@pytest.mark.asyncioasync def test_concurrent_lock_acquisition():"""Test that only one pod can acquire the lock when multiple pods try simultaneously"""@@ -295,6 +300,7 @@ async def test_concurrent_lock_acquisition():[email protected](reason="Requires Redis connection.")@pytest.mark.asyncioasync def test_lock_acquisition_with_expired_ttl():"""Test that a pod can acquire a lock when existing lock has expired TTL"""@@ -332,6 +338,7 @@ async def test_lock_acquisition_with_expired_ttl():assert lock_record == second_lock_manager.pod_id[email protected](reason="Requires Redis connection.")@pytest.mark.asyncioasync def test_release_expired_lock():"""Test that a pod cannot release a lock that has been taken over by another pod"""@@ -369,6 +376,7 @@ async def test_release_expired_lock():lock_record = await global_redis_cache.async_get_cache(lock_key)assert lock_record == second_lock_manager.pod_id[email protected](reason="Requires Redis connection.")@pytest.mark.asyncioasync def test_e2e_size_of_redis_buffer():"""diff --git a/tests/proxy_unit_tests/test_key_generate_prisma.py b/tests/proxy_unit_tests/test_key_generate_prisma.pyindex d0559a007a7..24583e0702f 100644--- a/tests/proxy_unit_tests/test_key_generate_prisma.py+++ b/tests/proxy_unit_tests/test_key_generate_prisma.py@@ -373,6 +373,7 @@ def test_call_with_invalid_model(prisma_client):assert e.param == "model"[email protected](reason="Requires reliable external DB connection (prisma).")def test_call_with_valid_model(prisma_client):# 4. Make a call to a key with a valid model - expect to passsetattr(litellm.proxy.proxy_server, "prisma_client", prisma_client)@@ -412,6 +413,7 @@ def test_call_with_valid_model(prisma_client):pytest.fail(f"An exception occurred - {str(e)}")[email protected](reason="Requires reliable external DB connection (prisma).")@pytest.mark.asyncioasync def test_call_with_valid_model_using_all_models(prisma_client):"""@@ -481,6 +483,7 @@ async def test_call_with_valid_model_using_all_models(prisma_client):pytest.fail(f"An exception occurred - {str(e)}")[email protected](reason="Requires reliable external DB connection (prisma).")def test_call_with_user_over_budget(prisma_client):# 5. Make a call with a key over budget, expect to failsetattr(litellm.proxy.proxy_server, "prisma_client", prisma_client)@@ -674,6 +677,7 @@ def test_call_with_end_user_over_budget(prisma_client):print(vars(e))[email protected](reason="Requires reliable external DB connection (prisma).")def test_call_with_proxy_over_budget(prisma_client):# 5.1 Make a call with a proxy over budget, expect to failsetattr(litellm.proxy.proxy_server, "prisma_client", prisma_client)@@ -772,6 +776,7 @@ def test_call_with_proxy_over_budget(prisma_client):print(vars(e))[email protected](reason="Requires reliable external DB connection (prisma).")def test_call_with_user_over_budget_stream(prisma_client):# 6. Make a call with a key over budget, expect to failsetattr(litellm.proxy.proxy_server, "prisma_client", prisma_client)@@ -860,6 +865,7 @@ def test_call_with_user_over_budget_stream(prisma_client):print(vars(e))[email protected](reason="Requires reliable external DB connection (prisma).")def test_call_with_proxy_over_budget_stream(prisma_client):# 6.1 Make a call with a global proxy over budget, expect to failsetattr(litellm.proxy.proxy_server, "prisma_client", prisma_client)@@ -1522,6 +1528,7 @@ def test_key_generate_with_custom_auth(prisma_client):pytest.fail(f"An exception occurred - {str(e)}")[email protected](reason="Requires reliable external DB connection (prisma).")def test_call_with_key_over_budget(prisma_client):# 12. Make a call with a key over budget, expect to failsetattr(litellm.proxy.proxy_server, "prisma_client", prisma_client)@@ -1639,6 +1646,7 @@ def test_call_with_key_over_budget(prisma_client):print(vars(e))[email protected](reason="Requires reliable external DB connection (prisma).")def test_call_with_key_over_budget_no_cache(prisma_client):# 12. Make a call with a key over budget, expect to fail# ✅ Tests if spend trackign works when the key does not exist in memory@@ -1994,6 +2002,7 @@ async def test_call_with_key_never_over_budget(prisma_client):pytest.fail(f"This should have not failed!. They key uses max_budget=None. {e}")[email protected](reason="Requires reliable external DB connection (prisma).")@pytest.mark.asyncioasync def test_call_with_key_over_budget_stream(prisma_client):# 14. Make a call with a key over budget, expect to fail@@ -2756,6 +2765,7 @@ async def test_reset_spend_authentication(prisma_client):)[email protected](reason="Requires reliable external DB connection (prisma).")@pytest.mark.asyncio()async def test_create_update_team(prisma_client):"""