()
| 1520 | |
| 1521 | #[test] |
| 1522 | fn github_policy_allows_git() { |
| 1523 | let engine = test_engine(); |
| 1524 | let input = NetworkInput { |
| 1525 | host: "github.com".into(), |
| 1526 | port: 443, |
| 1527 | binary_path: PathBuf::from("/usr/bin/git"), |
| 1528 | binary_sha256: "unused".into(), |
| 1529 | ancestors: vec![], |
| 1530 | cmdline_paths: vec![], |
| 1531 | }; |
| 1532 | let decision = engine.evaluate_network(&input).unwrap(); |
| 1533 | assert!( |
| 1534 | decision.allowed, |
| 1535 | "Expected allow, got deny: {}", |
| 1536 | decision.reason |
| 1537 | ); |
| 1538 | assert_eq!( |
| 1539 | decision.matched_policy.as_deref(), |
| 1540 | Some("github_ssh_over_https") |
| 1541 | ); |
| 1542 | } |
| 1543 | |
| 1544 | #[test] |
| 1545 | fn case_insensitive_host_matching() { |
nothing calls this directly
no test coverage detected