Compose foreground sandbox process lifetimes
This commit is contained in:
parent
3171c41399
commit
fd78804fc7
1 changed files with 2313 additions and 7 deletions
|
|
@ -271,7 +271,10 @@ class VerificationTests(unittest.TestCase):
|
|||
"--all-features",
|
||||
"--locked",
|
||||
"--filterset",
|
||||
"not binary(capability-drop-helper) and not binary(acquisition)",
|
||||
(
|
||||
"not binary(capability-drop-helper) and not binary(acquisition) "
|
||||
"and not binary(runtime-composition)"
|
||||
),
|
||||
],
|
||||
[
|
||||
"cargo",
|
||||
|
|
@ -293,6 +296,16 @@ class VerificationTests(unittest.TestCase):
|
|||
"capability-drop-helper",
|
||||
"--locked",
|
||||
],
|
||||
[
|
||||
"cargo",
|
||||
"test",
|
||||
"--offline",
|
||||
"-p",
|
||||
"lazaret-host-coordinator",
|
||||
"--test",
|
||||
"runtime-composition",
|
||||
"--locked",
|
||||
],
|
||||
[
|
||||
"cargo",
|
||||
"test",
|
||||
|
|
@ -305,16 +318,34 @@ class VerificationTests(unittest.TestCase):
|
|||
]
|
||||
commands = []
|
||||
original_run = VERIFY.run
|
||||
original_physical = VERIFY.run_physical
|
||||
VERIFY.run = lambda command, cwd=VERIFY.ROOT: commands.append(command)
|
||||
VERIFY.run_physical = lambda command, cwd=VERIFY.ROOT: commands.append(command)
|
||||
try:
|
||||
VERIFY.run_rust_tests()
|
||||
finally:
|
||||
VERIFY.run = original_run
|
||||
VERIFY.run_physical = original_physical
|
||||
self.assertEqual(commands, expected)
|
||||
self.assertIn("exact cargo-nextest 0.9.140", source)
|
||||
self.assertIn("exact uv 0.11.28", source)
|
||||
self.assertIn("Python 3.11 or newer", source)
|
||||
|
||||
def test_physical_test_accepts_only_pass_or_explicit_skip(self) -> None:
|
||||
with mock.patch.object(
|
||||
VERIFY.subprocess,
|
||||
"run",
|
||||
return_value=VERIFY.subprocess.CompletedProcess(["physical"], 77),
|
||||
):
|
||||
VERIFY.run_physical(["physical"])
|
||||
with mock.patch.object(
|
||||
VERIFY.subprocess,
|
||||
"run",
|
||||
return_value=VERIFY.subprocess.CompletedProcess(["physical"], 1),
|
||||
):
|
||||
with self.assertRaisesRegex(VERIFY.VerificationError, "physical test exited 1"):
|
||||
VERIFY.run_physical(["physical"])
|
||||
|
||||
def test_advisory_refresh_checks_versions_before_mutation(self) -> None:
|
||||
events = []
|
||||
original_versions = VERIFY.check_tool_versions
|
||||
|
|
|
|||
Loading…
Reference in a new issue