MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / test_parse_policy

Function test_parse_policy

crates/openshell-prover/src/lib.rs:92–101  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

90 // 1. Parse testdata/policy.yaml, verify structure.
91 #[test]
92 fn test_parse_policy() {
93 let path = testdata_dir().join("policy.yaml");
94 let model = parse_policy(&path).expect("failed to parse policy");
95 assert_eq!(model.version, 1);
96 assert!(model.network_policies.contains_key("github_api"));
97 let rule = &model.network_policies["github_api"];
98 assert_eq!(rule.name, "github-api");
99 assert_eq!(rule.endpoints.len(), 2);
100 assert!(rule.binaries.len() >= 4);
101 }
102
103 // 2. Verify readable_paths.
104 #[test]

Callers

nothing calls this directly

Calls 2

testdata_dirFunction · 0.85
parse_policyFunction · 0.85

Tested by

no test coverage detected