()
| 1485 | |
| 1486 | #[test] |
| 1487 | fn wrong_endpoint_denied() { |
| 1488 | let engine = test_engine(); |
| 1489 | let input = NetworkInput { |
| 1490 | host: "evil.example.com".into(), |
| 1491 | port: 443, |
| 1492 | binary_path: PathBuf::from("/usr/bin/node"), |
| 1493 | binary_sha256: "unused".into(), |
| 1494 | ancestors: vec![], |
| 1495 | cmdline_paths: vec![], |
| 1496 | }; |
| 1497 | let decision = engine.evaluate_network(&input).unwrap(); |
| 1498 | assert!(!decision.allowed); |
| 1499 | assert!( |
| 1500 | decision.reason.contains("endpoint"), |
| 1501 | "Expected endpoint deny reason, got: {}", |
| 1502 | decision.reason |
| 1503 | ); |
| 1504 | } |
| 1505 | |
| 1506 | #[test] |
| 1507 | fn unknown_binary_default_deny() { |
nothing calls this directly
no test coverage detected