MCPcopy Create free account
hub / github.com/AI45Lab/Code / test_policy_check_deny

Function test_policy_check_deny

core/src/permissions/tests.rs:164–169  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

162
163#[test]
164fn test_policy_check_deny() {
165 let policy = PermissionPolicy::new().deny("Bash(rm -rf:*)");
166
167 let decision = policy.check("Bash", &json!({"command": "rm -rf /"}));
168 assert_eq!(decision, PermissionDecision::Deny);
169}
170
171#[test]
172fn test_policy_check_ask() {

Callers

nothing calls this directly

Calls 2

denyMethod · 0.80
checkMethod · 0.45

Tested by

no test coverage detected