mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-29 07:21:37 +08:00
23 lines
698 B
Python
23 lines
698 B
Python
|
|
from hermes_cli.gateway import _runtime_health_lines
|
||
|
|
|
||
|
|
|
||
|
|
def test_runtime_health_lines_include_fatal_platform_and_startup_reason(monkeypatch):
|
||
|
|
monkeypatch.setattr(
|
||
|
|
"gateway.status.read_runtime_status",
|
||
|
|
lambda: {
|
||
|
|
"gateway_state": "startup_failed",
|
||
|
|
"exit_reason": "telegram conflict",
|
||
|
|
"platforms": {
|
||
|
|
"telegram": {
|
||
|
|
"state": "fatal",
|
||
|
|
"error_message": "another poller is active",
|
||
|
|
}
|
||
|
|
},
|
||
|
|
},
|
||
|
|
)
|
||
|
|
|
||
|
|
lines = _runtime_health_lines()
|
||
|
|
|
||
|
|
assert "⚠ telegram: another poller is active" in lines
|
||
|
|
assert "⚠ Last startup issue: telegram conflict" in lines
|