mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-07 08:26:10 +00:00
Merge pull request #19182 from BerriAI/litellm_fix_ci_test_proxy_routes
[test] handle wildcard routes in route validation test
This commit is contained in:
commit
18de9d71af
1 changed files with 6 additions and 0 deletions
|
|
@ -56,6 +56,12 @@ def test_routes_on_litellm_proxy():
|
|||
# realtime routes - /realtime?model=gpt-4o
|
||||
if "realtime" in route:
|
||||
assert "/realtime" in _all_routes
|
||||
# wildcard patterns like /containers/* - check that base path exists
|
||||
elif RouteChecks._is_wildcard_pattern(pattern=route):
|
||||
# For wildcard patterns, check that the base path (without * and trailing /) exists
|
||||
base_path = route[:-1].rstrip("/") # Remove the trailing * and any trailing /
|
||||
# Check if base path exists (e.g., /containers or /v1/containers)
|
||||
assert base_path in _all_routes, f"Wildcard pattern {route} requires base path {base_path} to exist"
|
||||
else:
|
||||
assert route in _all_routes
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue