test: cover removal/mutation events in the parity property tests
Some checks failed
CI / check (push) Has been cancelled
Some checks failed
CI / check (push) Has been cancelled
Extends build_broad_state with vhost/suspend/akill/forbid/news/cert/access/ group-member removals and a memo read — the asymmetric removal apply arms are exactly where the drop-purge bug hid. Both the fold-parity and compaction round-trip tests pass over the full ~55-operation sequence, so live==replay ==compacted holds across adds, mutations and removals.
This commit is contained in:
parent
289470ca0c
commit
56cac370eb
1 changed files with 18 additions and 0 deletions
|
|
@ -569,6 +569,24 @@
|
||||||
db.oper_grant("carol", vec!["admin".into()], None);
|
db.oper_grant("carol", vec!["admin".into()], None);
|
||||||
db.session_except_add("*@trusted.host", 10, "trusted");
|
db.session_except_add("*@trusted.host", 10, "trusted");
|
||||||
db.group_set_founder("!other", "carol").unwrap();
|
db.group_set_founder("!other", "carol").unwrap();
|
||||||
|
// Removal / mutation events — where live-vs-apply asymmetries hide.
|
||||||
|
db.set_vhost("bob", "bob.temp", "oper", None).unwrap();
|
||||||
|
db.del_vhost("bob").unwrap();
|
||||||
|
db.suspend_account("carol", "oper", "oops", None).unwrap();
|
||||||
|
db.unsuspend_account("carol").unwrap();
|
||||||
|
db.akill_add("Q", "spam*", "oper", "nick", None).unwrap();
|
||||||
|
db.akill_del("Q", "spam*").unwrap();
|
||||||
|
db.forbid_add("CHAN", "#evil*", "oper", "bad").unwrap();
|
||||||
|
db.forbid_del("CHAN", "#evil*").unwrap();
|
||||||
|
let nid = db.news_add("logon", "temp notice", "oper");
|
||||||
|
db.news_del(nid);
|
||||||
|
db.certfp_add("bob", "1122334455667788990011223344556677889900").unwrap();
|
||||||
|
db.certfp_del("bob", "1122334455667788990011223344556677889900").unwrap();
|
||||||
|
db.access_add("#chan", "carol", "voice").unwrap();
|
||||||
|
db.access_del("#chan", "carol").unwrap();
|
||||||
|
db.group_set_flags("!other", "bob", "").unwrap();
|
||||||
|
db.group_del_member("!other", "bob").unwrap();
|
||||||
|
db.memo_read("carol", 0);
|
||||||
// The compound one: dropping alice must purge her access, successorship
|
// The compound one: dropping alice must purge her access, successorship
|
||||||
// and group standing — identically in the live path and on replay.
|
// and group standing — identically in the live path and on replay.
|
||||||
db.drop_account("alice").unwrap();
|
db.drop_account("alice").unwrap();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue