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

Function test_parse_exact_ip

crates/openshell-supervisor-network/src/proxy.rs:6785–6791  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

6783
6784 #[test]
6785 fn test_parse_exact_ip() {
6786 let raw = vec!["10.0.5.20".to_string()];
6787 let nets = parse_allowed_ips(&raw).unwrap();
6788 assert_eq!(nets.len(), 1);
6789 assert!(nets[0].contains(&IpAddr::V4(Ipv4Addr::new(10, 0, 5, 20))));
6790 assert!(!nets[0].contains(&IpAddr::V4(Ipv4Addr::new(10, 0, 5, 21))));
6791 }
6792
6793 #[test]
6794 fn test_parse_multiple_entries() {

Callers

nothing calls this directly

Calls 1

parse_allowed_ipsFunction · 0.85

Tested by

no test coverage detected