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

Function test_change_path_format

atomic-repository/src/changestore/tests.rs:119–132  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

117
118#[test]
119fn test_change_path_format() {
120 let (store, _temp) = create_test_store();
121
122 let hash = Hash::of(b"test content");
123 let path = store.change_path(&hash);
124
125 // Path should be: {changes_dir}/{prefix}/{full_hash}.change
126 let hash_str = hash.to_base32();
127 let expected_prefix = &hash_str[..2];
128
129 assert!(path.to_string_lossy().contains(expected_prefix));
130 assert!(path.to_string_lossy().ends_with(".change"));
131 assert!(path.to_string_lossy().contains(&hash_str));
132}
133
134#[test]
135fn test_change_path_deterministic() {

Callers

nothing calls this directly

Calls 3

create_test_storeFunction · 0.70
change_pathMethod · 0.45
to_base32Method · 0.45

Tested by

no test coverage detected