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

Function policy_evaluation_matrix

atomic-repository/src/git_binding/trust.rs:207–225  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

205
206 #[test]
207 fn policy_evaluation_matrix() {
208 let policy = policy(&["did:atomic:COLLAB"], &["did:atomic:BANNED"]);
209 assert_eq!(
210 signer_trust_for(&policy, "did:atomic:REPO", Some("did:atomic:REPO")),
211 SignerTrust::Trusted
212 );
213 assert_eq!(
214 signer_trust_for(&policy, "did:atomic:COLLAB", Some("did:atomic:REPO")),
215 SignerTrust::Trusted
216 );
217 assert_eq!(
218 signer_trust_for(&policy, "did:atomic:STRANGER", Some("did:atomic:REPO")),
219 SignerTrust::Unknown
220 );
221 assert_eq!(
222 signer_trust_for(&policy, "did:atomic:BANNED", Some("did:atomic:REPO")),
223 SignerTrust::Revoked
224 );
225 }
226}

Callers

nothing calls this directly

Calls 1

policyFunction · 0.85

Tested by

no test coverage detected