Skip to content

Commit

Permalink
Add test for satisfied witness receipts for long running operation
Browse files Browse the repository at this point in the history
Signed-off-by: pfeairheller <[email protected]>
  • Loading branch information
pfeairheller committed Feb 24, 2024
1 parent fa9eed3 commit ad4a67c
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion tests/app/test_aiding.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from keri.core.coring import MtrDex
from keri.db.basing import LocationRecord
from keri.peer import exchanging
from keri.db import basing
from keri.db import basing, dbing
from keri import kering
from keri.vdr import credentialing
from hio.base import doing
Expand Down Expand Up @@ -426,6 +426,17 @@ def test_identifier_collection_end(helpers):
ss = aid[Algos.salty]
assert ss["pidx"] == 3

# Reset sn
op.metadata['sn'] = 0
agent.monitor.opr.ops.pin(keys=(name,), val=op)

# Add fake witness receipts to test satified witnessing
dgkey = dbing.dgKey(serder.preb, serder.preb)
agent.hby.db.putWigs(dgkey, vals=[b'A', b'B', b'C'])
res = client.simulate_get(path=f"/operations/{name}")
assert res.status_code == 200
assert res.json['done'] is True

res = client.simulate_get(path=f"/identifiers/aid1")
mhab = res.json
agent0 = mhab["state"]
Expand Down

0 comments on commit ad4a67c

Please sign in to comment.