Repository navigation
test(proxy): move middleware, spend_tracking, pass_through, common_utils and root proxy tests into tests/unit/proxy - #44015
Merged
Conversation
Contributor
Author
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
devin-ai-integration
Bot
force-pushed
the
litellm_migrate_proxy_tests_p5
branch
from
October 1, 2026 12:47
4e1278e to
08350ee
Compare
devin-ai-integration
Bot
force-pushed
the
litellm_migrate_proxy_tests_p6
branch
from
October 1, 2026 12:47
f14df79 to
e79897b
Compare
Contributor
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
1 task done
devin-ai-integration
Bot
force-pushed
the
litellm_migrate_proxy_tests_p5
branch
from
October 1, 2026 14:13
08350ee to
2da439c
Compare
devin-ai-integration
Bot
force-pushed
the
litellm_migrate_proxy_tests_p6
branch
from
October 1, 2026 14:13
e79897b to
a620b30
Compare
devin-ai-integration
Bot
force-pushed
the
litellm_migrate_proxy_tests_p5
branch
from
October 1, 2026 16:33
2da439c to
8b8dc59
Compare
devin-ai-integration
Bot
force-pushed
the
litellm_migrate_proxy_tests_p6
branch
from
October 1, 2026 16:35
a620b30 to
8c84336
Compare
yuneng-berri
force-pushed
the
litellm_migrate_proxy_tests_p5
branch
from
October 1, 2026 17:53
8b8dc59 to
7814e2c
Compare
yuneng-berri
force-pushed
the
litellm_migrate_proxy_tests_p6
branch
2 times, most recently
from
October 1, 2026 18:07
c7bbab0 to
a03f35e
Compare
yuneng-berri
force-pushed
the
litellm_migrate_proxy_tests_p5
branch
from
October 1, 2026 18:07
7814e2c to
4f02a99
Compare
…ils and root proxy tests into tests/unit/proxy Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
yuneng-berri
force-pushed
the
litellm_migrate_proxy_tests_p6
branch
from
October 1, 2026 18:14
a03f35e to
928c73a
Compare
yuneng-berri
approved these changes
Oct 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TLDR
Problem this solves:
tests/test_litellm/proxystill holds middleware, spend_tracking, pass_through, common_utils and root teststests/unit/proxy/<same path>How it solves it:
git mvof eight dirs,test_configsand the 79 roottest_*.py(184 renames)tests/unit/proxy/conftest.pyproxy-infrashard paths intest-unit.yml, shard name unchangedPR 6 of 7, stacked on #44012.
pass_through_endpoints/test_pass_through_endpoints.pystays at the legacy path with its conftest because it holds the live httpbin test, which PR 7 rewrites against a loopback serverScreenshots / Proof of Fix
Coverage ledger
Same
ledger.pyas #43998, baseorigin/litellm_migrate_proxy_tests_p5The 537 ids in the staying
test_pass_through_endpoints.pycollect the same as on the baseOwnership
Everything moved runs in
proxy-infra. The root files are listed one by one, sincetests/unit/proxyalready has 27 root files thattest-unit-proxy-db.ymland other shards own. Seven pre-existing destination files incommon_utils,middlewareandspend_trackingare on.circleci/scripts/unit_selection.shfor proxy-db, soproxy-infraignores them and each file runs in exactly one GHA shard.test-unit-proxy-miscin the Makefile selects the same set through aPROXY_INFRA_ROOT_TESTSvariable.assert_ci_coverage.pyprints OK in every mode, andtests/unit/test_package_layout.pypassesRuns
Moved set,
env -iwith outbound sockets blocked,-n 4 --timeout=120:5463 passed, 2 skipped. Two tests fail locally the same way at the legacy path on the base:test_gateway_plus_backend_covers_full_app(a child-Iinterpreter importslitellmfrom the main checkout instead of the worktree) andtest_prometheus_metrics_port_starts_separate_metrics_process. The proxy-db-owned destination files, run separately:150 passed, 1 skippedA probe recorded every non-loopback
socket.connect,connect_exandgetaddrinfoacross the moved set. It recorded nothing, so no HTTP stubs were neededNon-rename edits
.github/workflows/test-unit.ymlproxy-infrapaths and ignores described aboveMakefiletest-unit-proxy-miscmirrors theproxy-infraselectiontests/unit/proxy/conftest.pybuild_cache_config,build_minimal_proxy_config,set_proxy_environment_variables,create_proxy_test_clientandfresh_agent_read_throughfrom the legacy conftesttest_configs/test_config_no_auth.yamltest_config_hosted_vllm_embedding.yamland its two readers point theretest_redis_auth_cache_flag.py_patched_init_cacheleftlitellm_config_cacheunpatched, so_init_cachestored a fake Redis cache in the real global. The destination conftest sorts items by name, which putcommon_utils/test_periodic_reload_schedule.pyafter it and broke those tests. It now patches that global like the other three cachesexperimental/mcp_server/test_tool_registry.pytest_tool_registry.example_handleronly resolved as a top-level module. Now that the dir is a package it is the full dotted pathtest_proxy_cli.pyLITELLM_WORKER_STARTUP_HOOKSmodule strings follow the movehealth_endpoints/test_health_endpoints.pytests.unit.proxy.conftesttest_enforce_user_param.py,scripts/test_tool_allowlist_script.py,CONTRIBUTING.md,SPEND_TRACKING_COVERAGE_MATRIX.md,tests/test_spend_logs.py__init__.pyType
✅ Test
Final Attestation
Link to Devin session: https://app.devin.ai/sessions/d9bda95617da464e88d3619765819d0e
Open in Devin Desktop: https://app.devin.ai/desktop/session/d9bda95617da464e88d3619765819d0e?variant=devin