diff options
| author | tv <tv@krebsco.de> | 2026-11-16 22:47:30 +0000 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-11-17 00:08:49 +0100 |
| commit | 65e9d86e48e3fd182882ceb54b9b8b1ff475369d (patch) | |
| tree | 2945d28d1ecde1f281896ce13dbc8b6c8b776b99 /src/access/token.rs | |
| parent | bae1b3ce82ee67e059bfbe75a69cbe970a6213f9 (diff) | |
store: a test per attack row marked unit
Each row of `docs/store.md`, Attacks, marked unit has its test,
`store_attack_<row>`: 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.
Diffstat (limited to 'src/access/token.rs')
| -rw-r--r-- | src/access/token.rs | 5 |
1 files changed, 3 insertions, 2 deletions
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(); |
