MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / session_hard_revoke_close

Function session_hard_revoke_close

nodedb/tests/security.rs:72–80  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

70
71#[test]
72fn session_hard_revoke_close() {
73 let reg = SessionRegistry::new();
74 let mut rx = reg.register("s1", &sample_params(99, "bob")).unwrap();
75 assert!(!rx.has_changed().unwrap_or(false));
76 let killed = reg.kill_sessions_for_user(99, KillReason::AdminKill);
77 assert_eq!(killed, 1);
78 assert!(rx.has_changed().unwrap_or(false));
79 assert_ne!(*rx.borrow_and_update(), KillReason::Alive);
80}
81
82#[test]
83fn show_sessions_lists_active() {

Callers

nothing calls this directly

Calls 3

sample_paramsFunction · 0.85
registerMethod · 0.45

Tested by

no test coverage detected