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

Function assert_edge_absent

nodedb-test-support/src/tx_batch_helpers.rs:332–346  ·  view source on GitHub ↗

Assert that graph node `src` has no REL neighbors.

(
    core: &mut CoreLoop,
    tx: &mut Producer<BridgeRequest>,
    rx: &mut Consumer<BridgeResponse>,
    collection: &str,
    src: &str,
)

Source from the content-addressed store, hash-verified

330
331/// Assert that graph node `src` has no REL neighbors.
332pub fn assert_edge_absent(
333 core: &mut CoreLoop,
334 tx: &mut Producer<BridgeRequest>,
335 rx: &mut Consumer<BridgeResponse>,
336 collection: &str,
337 src: &str,
338) {
339 let r = send_raw(core, tx, rx, neighbors(collection, src));
340 assert_eq!(r.status, Status::Ok);
341 assert!(
342 r.payload.len() <= 3,
343 "edge from {src} must be absent after rollback; payload_len={}",
344 r.payload.len()
345 );
346}
347
348/// Assert columnar row count equals `expected`.
349/// An empty or missing collection counts as 0.

Calls 2

send_rawFunction · 0.70
neighborsFunction · 0.70