mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-25 17:18:11 +00:00
test: accept the new profile-scoped kwargs in status fakes
/api/status?profile= now passes pid_path=/path=/expected_home= to the PID and runtime-status readers; the profile-unification fakes had zero-arg signatures and raised TypeError. Plain /api/status call shapes are unchanged (pinned by the existing zero-arg tests in test_web_server.py).
This commit is contained in:
parent
ddb86725b5
commit
9c65cdb043
1 changed files with 11 additions and 5 deletions
|
|
@ -525,7 +525,9 @@ class TestProfileScopedGateway:
|
|||
|
||||
seen_homes = []
|
||||
|
||||
def fake_get_running_pid():
|
||||
def fake_get_running_pid(*args, **kwargs):
|
||||
# /api/status?profile= now passes pid_path= explicitly (the TTL
|
||||
# cache would otherwise serve another profile's PID) — accept it.
|
||||
seen_homes.append(str(get_hermes_home()))
|
||||
return None
|
||||
|
||||
|
|
@ -536,7 +538,7 @@ class TestProfileScopedGateway:
|
|||
monkeypatch.setattr(
|
||||
web_server,
|
||||
"read_runtime_status",
|
||||
lambda: {"gateway_state": "startup_failed", "platforms": {}},
|
||||
lambda *a, **k: {"gateway_state": "startup_failed", "platforms": {}},
|
||||
)
|
||||
monkeypatch.setattr(web_server, "_GATEWAY_HEALTH_URL", None)
|
||||
|
||||
|
|
@ -567,10 +569,14 @@ class TestProfileScopedGateway:
|
|||
"updated_at": "2026-06-17T00:00:00+00:00",
|
||||
}
|
||||
monkeypatch.setattr(web_server, "check_config_version", lambda: (1, 1))
|
||||
monkeypatch.setattr(web_server, "get_running_pid_cached", lambda: None)
|
||||
monkeypatch.setattr(web_server, "read_runtime_status", lambda: runtime)
|
||||
monkeypatch.setattr(
|
||||
web_server, "get_runtime_status_running_pid", lambda payload: 4242
|
||||
web_server, "get_running_pid_cached", lambda *a, **k: None
|
||||
)
|
||||
monkeypatch.setattr(web_server, "read_runtime_status", lambda *a, **k: runtime)
|
||||
monkeypatch.setattr(
|
||||
web_server,
|
||||
"get_runtime_status_running_pid",
|
||||
lambda payload, **k: 4242,
|
||||
)
|
||||
monkeypatch.setattr(web_server, "_GATEWAY_HEALTH_URL", None)
|
||||
from gateway.config import Platform
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue