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

Function test_pristine_open

atomic-core/src/pristine/txn/pristine.rs:768–782  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

766
767 #[test]
768 fn test_pristine_open() {
769 let dir = tempdir().unwrap();
770 let db_path = dir.path().join("pristine");
771 let pristine = Pristine::open(&db_path).unwrap();
772
773 assert_eq!(
774 pristine.path_claim_schema_version().unwrap(),
775 Some(PATH_CLAIM_SCHEMA_VERSION)
776 );
777 assert!(!pristine.path_claim_migration_required().unwrap());
778
779 // Should be able to create transactions
780 let _read = pristine.read_txn().unwrap();
781 let _write = pristine.write_txn().unwrap();
782 }
783
784 fn metadata_only_repository_with_requirement(db_path: &Path, capability: &str, version: u32) {
785 let db = Database::create(db_path).unwrap();

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected