Assert that a document is absent (NotFound or empty payload).
(
core: &mut CoreLoop,
tx: &mut Producer<BridgeRequest>,
rx: &mut Consumer<BridgeResponse>,
collection: &str,
doc_id: &str,
)
| 312 | |
| 313 | /// Assert that a document is absent (NotFound or empty payload). |
| 314 | pub fn assert_doc_absent( |
| 315 | core: &mut CoreLoop, |
| 316 | tx: &mut Producer<BridgeRequest>, |
| 317 | rx: &mut Consumer<BridgeResponse>, |
| 318 | collection: &str, |
| 319 | doc_id: &str, |
| 320 | ) { |
| 321 | let r = send_raw(core, tx, rx, doc_get(collection, doc_id)); |
| 322 | let is_absent = r.status == Status::Error || r.payload.is_empty() || r.payload.len() <= 3; |
| 323 | assert!( |
| 324 | is_absent, |
| 325 | "doc {collection}/{doc_id} must be absent after rollback; status={:?} payload_len={}", |
| 326 | r.status, |
| 327 | r.payload.len() |
| 328 | ); |
| 329 | } |
| 330 | |
| 331 | /// Assert that graph node `src` has no REL neighbors. |
| 332 | pub fn assert_edge_absent( |