()
| 2363 | |
| 2364 | #[test] |
| 2365 | fn parse_wildcard_host() { |
| 2366 | let yaml = r#" |
| 2367 | version: 1 |
| 2368 | network_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() { |
nothing calls this directly
no test coverage detected