litellm/tests/integration/configuration
yuneng-jiang da55893656
ci(unit): cut unit check time with cheaper per-test resets and fewer non-unit tests (#51864)
* test(unit): reset module state only when a test changed it

The proxy conftest deep-copied every snapshotted litellm attribute before each
test, and the copy of litellm.model_cost alone was a median 0.12 s for each of
56,031 proxy tests on the runner. The reset now copies an attribute back only
when it no longer equals the snapshot.

The enterprise and MCP server conftests reloaded litellm before every test,
3.27 s and 0.21 s per test. They now use the same reset.

* test(unit): remove six flaky tests

They failed on main without a code change behind them between 2026-11-05 and
2026-11-14: the vector store hook SDK fallback, the concurrent user config TPM
count, three Prometheus metrics server port tests and the OpenCode list cost
billing test.

* ci: run four heavy unit shards on 16-core runners and keep two smoke jobs off pull requests

proxy-feature-endpoints, proxy-endpoints, root and llms-providers ran 1.9 to 2.2
times faster with 8 workers on a 16-core runner in a benchmark run.

windows-sdk and proxy-build-from-pip still run on pushes to main and manual
runs. proxy-build-from-pip installs a published release and never runs the
pull request's code.

* test: move 109 tests that start a process or open a socket into tests/integration

tests/unit is in-process by its own rules, and these tests spawn a Python
interpreter, a shell or a local TCP or HTTP server. They took 921 s of unit
shard time per run, 396 s of it in the MCP client transport tests. Each one now
lives in a *_real_io.py file under the integration directory for its domain and
runs with that directory's group.

The tests themselves are unchanged apart from one repository-root path in the
CLI test.

* test(unit): copy back only the dict entries a test changed

A test module that registers models at import leaves litellm.model_cost four
entries larger than the snapshot before every test in its directory, so the
reset still deep-copied the whole price map for each of them. It now rebuilds a
changed dict from the live entries that still match and copies only the rest.

* ci(smoke): keep the two jobs that skip on pull requests out of the smoke gate

A skipped job passing the gate is what test_unit_passed_gate guards against,
so the gate goes back to requiring success from every job it needs and
windows-sdk and proxy-build-from-pip stop being part of it. They still run
and report on pushes to main and manual runs.
2026-11-14 15:41:30 -08:00
..
test_audio_transcription_model_resolution.py test(integration): cover audio endpoint contracts (#44699) 2026-10-14 03:41:20 +00:00
test_basic_proxy_startup.py ci: run every CircleCI check from the integration workflow (#45938) 2026-10-11 07:39:16 -07:00
test_callback_delete.py fix(proxy)!: delete callbacks configured under callbacks or failure_callback (#42740) 2026-10-16 09:22:22 -07:00
test_callback_leak_contracts.py test: move 76 live top-level tests to offline unit and integration coverage (#45352) 2026-10-08 10:33:35 -07:00
test_callback_settings_boot.py test(integration): edge-case matrices for malformed token limits and callback_settings shapes (#42895) 2026-09-24 01:05:55 -07:00
test_claude_settings_real_io.py ci(unit): cut unit check time with cheaper per-test resets and fewer non-unit tests (#51864) 2026-11-14 15:41:30 -08:00
test_codex_catalog_boot.py feat(proxy): serve Codex its own release's model catalog, fetched from GitHub (#50318) 2026-11-06 21:58:54 +00:00
test_config_declared_model_behaviours.py test: replace 61 live logging and otel tests with offline unit and integration coverage (#45362) 2026-10-08 15:55:57 -07:00
test_effective_settings.py chore: move workspace packages under litellm (#51000) 2026-11-12 04:19:57 +00:00
test_fips_mode_boot.py feat(proxy): add general_settings.fips_mode startup gate (#48600) 2026-11-03 14:56:14 -08:00
test_json_logs_startup.py fix(proxy): keep every startup line JSON when json_logs is on (#47035) 2026-10-27 14:49:07 -07:00
test_lazy_routes_flag.py test(integration): give chaos and timing tests a harness API and gate raw signals (#46031) 2026-10-12 05:27:33 -07:00
test_main_real_io.py ci(unit): cut unit check time with cheaper per-test resets and fewer non-unit tests (#51864) 2026-11-14 15:41:30 -08:00
test_multi_worker_reload.py fix(proxy)!: support reload with multiple workers (#45909) 2026-11-01 00:57:32 +00:00
test_multi_worker_slow_import_boot.py test(integration): give chaos and timing tests a harness API and gate raw signals (#46031) 2026-10-12 05:27:33 -07:00
test_openapi_docs_route.py test(proxy): audit #47352 (#48804) 2026-10-28 05:54:40 -07:00
test_reload_worker_pool.py fix(proxy)!: support reload with multiple workers (#45909) 2026-11-01 00:57:32 +00:00
test_runtime_real_io.py ci(unit): cut unit check time with cheaper per-test resets and fewer non-unit tests (#51864) 2026-11-14 15:41:30 -08:00
test_rust_forward.py feat(proxy): supervise the opt-in Rust forwarding server (#49606) 2026-11-11 19:40:00 +00:00
test_rust_forward_lifecycle.py feat(proxy): supervise the opt-in Rust forwarding server (#49606) 2026-11-11 19:40:00 +00:00
test_rust_forward_traffic.py feat(proxy): supervise the opt-in Rust forwarding server (#49606) 2026-11-11 19:40:00 +00:00
test_search_embedding_model_settings.py fix(proxy): treat empty agent and skill search embedding model as not configured (#49485) 2026-10-31 15:32:26 -07:00
test_startup_output.py feat(proxy)!: add suppress_startup_output to turn off startup prints (#47708) 2026-10-29 03:47:04 -07:00
test_unit_conftest_isolation.py test: migrate legacy unit dirs and unrun folders into tests/unit, tests/integration and tests/e2e (#45940) 2026-10-11 06:24:57 -07:00