Wait for B2 Core readiness and reconcile exact failed foundation002

This commit is contained in:
Codex
2026-09-30 17:00:03 +03:00
parent 1e191868be
commit 39a2239563
5 changed files with 534 additions and 5 deletions
@@ -44,8 +44,9 @@ class Foundation(unittest.TestCase):
# Isolate the YAML/identity guard; no database or SQL execution.
with mock.patch.object(R, 'sha256_file', return_value=R.DEVICE_B2_SQL_SHA):
R.validate_device_b2_payload(root, R.DEVICE_B2_ENTRIES, R.DEVICE_B2_ID)
with self.assertRaises(R.DeployError):
R.validate_device_b2_payload(root, R.DEVICE_B2_ENTRIES, 'device-b2-foundation-v1-20260930-001')
for old_id in ('device-b2-foundation-v1-20260930-001', 'device-b2-foundation-v1-20260930-002'):
with self.assertRaises(R.DeployError):
R.validate_device_b2_payload(root, R.DEVICE_B2_ENTRIES, old_id)
for replacement in ('true', 'null', '0'):
yaml.write_text(R.DEVICE_B2_YAML.replace('create_host_path: false', 'create_host_path: ' + replacement))
with self.subTest(replacement=replacement), self.assertRaises(R.DeployError):