test(gateway): accept all_profiles kwarg in macOS reaper _get_service_pids mocks

This commit is contained in:
Teknium
2026-08-20 22:20:34 -07:00
parent 42bd567a80
commit 15328b4db7
+7 -2
View File
@@ -580,7 +580,10 @@ class TestReapUnsupervisedGatewayOrphansMacOS:
monkeypatch.setattr(gateway, "supports_systemd_services", lambda: False)
# _get_service_pids returns the launchd-managed gateway PID.
monkeypatch.setattr(gateway, "_get_service_pids", lambda: {launchd_pid})
# (accepts all_profiles: the reaper asks for the whole fleet, #74075)
monkeypatch.setattr(
gateway, "_get_service_pids", lambda all_profiles=False: {launchd_pid}
)
# No pidfile-recorded gateway in this scenario.
monkeypatch.setattr("gateway.status.get_running_pid", lambda: None)
@@ -613,7 +616,9 @@ class TestReapUnsupervisedGatewayOrphansMacOS:
monkeypatch.setattr(gateway, "is_macos", lambda: True)
monkeypatch.setattr(gateway, "supports_systemd_services", lambda: False)
monkeypatch.setattr(gateway, "_get_service_pids", lambda: {launchd_pid})
monkeypatch.setattr(
gateway, "_get_service_pids", lambda all_profiles=False: {launchd_pid}
)
monkeypatch.setattr("gateway.status.get_running_pid", lambda: None)
# find_gateway_pids would return the launchd PID, but it's excluded.