litellm/tests/e2e/docker-compose.yml
mubashir1osmani ae5e7abe16 test(e2e): batch/file API e2e suite
Adds a black-box e2e suite under tests/e2e/batches/ for the batches and files
API. Nothing is imported from the litellm codebase; the tests drive the live
proxy over HTTP and verify state through the generated prisma client, so they
catch real regressions rather than re-asserting internal calls.

It covers the gemini managed-files upload, verified by reading the file back
ACTIVE from the provider; a managed-object poll-cap guard for the #23472 OOM
that seeds more than one page of rows into real Postgres and watches the poll
cycle in the proxy logs; and a vertex streaming-upload memory guard for the
LIT-3382 OOM (gated, for an environment with real memory headroom). The pure
helpers have unit coverage, and the memory sampler raises rather than passing
vacuously when the cgroup read is unavailable
2026-06-25 17:03:16 -07:00

64 lines
2.1 KiB
YAML

# Local e2e proxy, built from the litellm_internal_staging branch.
#
# The image `litellm-staging:local` is built from a clean checkout of
# litellm_internal_staging (the working tree's uv.lock has merge markers, so
# build from a worktree, not the dirty tree):
#
# git worktree add /tmp/litellm-staging litellm_internal_staging
# docker build -t litellm-staging:local /tmp/litellm-staging
#
# Then provide provider keys (copy .env.example -> .env, fill in keys) and run:
#
# docker compose -f tests/e2e/docker-compose.yml up -d
#
# The proxy comes up on http://localhost:4000 with master key sk-1234, which is
# what the e2e suites default to. Point the suites at it:
#
# LITELLM_MASTER_KEY=sk-1234 LITELLM_PROXY_URL=http://localhost:4000 \
# .venv/bin/python -m pytest tests/e2e/ -v
services:
litellm:
image: litellm-staging:local
ports:
- "4000:4000"
command: ["--config", "/app/config.yaml", "--port", "4000"]
volumes:
- ./gateway/litellm-config.yml:/app/config.yaml
environment:
DATABASE_URL: "postgresql://llmproxy:dbpassword9090@db:5432/litellm"
LITELLM_MASTER_KEY: "sk-1234"
STORE_MODEL_IN_DB: "True"
# Run the budget-reset job every ~15-20s (default ~10min) so short budget
# windows actually reset within an e2e test (multi-window + reset suites).
PROXY_BUDGET_RESCHEDULER_MIN_TIME: "15"
PROXY_BUDGET_RESCHEDULER_MAX_TIME: "20"
# LITELLM_LICENSE is injected from .env (gitignored), never hardcoded here.
env_file:
- .env
depends_on:
- db
- redis
db:
image: postgres:17
environment:
POSTGRES_DB: litellm
POSTGRES_USER: llmproxy
POSTGRES_PASSWORD: dbpassword9090
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
redis:
image: redis:7-alpine
# Exposed on host 6380 (not 6379, to avoid clashing with a host-local redis) so
# test_spend_counter_reseed_e2e can read the shared spend counter back and assert
# it equals the DB spend. The litellm container still reaches it as redis:6379.
ports:
- "6380:6379"
volumes:
postgres_data:
driver: local