refactor(e2e): unify RouterInstance into Gateway class, split conftest.py into modular fixtures (#16671)

This commit is contained in:
Simo Lin
2026-01-07 07:50:28 -08:00
committed by GitHub
parent ee4d2287ab
commit c356ed03dd
10 changed files with 1281 additions and 1090 deletions
@@ -1 +1,47 @@
"""Shared fixtures for router integration tests."""
"""Fixtures for E2E tests.
This package contains modular pytest fixtures split by responsibility:
- hooks.py: Pytest collection hooks and marker registration
- pool.py: Model pool fixtures (session-scoped worker management)
- setup_backend.py: Backend setup fixtures (class/function-scoped)
- markers.py: Helper utilities for marker extraction
Legacy modules (to be removed during e2e_response_api migration):
- ports.py: Use infra.get_open_port() instead
- router_manager.py: Use infra.Gateway instead
"""
# Pytest hooks (imported by conftest.py via pytest_plugins)
from .hooks import (
get_pool_requirements,
pytest_collection_finish,
pytest_collection_modifyitems,
pytest_configure,
validate_gpu_requirements,
)
# Marker helpers
from .markers import get_marker_kwargs, get_marker_value
# Fixtures (imported by conftest.py)
from .pool import model_base_url, model_client, model_pool
from .setup_backend import backend_router, setup_backend
__all__ = [
# Hooks
"pytest_collection_modifyitems",
"pytest_collection_finish",
"pytest_configure",
"get_pool_requirements",
"validate_gpu_requirements",
# Pool fixtures
"model_pool",
"model_client",
"model_base_url",
# Backend fixtures
"setup_backend",
"backend_router",
# Marker helpers
"get_marker_value",
"get_marker_kwargs",
]