Hide hosted dashboard update controls

This commit is contained in:
Shannon Sands
2026-06-15 20:08:39 -07:00
committed by Teknium
parent 55cb4103be
commit 0b6b29a30c
7 changed files with 242 additions and 82 deletions
@@ -772,6 +772,25 @@ class TestUpdateCheckEndpoint:
assert body["message"]
assert body["behind"] is None
def test_hosted_dashboard_is_not_applyable(self, monkeypatch):
import hermes_cli.web_server as ws
monkeypatch.setattr(ws, "_dashboard_hosted_agent_mode", lambda: True)
monkeypatch.setattr(
ws,
"detect_install_method",
lambda *a, **k: pytest.fail(
"hosted update check should not probe install method"
),
)
body = self.client.get("/api/hermes/update/check").json()
assert body["install_method"] == "hosted"
assert body["can_apply"] is False
assert body["update_available"] is False
assert body["behind"] is None
assert "hosted agent service" in body["message"]
def test_check_failure_is_soft(self, monkeypatch):
import hermes_cli.web_server as ws
import hermes_cli.banner as banner