fix(gateway): include resolved node path in systemd unit

This commit is contained in:
sai-samarth
2026-03-17 15:11:28 +00:00
parent 91b9495b04
commit b8eb7c5fed
2 changed files with 16 additions and 2 deletions

View File

@@ -61,6 +61,13 @@ class TestGeneratedSystemdUnits:
assert "ExecStop=" not in unit
assert "TimeoutStopSec=60" in unit
def test_user_unit_includes_resolved_node_directory_in_path(self, monkeypatch):
monkeypatch.setattr(gateway_cli.shutil, "which", lambda cmd: "/home/test/.nvm/versions/node/v24.14.0/bin/node" if cmd == "node" else None)
unit = gateway_cli.generate_systemd_unit(system=False)
assert "/home/test/.nvm/versions/node/v24.14.0/bin" in unit
def test_system_unit_avoids_recursive_execstop_and_uses_extended_stop_timeout(self):
unit = gateway_cli.generate_systemd_unit(system=True)