fix(image): use compatible findmnt mount guard options

This commit is contained in:
Codex
2026-10-13 05:10:43 +03:00
parent e4af8dbd75
commit 989591dfe4
2 changed files with 9 additions and 1 deletions
+8
View File
@@ -128,6 +128,14 @@ class ImageTests(unittest.TestCase):
self.assertEqual(actual, expected)
self.assertEqual(result.returncode == 0, not failed and not cleanup_failed)
def test_retry_guard_uses_valid_real_findmnt_options(self):
from hydra.build import rootfs_retry_guard_script
self.file('.hydra-export-owned')
script = 'set -eu\nroot=' + shlex.quote(str(self.root)) + '\n' + rootfs_retry_guard_script()
result = subprocess.run(['bash', '-c', script], capture_output=True, text=True)
self.assertEqual(result.returncode, 0, result.stderr)
self.assertFalse(self.root.exists())
def test_retry_refuses_removing_owned_rootfs_with_stale_child_mount(self):
from hydra.build import rootfs_retry_guard_script
marker = self.file('.hydra-export-owned')