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

Function test_load_change

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

Source from the content-addressed store, hash-verified

177
178#[test]
179fn test_load_change() {
180 let (store, _temp) = create_test_store();
181
182 // Save a change first
183 let original = create_test_change("Test load change");
184 let hash = store.save_change(&original).expect("Failed to save change");
185
186 // Clear cache to force disk read
187 store.clear_cache();
188
189 // Load the change
190 let loaded = store.load_change(&hash).expect("Failed to load change");
191
192 // Verify the data matches
193 assert_eq!(original.hashed.header.message, loaded.hashed.header.message);
194}
195
196#[test]
197fn test_save_load_roundtrip() {

Callers

nothing calls this directly

Calls 5

clear_cacheMethod · 0.80
create_test_storeFunction · 0.70
create_test_changeFunction · 0.70
save_changeMethod · 0.45
load_changeMethod · 0.45

Tested by

no test coverage detected