Implement offline workload intake and record blocked owner dependencies
Assistant: codex Assistant-Model: gpt-6.1-sol Assistant-Session: 01a1029c-c003-7283-acc9-930b434e6cae
This commit is contained in:
parent
c1a75e85aa
commit
c1cf6cf54c
13 changed files with 790 additions and 25 deletions
|
|
@ -12,11 +12,16 @@ from test_durable_store import storage,present
|
|||
from test_durable_component import receiver
|
||||
|
||||
|
||||
def test_schema_one_upgrade_preserves_existing_evidence(storage):
|
||||
@pytest.mark.parametrize("version", [1, 2])
|
||||
def test_schema_upgrade_preserves_existing_evidence(storage, version):
|
||||
store,memo=storage;p=present(store,memo)
|
||||
before=store.evidence()
|
||||
with sqlite3.connect(store.path) as db:
|
||||
db.execute('DROP TABLE policy_observations');db.execute('PRAGMA user_version=1')
|
||||
db.execute('DROP TABLE intake_deliveries')
|
||||
db.execute('DROP TABLE intake_ledger')
|
||||
if version == 1:
|
||||
db.execute('DROP TABLE policy_observations')
|
||||
db.execute(f'PRAGMA user_version={version}')
|
||||
reopened=Store(store.path)
|
||||
assert reopened.retrieve_presentation(p.id)[0]==memo and reopened.evidence()==before
|
||||
assert reopened.policy_observations()==[]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue