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

Function put_and_get_roundtrip

nodedb/src/control/array_sync/snapshot_store.rs:277–284  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

275
276 #[test]
277 fn put_and_get_roundtrip() {
278 let s = store();
279 let snap = snap("arr", 100);
280 s.put(&snap).unwrap();
281 let loaded = s.get("arr", hlc(100)).unwrap();
282 assert_eq!(loaded.snapshot_hlc, snap.snapshot_hlc);
283 assert_eq!(loaded.tile_blob, snap.tile_blob);
284 }
285
286 #[test]
287 fn get_missing_returns_none() {

Callers

nothing calls this directly

Calls 5

snapFunction · 0.85
storeFunction · 0.70
hlcFunction · 0.70
putMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected