Skip to content

The agent that grows with you

fix(tests): systemd-scope tests patch is_gateway_supervisor_process with its real signature

teknium1309b764a1595
diff --git a/tests/tools/test_process_registry.py b/tests/tools/test_process_registry.py
index 4b7f7c2c5a0..0548586a49a 100644
--- a/tests/tools/test_process_registry.py
+++ b/tests/tools/test_process_registry.py
@@ -2196,7 +2196,7 @@ class TestSystemdCgroupIsolation:
)
monkeypatch.setattr(
"gateway.restart.is_gateway_supervisor_process",
- lambda: True,
+ lambda environ=None: True,
)
# _build_systemd_scope_argv calls shutil.which — point it at a stub.
monkeypatch.setattr("shutil.which", lambda name: "/usr/bin/systemd-run")
@@ -2264,7 +2264,7 @@ class TestSystemdCgroupIsolation:
)
monkeypatch.setattr(
"gateway.restart.is_gateway_supervisor_process",
- lambda: True,
+ lambda environ=None: True,
)
with (
@@ -2291,7 +2291,7 @@ class TestSystemdCgroupIsolation:
)
monkeypatch.setattr(
"gateway.restart.is_gateway_supervisor_process",
- lambda: False,
+ lambda environ=None: False,
)
with (
@@ -2417,7 +2417,7 @@ class TestSystemdCgroupIsolation:
)
monkeypatch.setattr(
"gateway.restart.is_gateway_supervisor_process",
- lambda: True,
+ lambda environ=None: True,
)
monkeypatch.setattr("shutil.which", lambda name: "/usr/bin/systemd-run")
@@ -2452,7 +2452,7 @@ class TestSystemdCgroupIsolation:
)
monkeypatch.setattr(
"gateway.restart.is_gateway_supervisor_process",
- lambda: True,
+ lambda environ=None: True,
)
monkeypatch.setattr("shutil.which", lambda name: "/usr/bin/systemd-run")
@@ -2502,7 +2502,7 @@ class TestSystemdCgroupIsolation:
)
monkeypatch.setattr(
"gateway.restart.is_gateway_supervisor_process",
- lambda: True,
+ lambda environ=None: True,
)
monkeypatch.setattr("shutil.which", lambda name: "/usr/bin/systemd-run")
@@ -2539,7 +2539,7 @@ class TestSystemdCgroupIsolation:
)
monkeypatch.setattr(
"gateway.restart.is_gateway_supervisor_process",
- lambda: True,
+ lambda environ=None: True,
)
monkeypatch.setattr("shutil.which", lambda name: "/usr/bin/systemd-run")
@@ -2898,7 +2898,7 @@ class TestSystemdCgroupIsolation:
monkeypatch.setattr(pr, "_SYSTEMD_SCOPE_AVAILABLE", None)
monkeypatch.setattr("tools.process_registry._find_shell", lambda: "/bin/bash")
monkeypatch.setattr(
- "gateway.restart.is_gateway_supervisor_process", lambda: True
+ "gateway.restart.is_gateway_supervisor_process", lambda environ=None: True
)
# If any branch consults the probe or builds a scope argv on darwin,
# fail loudly.