warning: in the working copy of 'crates/spt-daemon/src/access.rs', LF will be replaced by CRLF the next time Git touches it diff --git a/crates/spt-daemon/src/access.rs b/crates/spt-daemon/src/access.rs index cfe4e531..ef1f0e08 100644 --- a/crates/spt-daemon/src/access.rs +++ b/crates/spt-daemon/src/access.rs @@ -275,11 +275,11 @@ impl DiscoverGate { #[cfg(test)] mod tests { - use spt_store::access::REPLY_WINDOW_MS; - use spt_store::perch::node_key_file; use super::*; use crate::test_home::with_home; + use spt_store::access::REPLY_WINDOW_MS; use spt_store::access::{AccessRule, Mode, OriginQualifier, Provenance, RuleDecision, Subject}; + use spt_store::perch::node_key_file; // [unit->REQ-TRUST-WARNING] the whole warning table, over EVERY pass reason // in both classification states. Two properties are pinned at once: an @@ -558,7 +558,10 @@ mod tests { s.save().unwrap(); let gate = DiscoverGate::load(); - assert!(gate.discloses("ling", "aa11"), "the DISCOVER subject sees it"); + assert!( + gate.discloses("ling", "aa11"), + "the DISCOVER subject sees it" + ); assert!( gate.discloses("doyle", "bb22"), "the refusal is scoped to the ruled endpoint" @@ -776,7 +779,9 @@ mod tests { with_home(|_| { let mut s = AccessStore::default(); s.endpoint_mut("ling").rules.push(AccessRule { - subject: Subject::Node { node: "aa11".into() }, + subject: Subject::Node { + node: "aa11".into(), + }, surfaces: Vec::new(), origin: OriginQualifier::User, provenance: Provenance::Manual, @@ -875,11 +880,7 @@ mod tests { "a reply to the engine room's own outbound reaches it" ); assert_eq!( - classify_engine_room_inbound( - Posture::Online, - surface::MSG, - InboundClass::Unsolicited, - ), + classify_engine_room_inbound(Posture::Online, surface::MSG, InboundClass::Unsolicited,), InboundLock::Unsolicited, "and nothing else does" ); @@ -973,7 +974,14 @@ mod tests { // The wrapper and the stamped path agree — neither is the loose one. assert_eq!( access_check(er, &me, surface::MSG, InboundClass::Unsolicited), - access_check_with_sender(er, &me, surface::MSG, InboundClass::Unsolicited, None, None), + access_check_with_sender( + er, + &me, + surface::MSG, + InboundClass::Unsolicited, + None, + None + ), "the wrapper must not be a second, weaker gate" ); // And an ordinary endpoint still passes through the stamped path. @@ -1223,7 +1231,10 @@ mod tests { spt_store::info::set_controlled(&spt_store::engineroom::engine_room_perch(), false) .expect("detach"); let gate = DiscoverGate::load(); - assert!(!gate.discloses(er, "bb22"), "de-advertisement rides the posture drop"); + assert!( + !gate.discloses(er, "bb22"), + "de-advertisement rides the posture drop" + ); assert!(!gate.discloses(er, &me)); assert!( gate.discloses("ling", "bb22"),