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

Function test_change_path_format

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

Source from the content-addressed store, hash-verified

183
184#[test]
185fn test_change_path_format() {
186 let (store, _temp) = create_test_store();
187
188 let hash = Hash::of(b"test content");
189 let path = store.change_path(&hash);
190
191 // Path should be: {changes_dir}/{prefix}/{full_hash}.change
192 let hash_str = hash.to_base32();
193 let expected_prefix = &hash_str[..2];
194
195 assert!(path.to_string_lossy().contains(expected_prefix));
196 assert!(path.to_string_lossy().ends_with(".change"));
197 assert!(path.to_string_lossy().contains(&hash_str));
198}
199
200#[test]
201fn 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