feat: add system gateway service mode (#1371)

This commit is contained in:
Teknium 2026-03-14 20:54:51 -07:00 committed by GitHub
parent 30b73bdf34
commit 6c24d76533
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 314 additions and 97 deletions

View file

@ -96,7 +96,7 @@ class TestEnsureLingerEnabled:
def test_systemd_install_calls_linger_helper(monkeypatch, tmp_path, capsys):
unit_path = tmp_path / "systemd" / "user" / "hermes-gateway.service"
monkeypatch.setattr(gateway, "get_systemd_unit_path", lambda: unit_path)
monkeypatch.setattr(gateway, "get_systemd_unit_path", lambda system=False: unit_path)
calls = []
@ -117,4 +117,4 @@ def test_systemd_install_calls_linger_helper(monkeypatch, tmp_path, capsys):
["systemctl", "--user", "enable", gateway.SERVICE_NAME],
]
assert helper_calls == [True]
assert "Service installed and enabled" in out
assert "User service installed and enabled" in out