From 3d585f8db5b5d3965efa50ab12f9a5b8608cc21c Mon Sep 17 00:00:00 2001 From: Hermes Agent Date: Sat, 16 May 2026 18:37:12 +0000 Subject: [PATCH] test: isolate API server env in gateway tests --- tests/conftest.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/conftest.py b/tests/conftest.py index aa2b1b1fbcb..c1b3b760d52 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -271,6 +271,15 @@ _HERMES_BEHAVIORAL_VARS = frozenset({ "WECOM_HOME_CHANNEL", "WECOM_HOME_CHANNEL_THREAD_ID", "WECOM_HOME_CHANNEL_NAME", + # API server bind/auth settings are common in local gateway profiles and + # change adapter defaults plus load_gateway_config() enablement. Tests that + # need them set opt in explicitly with monkeypatch. + "API_SERVER_ENABLED", + "API_SERVER_HOST", + "API_SERVER_PORT", + "API_SERVER_KEY", + "API_SERVER_CORS_ORIGINS", + "API_SERVER_MODEL_NAME", # Platform gating — set by load_gateway_config() as a side effect when # a config.yaml is present, so individual test bodies that call the # loader leak these values into later tests on the same xdist worker.