test(update-windows): spawn stubs accept the per-profile home argument
_spawn_detached now forwards home= to _build_gateway_argv so the post-update cold-start can launch another profile's gateway; the two windows_only spawn tests stubbed _build_gateway_argv with a zero-arg lambda and raised TypeError on the Windows runner.
This commit is contained in:
@@ -93,7 +93,7 @@ def test_spawn_detached_marks_primary_breakaway_success(monkeypatch, tmp_path, c
|
||||
monkeypatch.setattr(
|
||||
gateway_windows,
|
||||
"_build_gateway_argv",
|
||||
lambda: (argv, cwd, {"HERMES_GATEWAY_DETACHED": "1"}),
|
||||
lambda home=None: (argv, cwd, {"HERMES_GATEWAY_DETACHED": "1"}),
|
||||
)
|
||||
monkeypatch.setattr("hermes_cli.config.get_hermes_home", lambda: tmp_path)
|
||||
monkeypatch.setattr(gateway_windows.subprocess, "Popen", fake_popen)
|
||||
@@ -131,7 +131,7 @@ def test_spawn_detached_warns_and_marks_no_breakaway_fallback(
|
||||
monkeypatch.setattr(
|
||||
gateway_windows,
|
||||
"_build_gateway_argv",
|
||||
lambda: (
|
||||
lambda home=None: (
|
||||
argv,
|
||||
cwd,
|
||||
{"HERMES_GATEWAY_DETACHED": "1", "SECRET_SENTINEL": "do-not-log"},
|
||||
|
||||
Reference in New Issue
Block a user