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

Function assign_writes_reverse_binding

nodedb/src/control/surrogate/assign.rs:284–293  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

282
283 #[test]
284 fn assign_writes_reverse_binding() {
285 let (_dir, a) = open_test();
286 let s = a.assign("users", b"alice").unwrap();
287 let cat = a.credential_store.catalog().as_ref().unwrap();
288 assert_eq!(
289 cat.get_pk_for_surrogate(DatabaseId::DEFAULT, "users", s)
290 .unwrap(),
291 Some(b"alice".to_vec())
292 );
293 }
294
295 #[test]
296 fn assign_persists_hwm_at_flush_threshold() {

Callers

nothing calls this directly

Calls 4

open_testFunction · 0.70
assignMethod · 0.45
as_refMethod · 0.45
catalogMethod · 0.45

Tested by

no test coverage detected