feat: deploy cloud-only RMM and verify audited APT diagnostics
Rust development slice / linux (push) Failing after 7s

This commit is contained in:
2026-11-13 13:49:11 +01:00
parent 6c3203d725
commit fbef0e4e2f
48 changed files with 3125 additions and 34 deletions
+23
View File
@@ -212,6 +212,29 @@ class PreconditionsTests(unittest.TestCase):
with self.assertRaises(apt.Veto):
apt.inspect_sandbox()
def test_private_control_layouts_must_be_empty_or_absent_in_worker(self):
for layout in ('etc-rmm', 'etc-rmm-remote', 'rmm-helper', 'rmm-agent', 'rmm-agent-remote'):
with self.subTest(layout=layout), tempfile.TemporaryDirectory() as temp:
path = Path(temp) / layout
with patch.object(apt, 'PRIVATE_CONTROL_DIRECTORIES', (str(path),)):
apt.inspect_private_control_paths() # optional layout absent
path.mkdir()
apt.inspect_private_control_paths() # masked empty directory
(path / 'arbitrary-future-secret-name').write_text('synthetic')
with self.assertRaisesRegex(apt.Veto, 'SANDBOX_LEDGER_OR_KEYS_VISIBLE'):
apt.inspect_private_control_paths()
def test_private_control_symlink_cannot_claim_an_empty_mask(self):
with tempfile.TemporaryDirectory() as temp:
base = Path(temp); (base / 'empty').mkdir()
(base / 'link').symlink_to(base / 'empty', target_is_directory=True)
with patch.object(apt, 'PRIVATE_CONTROL_DIRECTORIES', (str(base / 'link'),)):
with self.assertRaisesRegex(apt.Veto, 'SANDBOX_LEDGER_OR_KEYS_VISIBLE'):
apt.inspect_private_control_paths()
(base / 'empty').rmdir() # dangling symlink is not an absent layout
with self.assertRaisesRegex(apt.Veto, 'SANDBOX_LEDGER_OR_KEYS_VISIBLE'):
apt.inspect_private_control_paths()
def test_previous_launch_or_handoff_is_unknown_never_relaunched(self):
for marker in ('launch.json', 'hook-armed.json'):
with tempfile.TemporaryDirectory(dir='/tmp/opencode') as temp: