MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / test_read_empty_database

Function test_read_empty_database

atomic-core/src/pristine/txn/read.rs:3149–3161  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3147
3148 #[test]
3149 fn test_read_empty_database() {
3150 let dir = tempdir().unwrap();
3151 let db_path = dir.path().join("pristine");
3152 let pristine = Pristine::open(&db_path).unwrap();
3153
3154 let txn = pristine.read_txn().unwrap();
3155
3156 // Empty database should return None for lookups
3157 assert!(txn.get_external(NodeId::new(1)).unwrap().is_none());
3158 assert!(txn.get_view("main").unwrap().is_none());
3159 assert!(txn.get_inode("test.txt").unwrap().is_none());
3160 assert!(txn.list_views().unwrap().is_empty());
3161 }
3162
3163 #[test]
3164 fn healthy_graph_and_inode_multimap_reads_remain_ordered_and_filtered() {

Callers

nothing calls this directly

Calls 4

openFunction · 0.85
read_txnMethod · 0.80
unwrapMethod · 0.45
pathMethod · 0.45

Tested by

no test coverage detected