litellm/tests/integration/security
devin-ai-integration[bot] e16d456291
test(integration): isolate every multi-worker integration suite by default (#46027)
* test(integration): isolate every multi-worker integration suite by default

Per-worker database, Redis, upstream and proxy were opt-in for management,
accounting, providers and extensions. mcp, security and cost ran 4 to 8
xdist workers against one shared proxy, database and Redis, and those suites
hold most of the integration flakes CircleCI records. Every run with more than
one worker now builds a private stack per worker, run_integration.sh no longer
starts or exports the shared proxy, upstream, database or Redis in that mode,
and each worker's scripted upstream runs in its own process instead of a
thread in the pytest controller.

Worker gateways get what the shared proxy used to provide: a peer for
management and mcp, the scripted cost map for cost, stdio MCP servers, and
coverage for mcp. mcp coverage now measures lines through sys.monitoring,
because branch measurement on CPython 3.12 uses the trace function and that
made a covered proxy take about 4x as long to become ready, which is why the
shared mcp proxy kept missing its 90 s readiness wait. Routing parity
snapshots now also read the worker databases, since its cost and mcp runs use
several workers. The security per-worker fixture is redundant and removed

* test(integration): give the nested probe root the files a worker gateway needs

Two worker probes now run isolated, so the nested controller boots a real per-worker upstream and proxy from the probe root. That upstream imports the fake OpenAI server and the cost map modules, and the proxy reads proxy_config.yaml, none of which the probe copied. The nested run also drops INTEGRATION_COVERAGE_FILE so it never writes into an outer coverage file

* test(integration): budget nested multi-worker runs for their worker stack boots

A nested run.py database run with more than one worker now boots a private database, Redis, upstream and proxy per worker, one after another, before any case runs. The fixed 60 s subprocess timeout left no room for that, so the 2 worker probes sat at 57-60 s on CircleCI. The subprocess budget is now the old 60 s plus 30 s per worker stack, and the outer pytest timeout keeps its previous 30 s of slack on top. 30 s is the slowest worker proxy readiness recorded in startup.json on the integration-cost job of workflow e09b108b (21.6-30.3 s on 4 CPUs, 2026-10-12)

---------

Co-authored-by: Yuneng Jiang <yuneng@berri.ai>
2026-10-12 03:46:06 -07:00
..
_callback_traffic.py test(integration): callback credential canary slots C1-C3 and D5 (#43630) 2026-09-29 10:49:30 -07:00
_canary.py test(integration): sweep proxy logs, metrics, a Datadog intake and the Logs drawer for credential canaries (#43306) 2026-09-29 17:57:28 +00:00
_sinks.py test(security): pin the What's new catalog local in the canary egress rig (#45925) 2026-10-11 00:42:10 -07:00
_sweeps.py perf(ci): isolate and shard integration suites (#44146) 2026-10-10 11:15:19 -07:00
test_air_gapped_boot.py test: migrate local_testing SDK and provider tests out of build_and_test (#45760) 2026-10-10 23:14:25 +00:00
test_callback_credentials.py test(integration): callback credential canary slots C1-C3 and D5 (#43630) 2026-09-29 10:49:30 -07:00
test_config_deployment_key.py test(integration): credential canary suite harness (#43300) 2026-09-28 16:12:08 -07:00
test_datadog_sink.py test(integration): sweep proxy logs, metrics, a Datadog intake and the Logs drawer for credential canaries (#43306) 2026-09-29 17:57:28 +00:00
test_master_key_not_in_db.py test: migrate proxy security, schema migration and MCP legacy tests (#45937) 2026-10-11 16:17:24 -07:00
test_mcp_slots.py test(integration): credential canary slots for MCP and pass-through credentials (#43308) 2026-09-28 17:10:51 -07:00
test_metrics_text.py test(integration): sweep proxy logs, metrics, a Datadog intake and the Logs drawer for credential canaries (#43306) 2026-09-29 17:57:28 +00:00
test_passthrough_slots.py test: move routing, caching and callback tests out of local_testing (#45761) 2026-10-10 09:33:09 -07:00
test_proxy_logs.py test(integration): sweep proxy logs, metrics, a Datadog intake and the Logs drawer for credential canaries (#43306) 2026-09-29 17:57:28 +00:00
test_request_path_slots.py test(integration): request-path credential canary slots D1-D4 (#43307) 2026-09-29 10:52:13 -07:00
test_stored_config_slots.py test(integration): stored-config credential canary slots (#43309) 2026-09-28 17:23:30 -07:00
test_sweep_sensitivity.py fix(ci): isolate integration workers and repair test fixtures (#45863) 2026-10-11 01:56:02 -07:00