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

Function test_endpoint_ip

crates/openshell-ocsf/src/objects/endpoint.rs:82–88  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

80
81 #[test]
82 fn test_endpoint_ip() {
83 let ep = Endpoint::from_ip("10.42.0.1".parse().unwrap(), 3128);
84 assert_eq!(ep.domain_or_ip(), "10.42.0.1");
85 let json = serde_json::to_value(&ep).unwrap();
86 assert_eq!(json["ip"], "10.42.0.1");
87 assert!(json.get("domain").is_none());
88 }
89}

Callers

nothing calls this directly

Calls 1

parseMethod · 0.45

Tested by

no test coverage detected