litellm/tests/proxy_behavior/management
Yuneng Jiang 1013d7228e
test(proxy_behavior): pin /key/delete authz matrix + post-delete contract (21 scenarios)
Slice 12 of the management-endpoints behavior-pinning effort. Mirrors
slices 10/11. On success: cleartext can no longer authenticate
(handles both hard-delete and soft-delete to LiteLLM_DeletedVerificationToken).
On denial: row survives and cleartext still authenticates.

Notable behavior gap with /key/update: same-team peers (internal_user,
unrelated_same_org, etc.) get 403 on /key/delete for OWNER's key — i.e.
cannot delete each other's keys — whereas they CAN read each other's
keys (Slice 8). Delete is stricter than read. Pinned as-is.

Cumulative whole-suite wall-time is 5.9s for all 128 tests on the local
runner — well under the 10-min G2 budget for the CI job in Slice 13.

Plan: https://www.notion.so/36643b8acdab8128a581ced0f6a4744d
2026-05-19 21:53:04 -07:00
..
__init__.py test(proxy_behavior): scaffold session-scoped async ASGI client + liveness smoke 2026-05-19 21:21:00 -07:00
actors.py test(proxy_behavior): pin /key/generate authz matrix (18 scenarios) 2026-05-19 21:40:45 -07:00
conftest.py test(proxy_behavior): per-test scratch namespace + targeted delete_many teardown 2026-05-19 21:35:05 -07:00
test_key_delete.py test(proxy_behavior): pin /key/delete authz matrix + post-delete contract (21 scenarios) 2026-05-19 21:53:04 -07:00
test_key_generate.py test(proxy_behavior): pin /key/generate authz matrix (18 scenarios) 2026-05-19 21:40:45 -07:00
test_key_info.py test(proxy_behavior): pin /key/info authz matrix (24 scenarios) 2026-05-19 21:43:38 -07:00
test_key_list.py test(proxy_behavior): pin /key/list default-visibility matrix (8 scenarios) 2026-05-19 21:45:29 -07:00
test_key_regenerate.py test(proxy_behavior): pin /key/regenerate authz matrix + rotation contract (22 scenarios) 2026-05-19 21:50:57 -07:00
test_key_update.py test(proxy_behavior): pin /key/update authz matrix + mutation re-read (21 scenarios) 2026-05-19 21:48:47 -07:00
test_no_management_imports.py style(proxy_behavior): apply black to G3 grep test 2026-05-19 21:36:15 -07:00
test_scratch_teardown.py test(proxy_behavior): per-test scratch namespace + targeted delete_many teardown 2026-05-19 21:35:05 -07:00
test_smoke.py test(proxy_behavior): per-test scratch namespace + targeted delete_many teardown 2026-05-19 21:35:05 -07:00
test_world_seed.py test(proxy_behavior): seed 8-actor read-world for the authz matrix 2026-05-19 21:31:38 -07:00