test: a non-admin device now forgets the wraps it held (group-threshold-ecdh, Phase 10)

Phase 5's round tests put ledger rows on devices that are not admins; since
Phase 10 those devices forget them when partials reach them, so the tests read
the wrap as absent or unopened.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Kgothatso NgakoandClaude Opus 5.5 committed 2026-11-22 12:07:12 +02:00
1 parent 6f33f6f128
commit 49fb8a92bf
1 file changed
+3 -2
@@ -101,7 +101,8 @@ class GroupEcdhRoundJvmTest {
assertNull(d.context(), "no part to take")
assertEquals(emptyList(), d.db.groupDmDao().getAllOpenRounds())
assertNull(d.db.groupDmDao().getRound(GroupEcdhPayload.roundId(net.roomId, 0, wrap.pubKey)))
assertNull(d.db.groupDmDao().getWrap(wrap.id)!!.sealJson)
// Partials reaching a device that is not an admin make it forget what it held (D14).
assertNull(d.db.groupDmDao().getWrap(wrap.id)?.sealJson)
assertEquals(emptyList(), net.outbox(d), "and sends nothing")
// The slots on every partials message name only the three admins' host keys.
val adminHosts = net.hostKeys.take(3).toSet()
@@ -120,7 +121,7 @@ class GroupEcdhRoundJvmTest {
assertNotNull(b.db.groupDmDao().getWrap(wrap.id)!!.sealJson, "the two remaining admins read it")
assertNull(c.context())
assertNull(c.db.groupDmDao().getWrap(wrap.id)!!.sealJson, "the removed admin does not")
assertNull(c.db.groupDmDao().getWrap(wrap.id)?.sealJson, "the removed admin does not, and forgets the wrap")
assertEquals(emptyList(), c.db.groupDmDao().getAllOpenRounds())
net.outbox(a).filter { it.kind == GroupEcdhEvents.PARTIALS }.forEach {
assertFalse(net.hostKeys[2] in AdminSeal.parseSlots(it.tags).keys)