From 65e9d86e48e3fd182882ceb54b9b8b1ff475369d Mon Sep 17 00:00:00 2001 From: tv Date: Mon, 16 Nov 2026 22:47:30 +0000 Subject: store: a test per attack row marked unit Each row of `docs/store.md`, Attacks, marked unit has its test, `store_attack_`: where it is judged (`access::holding`, `access::token`), where the store held in memory meets it (`federation::store::memory`), and where a node reads its store from its document (`federation::held`). Tests that checked a row already take its name; a check reads the doc's rows and fails on a unit row without its test, but for rows 21 and 22, which the remakes bring. --- src/access/token.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/access/token.rs') diff --git a/src/access/token.rs b/src/access/token.rs index 54dd7f8..0b6521a 100644 --- a/src/access/token.rs +++ b/src/access/token.rs @@ -288,10 +288,11 @@ mod tests { serde_json::from_slice(&BASE64URL.decode(payload).unwrap()).unwrap() } - /// In a swarm holding a store, a node takes only the tokens it issued. + /// In a swarm holding a store, a node takes only the tokens it issued (`docs/store.md`, + /// Attacks, 17: a token from another node). #[cfg(feature = "federation")] #[test] - fn a_store_node_takes_its_own_tokens_only() { + fn store_attack_17() { let key = NodeKey::from_seed([1; 32]); let other = NodeKey::from_seed([2; 32]); let mut doc = crate::document::events::started("federation", b"a root").unwrap(); -- cgit v1.3.1