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:1128–1140  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1126
1127 #[test]
1128 fn revocation_is_recorded_and_readable() {
1129 let (_dir, store) = store();
1130 store.save_delegation("AAA", "{}").unwrap();
1131 assert!(!store.is_revoked_locally("AAA"));
1132 assert_eq!(store.load_revocation("AAA").unwrap(), None);
1133
1134 store.save_revocation("AAA", r#"{"revoked":true}"#).unwrap();
1135 assert!(store.is_revoked_locally("AAA"));
1136 assert_eq!(
1137 store.load_revocation("AAA").unwrap().as_deref(),
1138 Some(r#"{"revoked":true}"#)
1139 );
1140 }
1141
1142 #[test]
1143 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