fix(tests): auto-derive unique port+state-dir per worktree (fixes parallel pytest)

This commit is contained in:
Hermes Agent
2026-04-14 19:04:48 +00:00
parent 924c833878
commit c3251ea97d
43 changed files with 130 additions and 60 deletions

View File

@@ -12,6 +12,7 @@ Covers:
from __future__ import annotations
import json
import os
import pathlib
import urllib.error
import urllib.request
@@ -187,7 +188,7 @@ class TestApplyOnboardingSetupGuard:
# Integration tests — require the live test server on port 8788
# ---------------------------------------------------------------------------
BASE = "http://127.0.0.1:8788"
from tests._pytest_port import BASE
def _http_get(path):
@@ -213,7 +214,7 @@ def _server_hermes_home() -> pathlib.Path:
env_path = data.get("system", {}).get("env_path", "")
if env_path:
return pathlib.Path(env_path).parent
return pathlib.Path.home() / ".hermes" / "webui-mvp-test"
return pathlib.Path(os.environ.get("HERMES_WEBUI_TEST_STATE_DIR", str(pathlib.Path.home() / ".hermes" / "webui-mvp-test")))
def _server_reachable() -> bool: