MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / handle_join_invalid_addr

Function handle_join_invalid_addr

nodedb-cluster/src/bootstrap/handle_join.rs:303–318  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

301
302 #[test]
303 fn handle_join_invalid_addr() {
304 let mut topology = ClusterTopology::new();
305 let routing = RoutingTable::uniform(1, &[1], 1);
306
307 let req = JoinRequest {
308 node_id: 2,
309 listen_addr: "not-a-valid-address".into(),
310 wire_version: crate::topology::CLUSTER_WIRE_FORMAT_VERSION,
311 spiffe_id: None,
312 spki_pin: None,
313 };
314
315 let resp = handle_join_request(&req, &mut topology, &routing, 42);
316 assert!(!resp.success);
317 assert!(!resp.error.is_empty());
318 }
319}

Callers

nothing calls this directly

Calls 1

handle_join_requestFunction · 0.85

Tested by

no test coverage detected