litellm/tests/e2e/other
Yassin Kortam acb54a03e2 test(e2e): cover key lifecycle and proxy config lifecycle behavior
Adds six coverage-registry cells to the `other` suite, all driven against a
live proxy:

- other.key_mgmt.regenerate.grace_period_honored: a key rotated with a
  grace_period keeps authenticating for the window and is refused after it, with
  a sibling key rotated without a grace period as the control so the survival
  cannot be an auth-cache artifact
- other.key_mgmt.spend_reset.resets_to_value: reset_spend puts a key's recorded
  spend back and a key its own max_budget had blocked serves again
- other.auth.virtual_key.route_group_allowed: the allow side of allowed_routes;
  the llm_api_routes group reaches chat, embeddings and the model catalog while a
  management route stays refused 403
- other.lifecycle.startup.config_loads: the config file's model_list is live in
  the routing catalog (db_model false) and serves a real completion, and the
  file's store_model_in_db is in effect
- other.lifecycle.startup.env_vars_resolved: the redis cache built once at
  startup from os.environ/ host and port references actually serves a repeat
  request; the cache block is used because credential references get resolved
  again at call time and cannot witness boot-time resolution
- other.config.runtime_update.applies_at_runtime: /config/update reaches the
  running router (read back off the live object, not a config row), routes a
  completion through the alias it added, and takes it back again

Spend accounting is buffered, so the reset test settles on a value that has
stopped moving before it snapshots, then asserts only what a late flush cannot
violate: the reset reports a previous value no smaller than the settled one,
reports zero, and /key/info is polled until it agrees. Exact equality against a
single sample would go red on correct behavior.

/config/update is the only writer of model_group_alias, it rewrites the whole map
and offers neither a per-key write nor a version to compare against. Every write
therefore compares the aliases the test does not own against a baseline as full
name and target pairs, before the write and again after; anything added, removed
or repointed stops the test naming the difference and nothing is written, so a
concurrent writer's change is never reverted with a stale view. A second alias of
the test's own stands across the exchange and is asserted to survive. Everything
else is namespaced per run and deleted on teardown, so the shared proxy is left
as it was found.
2026-07-27 17:37:46 -07:00
..
conftest.py test(e2e): add Other suite and Guardrails coverage incl. an MCP tool-call guardrail (#34149) 2026-07-21 14:06:29 -07:00
other_client.py test(e2e): add Other suite and Guardrails coverage incl. an MCP tool-call guardrail (#34149) 2026-07-21 14:06:29 -07:00
test_config_lifecycle_e2e.py test(e2e): cover key lifecycle and proxy config lifecycle behavior 2026-07-27 17:37:46 -07:00
test_health_lifecycle_e2e.py test(e2e): add Other suite and Guardrails coverage incl. an MCP tool-call guardrail (#34149) 2026-07-21 14:06:29 -07:00
test_key_lifecycle_e2e.py test(e2e): cover key lifecycle and proxy config lifecycle behavior 2026-07-27 17:37:46 -07:00
test_master_key_auth_e2e.py test(e2e): add Other suite and Guardrails coverage incl. an MCP tool-call guardrail (#34149) 2026-07-21 14:06:29 -07:00