mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-06 08:16:43 +00:00
* test(e2e/ui): cover creating, testing and deleting a guardrail The Guardrails page had no browser coverage. The RC checklist covers it by hand against a live Presidio, which is why it has always been skipped in CI. These drive the LiteLLM content filter instead, which runs inside the proxy, so the whole flow is exercised without a third-party moderation service. The create test does not stop at the table row: it sends a prompt carrying the keyword it just banned and asserts the gateway refuses it, then sends a clean prompt through the same guardrail and asserts it is served. * test(e2e/ui): delete the guardrails these tests create Review caught the fixtures being left behind. Guardrails are database rows that show up in the table and in the playground's list, so a run that leaves them changes what the next run sees. Also trims the comments that restated what the helpers already say. * test(e2e/ui): fail the run when guardrail teardown does not delete Review caught the afterEach discarding the DELETE response, so a failed cleanup finished quietly and left the guardrail for the next run to trip on. * test(e2e/ui): wait for a new guardrail to reach the request path The wizard test drove one chat completion immediately after creating the guardrail and required a 400. A trace from the deployed stack shows the record is stored correctly (blocked_words, action BLOCK, block_on_violation) and the call six seconds later is still served unguarded, so the first request can land before the proxy picks the guardrail up. Polls the same call to the same 400 instead, which keeps the assertion and lets the refresh land. If it never blocks, this stays red, which is what we want it to say. --------- Co-authored-by: Claude <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| a2a | ||
| access_control | ||
| batches | ||
| claude_code | ||
| coverage_registry | ||
| gateway | ||
| guardrails | ||
| llm_translation | ||
| load | ||
| logging | ||
| management | ||
| mcp | ||
| other | ||
| quota_management | ||
| router | ||
| ui | ||
| CLAUDE.md | ||
| conftest.py | ||
| CONTRIBUTING.md | ||
| e2e_config.py | ||
| e2e_db.py | ||
| e2e_http.py | ||
| fixture_bundle.py | ||
| fixture_canonical.py | ||
| fixture_mode.py | ||
| junit_properties.py | ||
| lifecycle.py | ||
| models.py | ||
| otel_client.py | ||
| provider_edge.py | ||
| proxy_client.py | ||
| pytest.ini | ||
| test_e2e_http.py | ||
| test_fixture_bundle.py | ||
| test_fixture_canonical.py | ||
| test_fixture_mode.py | ||
| test_provider_edge.py | ||
| transport.py | ||