Hide hosted dashboard update controls
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user