From e6fe092dcc283b433b6791c3d0713bf1d12e88ce Mon Sep 17 00:00:00 2001 From: Simo Lin Date: Sun, 4 Jan 2026 22:24:34 -0800 Subject: [PATCH] [model-gateway] rename py_test to e2e_test (#16454) --- .github/CODEOWNERS | 2 +- .github/workflows/pr-test-rust.yml | 6 +++--- sgl-model-gateway/Makefile | 2 +- sgl-model-gateway/README.md | 2 +- sgl-model-gateway/{py_test => e2e_test}/__init__.py | 0 sgl-model-gateway/{py_test => e2e_test}/conftest.py | 0 .../e2e_grpc/basic/test_embedding_correctness.py | 0 .../e2e_grpc/basic/test_embedding_server.py | 0 .../e2e_grpc/basic/test_openai_server.py | 0 .../{py_test => e2e_test}/e2e_grpc/conftest.py | 0 .../e2e_grpc/features/test_enable_thinking.py | 0 .../e2e_grpc/features/test_reasoning_content.py | 0 .../{py_test => e2e_test}/e2e_grpc/fixtures.py | 0 .../e2e_grpc/function_call/test_openai_function_calling.py | 2 +- .../e2e_grpc/function_call/test_tool_choice.py | 0 sgl-model-gateway/{py_test => e2e_test}/e2e_grpc/pytest.ini | 0 sgl-model-gateway/{py_test => e2e_test}/e2e_grpc/util.py | 0 .../e2e_grpc/validation/test_large_max_new_tokens.py | 0 .../e2e_grpc/validation/test_openai_server_ignore_eos.py | 2 +- .../{py_test => e2e_test}/e2e_http/conftest.py | 0 .../{py_test => e2e_test}/e2e_http/test_e2e_embeddings.py | 0 .../{py_test => e2e_test}/e2e_http/test_pd_router.py | 0 .../{py_test => e2e_test}/e2e_http/test_regular_router.py | 0 .../{py_test => e2e_test}/e2e_http/test_tls.py | 0 .../{py_test => e2e_test}/e2e_response_api/conftest.py | 0 .../e2e_response_api/features/test_basic_crud.py | 0 .../e2e_response_api/features/test_state_management.py | 0 .../e2e_response_api/features/test_streaming_events.py | 0 .../e2e_response_api/features/test_structured_output.py | 0 .../e2e_response_api/features/test_tools_call.py | 0 .../e2e_response_api/router_fixtures.py | 0 .../{py_test => e2e_test}/e2e_response_api/util.py | 0 .../{py_test => e2e_test}/fixtures/__init__.py | 0 .../{py_test => e2e_test}/fixtures/generate_test_certs.py | 0 .../{py_test => e2e_test}/fixtures/mock_worker.py | 0 sgl-model-gateway/{py_test => e2e_test}/fixtures/ports.py | 0 .../{py_test => e2e_test}/fixtures/router_manager.py | 0 sgl-model-gateway/pytest.ini | 2 +- 38 files changed, 9 insertions(+), 9 deletions(-) rename sgl-model-gateway/{py_test => e2e_test}/__init__.py (100%) rename sgl-model-gateway/{py_test => e2e_test}/conftest.py (100%) rename sgl-model-gateway/{py_test => e2e_test}/e2e_grpc/basic/test_embedding_correctness.py (100%) rename sgl-model-gateway/{py_test => e2e_test}/e2e_grpc/basic/test_embedding_server.py (100%) rename sgl-model-gateway/{py_test => e2e_test}/e2e_grpc/basic/test_openai_server.py (100%) rename sgl-model-gateway/{py_test => e2e_test}/e2e_grpc/conftest.py (100%) rename sgl-model-gateway/{py_test => e2e_test}/e2e_grpc/features/test_enable_thinking.py (100%) rename sgl-model-gateway/{py_test => e2e_test}/e2e_grpc/features/test_reasoning_content.py (100%) rename sgl-model-gateway/{py_test => e2e_test}/e2e_grpc/fixtures.py (100%) rename sgl-model-gateway/{py_test => e2e_test}/e2e_grpc/function_call/test_openai_function_calling.py (99%) rename sgl-model-gateway/{py_test => e2e_test}/e2e_grpc/function_call/test_tool_choice.py (100%) rename sgl-model-gateway/{py_test => e2e_test}/e2e_grpc/pytest.ini (100%) rename sgl-model-gateway/{py_test => e2e_test}/e2e_grpc/util.py (100%) rename sgl-model-gateway/{py_test => e2e_test}/e2e_grpc/validation/test_large_max_new_tokens.py (100%) rename sgl-model-gateway/{py_test => e2e_test}/e2e_grpc/validation/test_openai_server_ignore_eos.py (97%) rename sgl-model-gateway/{py_test => e2e_test}/e2e_http/conftest.py (100%) rename sgl-model-gateway/{py_test => e2e_test}/e2e_http/test_e2e_embeddings.py (100%) rename sgl-model-gateway/{py_test => e2e_test}/e2e_http/test_pd_router.py (100%) rename sgl-model-gateway/{py_test => e2e_test}/e2e_http/test_regular_router.py (100%) rename sgl-model-gateway/{py_test => e2e_test}/e2e_http/test_tls.py (100%) rename sgl-model-gateway/{py_test => e2e_test}/e2e_response_api/conftest.py (100%) rename sgl-model-gateway/{py_test => e2e_test}/e2e_response_api/features/test_basic_crud.py (100%) rename sgl-model-gateway/{py_test => e2e_test}/e2e_response_api/features/test_state_management.py (100%) rename sgl-model-gateway/{py_test => e2e_test}/e2e_response_api/features/test_streaming_events.py (100%) rename sgl-model-gateway/{py_test => e2e_test}/e2e_response_api/features/test_structured_output.py (100%) rename sgl-model-gateway/{py_test => e2e_test}/e2e_response_api/features/test_tools_call.py (100%) rename sgl-model-gateway/{py_test => e2e_test}/e2e_response_api/router_fixtures.py (100%) rename sgl-model-gateway/{py_test => e2e_test}/e2e_response_api/util.py (100%) rename sgl-model-gateway/{py_test => e2e_test}/fixtures/__init__.py (100%) rename sgl-model-gateway/{py_test => e2e_test}/fixtures/generate_test_certs.py (100%) rename sgl-model-gateway/{py_test => e2e_test}/fixtures/mock_worker.py (100%) rename sgl-model-gateway/{py_test => e2e_test}/fixtures/ports.py (100%) rename sgl-model-gateway/{py_test => e2e_test}/fixtures/router_manager.py (100%) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 7d4fab2ba..5fb915de7 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -34,7 +34,7 @@ /sgl-model-gateway @slin1237 @CatherineSue /sgl-model-gateway/benches @slin1237 /sgl-model-gateway/bindings/python @CatherineSue @key4ng @slin1237 -/sgl-model-gateway/py_test @CatherineSue @key4ng +/sgl-model-gateway/e2e_test @CatherineSue @key4ng /sgl-model-gateway/src/config @slin1237 /sgl-model-gateway/src/core @slin1237 /sgl-model-gateway/src/data_connector @key4ng diff --git a/.github/workflows/pr-test-rust.yml b/.github/workflows/pr-test-rust.yml index c741f1a6c..f8989cd39 100644 --- a/.github/workflows/pr-test-rust.yml +++ b/.github/workflows/pr-test-rust.yml @@ -203,7 +203,7 @@ jobs: source "$HOME/.cargo/env" python3 -m pip --no-cache-dir install --upgrade --ignore-installed blinker python3 -m pip --no-cache-dir install --upgrade genai-bench==0.0.2 - pytest py_test/e2e_http -s -vv -o log_cli=true --log-cli-level=INFO + pytest e2e_test/e2e_http -s -vv -o log_cli=true --log-cli-level=INFO - name: Upload benchmark results if: success() @@ -301,14 +301,14 @@ jobs: bash scripts/killall_sglang.sh "nuk_gpus" cd sgl-model-gateway source "$HOME/.cargo/env" - SHOW_ROUTER_LOGS=1 pytest --reruns 3 --reruns-delay 2 py_test/e2e_response_api -s -vv -o log_cli=true --log-cli-level=INFO + SHOW_ROUTER_LOGS=1 pytest --reruns 3 --reruns-delay 2 e2e_test/e2e_response_api -s -vv -o log_cli=true --log-cli-level=INFO - name: Run Python E2E gRPC tests run: | bash scripts/killall_sglang.sh "nuk_gpus" cd sgl-model-gateway source "$HOME/.cargo/env" - SHOW_ROUTER_LOGS=1 ROUTER_LOCAL_MODEL_PATH="/home/ubuntu/models" pytest py_test/e2e_grpc -s -vv -o log_cli=true --log-cli-level=INFO + SHOW_ROUTER_LOGS=1 ROUTER_LOCAL_MODEL_PATH="/home/ubuntu/models" pytest e2e_test/e2e_grpc -s -vv -o log_cli=true --log-cli-level=INFO - name: Cleanup Brave MCP Server if: always() diff --git a/sgl-model-gateway/Makefile b/sgl-model-gateway/Makefile index 5e6cf3f2c..df71a39dc 100644 --- a/sgl-model-gateway/Makefile +++ b/sgl-model-gateway/Makefile @@ -120,7 +120,7 @@ python-clean: ## Clean Python build artifacts python-test: ## Run Python tests @echo "Running Python tests..." - @pytest py_test/ -v + @pytest e2e_test/ -v python-check: ## Check Python package with twine @echo "Checking Python package..." diff --git a/sgl-model-gateway/README.md b/sgl-model-gateway/README.md index a73650957..595ab99fb 100644 --- a/sgl-model-gateway/README.md +++ b/sgl-model-gateway/README.md @@ -1001,7 +1001,7 @@ cd bindings/python && maturin develop # Run Python tests cd ../.. # Back to sgl-model-gateway root -pytest py_test/ +pytest e2e_test/ ``` For production builds, use `maturin build --release --out dist` from the `bindings/python/` directory to create optimized wheels. During development, `maturin develop` rebuilds and installs instantly without creating wheel files. Use `python -m sglang_router.launch_server` to co-launch router and SGLang workers in small clusters for local validation. diff --git a/sgl-model-gateway/py_test/__init__.py b/sgl-model-gateway/e2e_test/__init__.py similarity index 100% rename from sgl-model-gateway/py_test/__init__.py rename to sgl-model-gateway/e2e_test/__init__.py diff --git a/sgl-model-gateway/py_test/conftest.py b/sgl-model-gateway/e2e_test/conftest.py similarity index 100% rename from sgl-model-gateway/py_test/conftest.py rename to sgl-model-gateway/e2e_test/conftest.py diff --git a/sgl-model-gateway/py_test/e2e_grpc/basic/test_embedding_correctness.py b/sgl-model-gateway/e2e_test/e2e_grpc/basic/test_embedding_correctness.py similarity index 100% rename from sgl-model-gateway/py_test/e2e_grpc/basic/test_embedding_correctness.py rename to sgl-model-gateway/e2e_test/e2e_grpc/basic/test_embedding_correctness.py diff --git a/sgl-model-gateway/py_test/e2e_grpc/basic/test_embedding_server.py b/sgl-model-gateway/e2e_test/e2e_grpc/basic/test_embedding_server.py similarity index 100% rename from sgl-model-gateway/py_test/e2e_grpc/basic/test_embedding_server.py rename to sgl-model-gateway/e2e_test/e2e_grpc/basic/test_embedding_server.py diff --git a/sgl-model-gateway/py_test/e2e_grpc/basic/test_openai_server.py b/sgl-model-gateway/e2e_test/e2e_grpc/basic/test_openai_server.py similarity index 100% rename from sgl-model-gateway/py_test/e2e_grpc/basic/test_openai_server.py rename to sgl-model-gateway/e2e_test/e2e_grpc/basic/test_openai_server.py diff --git a/sgl-model-gateway/py_test/e2e_grpc/conftest.py b/sgl-model-gateway/e2e_test/e2e_grpc/conftest.py similarity index 100% rename from sgl-model-gateway/py_test/e2e_grpc/conftest.py rename to sgl-model-gateway/e2e_test/e2e_grpc/conftest.py diff --git a/sgl-model-gateway/py_test/e2e_grpc/features/test_enable_thinking.py b/sgl-model-gateway/e2e_test/e2e_grpc/features/test_enable_thinking.py similarity index 100% rename from sgl-model-gateway/py_test/e2e_grpc/features/test_enable_thinking.py rename to sgl-model-gateway/e2e_test/e2e_grpc/features/test_enable_thinking.py diff --git a/sgl-model-gateway/py_test/e2e_grpc/features/test_reasoning_content.py b/sgl-model-gateway/e2e_test/e2e_grpc/features/test_reasoning_content.py similarity index 100% rename from sgl-model-gateway/py_test/e2e_grpc/features/test_reasoning_content.py rename to sgl-model-gateway/e2e_test/e2e_grpc/features/test_reasoning_content.py diff --git a/sgl-model-gateway/py_test/e2e_grpc/fixtures.py b/sgl-model-gateway/e2e_test/e2e_grpc/fixtures.py similarity index 100% rename from sgl-model-gateway/py_test/e2e_grpc/fixtures.py rename to sgl-model-gateway/e2e_test/e2e_grpc/fixtures.py diff --git a/sgl-model-gateway/py_test/e2e_grpc/function_call/test_openai_function_calling.py b/sgl-model-gateway/e2e_test/e2e_grpc/function_call/test_openai_function_calling.py similarity index 99% rename from sgl-model-gateway/py_test/e2e_grpc/function_call/test_openai_function_calling.py rename to sgl-model-gateway/e2e_test/e2e_grpc/function_call/test_openai_function_calling.py index 096a7cbc7..ba1e18660 100644 --- a/sgl-model-gateway/py_test/e2e_grpc/function_call/test_openai_function_calling.py +++ b/sgl-model-gateway/e2e_test/e2e_grpc/function_call/test_openai_function_calling.py @@ -9,7 +9,7 @@ with minimal changes: - All test logic and assertions remain identical Run with: - pytest py_test/e2e_grpc/e2e_grpc/function_call/test_openai_function_calling.py -v + pytest e2e_test/e2e_grpc/e2e_grpc/function_call/test_openai_function_calling.py -v """ import json diff --git a/sgl-model-gateway/py_test/e2e_grpc/function_call/test_tool_choice.py b/sgl-model-gateway/e2e_test/e2e_grpc/function_call/test_tool_choice.py similarity index 100% rename from sgl-model-gateway/py_test/e2e_grpc/function_call/test_tool_choice.py rename to sgl-model-gateway/e2e_test/e2e_grpc/function_call/test_tool_choice.py diff --git a/sgl-model-gateway/py_test/e2e_grpc/pytest.ini b/sgl-model-gateway/e2e_test/e2e_grpc/pytest.ini similarity index 100% rename from sgl-model-gateway/py_test/e2e_grpc/pytest.ini rename to sgl-model-gateway/e2e_test/e2e_grpc/pytest.ini diff --git a/sgl-model-gateway/py_test/e2e_grpc/util.py b/sgl-model-gateway/e2e_test/e2e_grpc/util.py similarity index 100% rename from sgl-model-gateway/py_test/e2e_grpc/util.py rename to sgl-model-gateway/e2e_test/e2e_grpc/util.py diff --git a/sgl-model-gateway/py_test/e2e_grpc/validation/test_large_max_new_tokens.py b/sgl-model-gateway/e2e_test/e2e_grpc/validation/test_large_max_new_tokens.py similarity index 100% rename from sgl-model-gateway/py_test/e2e_grpc/validation/test_large_max_new_tokens.py rename to sgl-model-gateway/e2e_test/e2e_grpc/validation/test_large_max_new_tokens.py diff --git a/sgl-model-gateway/py_test/e2e_grpc/validation/test_openai_server_ignore_eos.py b/sgl-model-gateway/e2e_test/e2e_grpc/validation/test_openai_server_ignore_eos.py similarity index 97% rename from sgl-model-gateway/py_test/e2e_grpc/validation/test_openai_server_ignore_eos.py rename to sgl-model-gateway/e2e_test/e2e_grpc/validation/test_openai_server_ignore_eos.py index 0b255de4e..19197c737 100644 --- a/sgl-model-gateway/py_test/e2e_grpc/validation/test_openai_server_ignore_eos.py +++ b/sgl-model-gateway/e2e_test/e2e_grpc/validation/test_openai_server_ignore_eos.py @@ -9,7 +9,7 @@ with minimal changes: - All test logic and assertions remain identical Run with: - pytest py_test/e2e_grpc/e2e_grpc/validation/test_openai_server_ignore_eos.py -v + pytest e2e_test/e2e_grpc/e2e_grpc/validation/test_openai_server_ignore_eos.py -v """ import sys diff --git a/sgl-model-gateway/py_test/e2e_http/conftest.py b/sgl-model-gateway/e2e_test/e2e_http/conftest.py similarity index 100% rename from sgl-model-gateway/py_test/e2e_http/conftest.py rename to sgl-model-gateway/e2e_test/e2e_http/conftest.py diff --git a/sgl-model-gateway/py_test/e2e_http/test_e2e_embeddings.py b/sgl-model-gateway/e2e_test/e2e_http/test_e2e_embeddings.py similarity index 100% rename from sgl-model-gateway/py_test/e2e_http/test_e2e_embeddings.py rename to sgl-model-gateway/e2e_test/e2e_http/test_e2e_embeddings.py diff --git a/sgl-model-gateway/py_test/e2e_http/test_pd_router.py b/sgl-model-gateway/e2e_test/e2e_http/test_pd_router.py similarity index 100% rename from sgl-model-gateway/py_test/e2e_http/test_pd_router.py rename to sgl-model-gateway/e2e_test/e2e_http/test_pd_router.py diff --git a/sgl-model-gateway/py_test/e2e_http/test_regular_router.py b/sgl-model-gateway/e2e_test/e2e_http/test_regular_router.py similarity index 100% rename from sgl-model-gateway/py_test/e2e_http/test_regular_router.py rename to sgl-model-gateway/e2e_test/e2e_http/test_regular_router.py diff --git a/sgl-model-gateway/py_test/e2e_http/test_tls.py b/sgl-model-gateway/e2e_test/e2e_http/test_tls.py similarity index 100% rename from sgl-model-gateway/py_test/e2e_http/test_tls.py rename to sgl-model-gateway/e2e_test/e2e_http/test_tls.py diff --git a/sgl-model-gateway/py_test/e2e_response_api/conftest.py b/sgl-model-gateway/e2e_test/e2e_response_api/conftest.py similarity index 100% rename from sgl-model-gateway/py_test/e2e_response_api/conftest.py rename to sgl-model-gateway/e2e_test/e2e_response_api/conftest.py diff --git a/sgl-model-gateway/py_test/e2e_response_api/features/test_basic_crud.py b/sgl-model-gateway/e2e_test/e2e_response_api/features/test_basic_crud.py similarity index 100% rename from sgl-model-gateway/py_test/e2e_response_api/features/test_basic_crud.py rename to sgl-model-gateway/e2e_test/e2e_response_api/features/test_basic_crud.py diff --git a/sgl-model-gateway/py_test/e2e_response_api/features/test_state_management.py b/sgl-model-gateway/e2e_test/e2e_response_api/features/test_state_management.py similarity index 100% rename from sgl-model-gateway/py_test/e2e_response_api/features/test_state_management.py rename to sgl-model-gateway/e2e_test/e2e_response_api/features/test_state_management.py diff --git a/sgl-model-gateway/py_test/e2e_response_api/features/test_streaming_events.py b/sgl-model-gateway/e2e_test/e2e_response_api/features/test_streaming_events.py similarity index 100% rename from sgl-model-gateway/py_test/e2e_response_api/features/test_streaming_events.py rename to sgl-model-gateway/e2e_test/e2e_response_api/features/test_streaming_events.py diff --git a/sgl-model-gateway/py_test/e2e_response_api/features/test_structured_output.py b/sgl-model-gateway/e2e_test/e2e_response_api/features/test_structured_output.py similarity index 100% rename from sgl-model-gateway/py_test/e2e_response_api/features/test_structured_output.py rename to sgl-model-gateway/e2e_test/e2e_response_api/features/test_structured_output.py diff --git a/sgl-model-gateway/py_test/e2e_response_api/features/test_tools_call.py b/sgl-model-gateway/e2e_test/e2e_response_api/features/test_tools_call.py similarity index 100% rename from sgl-model-gateway/py_test/e2e_response_api/features/test_tools_call.py rename to sgl-model-gateway/e2e_test/e2e_response_api/features/test_tools_call.py diff --git a/sgl-model-gateway/py_test/e2e_response_api/router_fixtures.py b/sgl-model-gateway/e2e_test/e2e_response_api/router_fixtures.py similarity index 100% rename from sgl-model-gateway/py_test/e2e_response_api/router_fixtures.py rename to sgl-model-gateway/e2e_test/e2e_response_api/router_fixtures.py diff --git a/sgl-model-gateway/py_test/e2e_response_api/util.py b/sgl-model-gateway/e2e_test/e2e_response_api/util.py similarity index 100% rename from sgl-model-gateway/py_test/e2e_response_api/util.py rename to sgl-model-gateway/e2e_test/e2e_response_api/util.py diff --git a/sgl-model-gateway/py_test/fixtures/__init__.py b/sgl-model-gateway/e2e_test/fixtures/__init__.py similarity index 100% rename from sgl-model-gateway/py_test/fixtures/__init__.py rename to sgl-model-gateway/e2e_test/fixtures/__init__.py diff --git a/sgl-model-gateway/py_test/fixtures/generate_test_certs.py b/sgl-model-gateway/e2e_test/fixtures/generate_test_certs.py similarity index 100% rename from sgl-model-gateway/py_test/fixtures/generate_test_certs.py rename to sgl-model-gateway/e2e_test/fixtures/generate_test_certs.py diff --git a/sgl-model-gateway/py_test/fixtures/mock_worker.py b/sgl-model-gateway/e2e_test/fixtures/mock_worker.py similarity index 100% rename from sgl-model-gateway/py_test/fixtures/mock_worker.py rename to sgl-model-gateway/e2e_test/fixtures/mock_worker.py diff --git a/sgl-model-gateway/py_test/fixtures/ports.py b/sgl-model-gateway/e2e_test/fixtures/ports.py similarity index 100% rename from sgl-model-gateway/py_test/fixtures/ports.py rename to sgl-model-gateway/e2e_test/fixtures/ports.py diff --git a/sgl-model-gateway/py_test/fixtures/router_manager.py b/sgl-model-gateway/e2e_test/fixtures/router_manager.py similarity index 100% rename from sgl-model-gateway/py_test/fixtures/router_manager.py rename to sgl-model-gateway/e2e_test/fixtures/router_manager.py diff --git a/sgl-model-gateway/pytest.ini b/sgl-model-gateway/pytest.ini index c9f400753..930466c12 100644 --- a/sgl-model-gateway/pytest.ini +++ b/sgl-model-gateway/pytest.ini @@ -1,5 +1,5 @@ [pytest] -testpaths = py_test +testpaths = e2e_test python_files = test_*.py python_classes = Test* python_functions = test_*