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

Function roundtrip_empty_payload

nodedb-raft/src/snapshot_framing.rs:208–213  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

206
207 #[test]
208 fn roundtrip_empty_payload() {
209 let framed = encode_snapshot_chunk(SnapshotEngineId::KeyValue, &[]);
210 let (id, payload) = decode_snapshot_chunk(&framed).unwrap();
211 assert_eq!(id, SnapshotEngineId::KeyValue);
212 assert!(payload.is_empty());
213 }
214
215 #[test]
216 fn tamper_magic_returns_magic_mismatch() {

Callers

nothing calls this directly

Calls 2

encode_snapshot_chunkFunction · 0.85
decode_snapshot_chunkFunction · 0.85

Tested by

no test coverage detected