MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / revocation_is_recorded_and_readable

Function revocation_is_recorded_and_readable

atomic-identity/src/store.rs:1149–1161  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1147
1148 #[test]
1149 fn revocation_is_recorded_and_readable() {
1150 let (_dir, store) = store();
1151 store.save_delegation("AAA", "{}").unwrap();
1152 assert!(!store.is_revoked_locally("AAA"));
1153 assert_eq!(store.load_revocation("AAA").unwrap(), None);
1154
1155 store.save_revocation("AAA", r#"{"revoked":true}"#).unwrap();
1156 assert!(store.is_revoked_locally("AAA"));
1157 assert_eq!(
1158 store.load_revocation("AAA").unwrap().as_deref(),
1159 Some(r#"{"revoked":true}"#)
1160 );
1161 }
1162
1163 #[test]
1164 fn delete_removes_the_revocation_too() {

Callers

nothing calls this directly

Calls 4

storeFunction · 0.85
save_delegationMethod · 0.80
save_revocationMethod · 0.80
unwrapMethod · 0.45

Tested by

no test coverage detected