feat(corporate): persist dated monthly plans and repair verified release gates
Deploy Canina / deploy (push) Successful in 4m38s
Deploy Canina / deploy (push) Successful in 4m38s
This commit is contained in:
1 parent
18094f91a6
commit
216e05ba25
18 files changed
+829
-29
No files matched your search
@@ -40,6 +40,23 @@ class Safety(unittest.TestCase):
|
||||
digest = client.checkpoint(store, 'stable-key', path, {'result': 'original timestamp'})
|
||||
self.assertEqual(client.replay(store, digest), {'id': 'persisted'})
|
||||
self.assertEqual(calls, [(path, {'result':'original timestamp'}, 'stable-key')])
|
||||
def test_monthly_plan_checkpoints_exact_request_before_post(self):
|
||||
calls = []
|
||||
class Client:
|
||||
def checkpoint(self, store, key, path, body):
|
||||
calls.append(('checkpoint', key, path, body))
|
||||
return 'digest'
|
||||
def call(self, path, body, key):
|
||||
calls.append(('post', key, path, body))
|
||||
return {'tasks': [{'id': 'persisted'}]}
|
||||
body = {'roadmapId': 'stored-roadmap', 'month': '2026-10',
|
||||
'dailyArticles': [{'dueCycle': '2026-10-01', 'sourceIds': ['stored-source']}], 'needs': []}
|
||||
result = r.monthly_plan(Client(), object(), body, 'stable-plan-key')
|
||||
self.assertEqual([c[0] for c in calls], ['checkpoint', 'post'])
|
||||
self.assertEqual(calls[0][1:], calls[1][1:])
|
||||
self.assertEqual(calls[1][1:], ('stable-plan-key', 'monthly-plans', body))
|
||||
self.assertEqual(result, {'plan': {'tasks': [{'id': 'persisted'}]}, 'checkpointDigest': 'digest'})
|
||||
|
||||
def test_api_target(self):
|
||||
with self.assertRaises(ValueError): r.api_target('http://example.com/api/admin/hermes',False)
|
||||
with self.assertRaises(ValueError): r.api_target('https://example.com/api/admin/hermes',False)
|
||||
|
||||
Reference in new issue
Block a user