Repository navigation
test(proxy): move auth, hooks, policy_engine and client tests into tests/unit/proxy - #43998
Merged
Merged
Conversation
Contributor
Author
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
Contributor
|
devin-ai-integration
Bot
force-pushed
the
litellm_migrate_proxy_tests_p2
branch
from
October 1, 2026 09:43
32fd263 to
20b524f
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
1 task done
Contributor
Author
|
@greptileai review |
devin-ai-integration
Bot
force-pushed
the
litellm_migrate_proxy_tests_p2
branch
from
October 1, 2026 10:34
502b0c4 to
b25ab90
Compare
This was referenced Oct 1, 2026
Base automatically changed from
litellm_migrate_proxy_integration_tests
to
main
October 1, 2026 16:23
…sts/unit/proxy Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…e HTTP boundary Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
devin-ai-integration
Bot
force-pushed
the
litellm_migrate_proxy_tests_p2
branch
from
October 1, 2026 16:28
676ca84 to
b20d053
Compare
yuneng-berri
approved these changes
Oct 1, 2026
koladefaj
added a commit
to koladefaj/litellm
that referenced
this pull request
Oct 1, 2026
Absorbs the test move in BerriAI#43998, so the four test files this PR touches now live under tests/unit/proxy/auth and nothing references the deleted tests/test_litellm paths. GitHub's merge was not following those renames and reported the PR as conflicting.
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 the auth, hooks, policy_engine and client teststests/unit/proxy/<same path>How it solves it:
git mvof all four directories (118 files, every one a pure rename)proxy-authandproxy-infrashard paths intest-unit.yml, shard names unchangedPR 2 of 7, now based on main since #43996 merged. Legacy conftests stay until PR 7
Screenshots / Proof of Fix
Coverage ledger
Every node id collected from the 118 legacy files on the base is collected at its new path on the head
Generated with
python3 ledger.py origin/main litellm_migrate_proxy_tests_p2. It reads the renames fromgit diff -M --name-status, runspytest --collect-only -qon each side in a throwaway worktree with an empty env, maps old paths to new ones, and exits 1 on any unexplained missing idledger.py
Collisions
test_proxy_server.pytests/unit/proxy/test_proxy_server_endpoints_and_startup.pytest_proxy_utils.pytests/unit/proxy/test_proxy_utils_model_creation_and_error_logging.pyauth/test_auth_checks.pytests/unit/proxy/auth/test_auth_checks_object_access_and_lookup.pyauth/test_user_api_key_auth.pytests/unit/proxy/auth/test_user_api_key_auth_request_flow.py_experimental/mcp_server/test_mcp_server.pytests/unit/proxy/_experimental/mcp_server/test_mcp_server_tool_calls_and_headers.pyconftest.pytests/unit/proxy/conftest.py_experimental/mcp_server/conftest.pytests/unit/proxy/_experimental/mcp_server/conftest.pyThe three root and MCP renames move ahead of their directories so the collisions are settled in one place. Their node ids are in the ledger above
Non-rename edits (152 added, 12 removed)
tests/unit/proxy/conftest.pyproxy_serverglobals snapshot hooks (master_key,prisma_client,llm_router),_reset_graceful_shutdown_state,secret_vault_factoryfor the client CLI tests, and a sharedhttpx_transportfixture that turns off the aiohttp transport so respx routes see the request. The existing isolation fixture and collection hook are untouchedtests/unit/proxy/_experimental/mcp_server/conftest.pySERVER_ROOT_PATHisolation fixtures and the_mcp_request_ctxfactory, next to the destination's own fixtures. The registry fixture now emptiesregistry,config_mcp_servers, the tool name mapping and the OAuth discovery slots before each test, then restores them. Before that, config servers thattests/mcp_tests/test_proxy_mcp_e2e.pyloaded into the shared manager in the same xdist worker survived, sotest_reload_resets_probe_cooldown's background tool listing task dialed them and hung event loop teardown past the 120s timeout inmcp-integrationtests/unit/proxy/auth/test_onboarding.pyhttpx_transport, so the existing respx routes serve themtests/unit/proxy/auth/test_login_utils.pytest_db_user_login_still_works_when_disabledran the real HIBP breach check. A respx route on therange/prefix of its password now answers it throughhttpx_transporttests/unit/proxy/client/__init__.py,hooks/litellm_skills/__init__.pytests/unit/test_package_layout.pypassestests/proxy_behavior/auth/test_auth_object_prefetch.py.github/workflows/test-unit.ymlproxy-authruns the four new dirs and ignores the 9 filestest-unit-proxy-db.ymlalready owns there,proxy-infrapicks up the two renamed root files.github/merge-smoke-tests.jsonMODEL-ALLOWandMODEL-DENYfollowauth/test_auth_checks.pyMakefiletest-unit-proxy-coreandtest-unit-proxy-miscpathsassert_ci_coverage.py --shardsand plain mode both print OK without addingtests/unit/proxytoSHARDED_ROOTS, so it is unchanged..circleci/scripts/unit_selection.shis unchanged: itsunitcatch-all picks up the moved files and the renamed MCP file stays undermcp-integrationthrough the existingtests/unit/proxy/_experimental/mcp_serverentryType
✅ 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