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

Function parse_wildcard_host

crates/openshell-policy/src/lib.rs:2365–2379  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2363
2364 #[test]
2365 fn parse_wildcard_host() {
2366 let yaml = r#"
2367version: 1
2368network_policies:
2369 test:
2370 name: test
2371 endpoints:
2372 - { host: "*.example.com", port: 443 }
2373 binaries:
2374 - { path: /usr/bin/curl }
2375"#;
2376 let policy = parse_sandbox_policy(yaml).expect("should parse");
2377 let ep = &policy.network_policies["test"].endpoints[0];
2378 assert_eq!(ep.host, "*.example.com");
2379 }
2380
2381 #[test]
2382 fn round_trip_preserves_wildcard_host() {

Callers

nothing calls this directly

Calls 1

parse_sandbox_policyFunction · 0.85

Tested by

no test coverage detected