Authenticate and scope migration operator approvals
ABSDEV Framework CI / framework-ci (push) Failing after 16s

This commit is contained in:
Mark Gregory
2026-11-28 09:58:41 +00:00
parent 8d11a82be4
commit eac09534c7
9 changed files with 228 additions and 21 deletions
+14 -1
View File
@@ -17,7 +17,7 @@ class MigrationTests(unittest.TestCase):
self.fixture = test_approval_store.ApprovalStoreTests()
self.addCleanup(self.fixture.doCleanups)
self.fixture.setUp()
self.ops = SiteOperations(self.fixture.root)
self.ops = SiteOperations(self.fixture.root, operator_policy=self.fixture.policy)
self.fixture.store = self.ops.approvals
self.fixture.save()
@@ -364,5 +364,18 @@ class MigrationTests(unittest.TestCase):
self.migrate.assert_not_called()
def test_missing_execution_authority_blocks_before_containment(self):
from core.operator_approval import OperatorApprovalPolicy
self.fixture.store.operator_policy = OperatorApprovalPolicy(
self.fixture.grants[:1], sealing_key=self.fixture.key,
)
with self.assertRaises(MigrationError):
self.execute()
self.contain.assert_not_called()
self.migrate.assert_not_called()
self.assertFalse(self.coordinator.intent_path(self.fixture.identifier).exists())
self.assertFalse(self.fixture.store.consumed_path(self.fixture.identifier).exists())
if __name__ == "__main__":
unittest.main()