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

Function test_load_change

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

Source from the content-addressed store, hash-verified

243
244#[test]
245fn test_load_change() {
246 let (store, _temp) = create_test_store();
247
248 // Save a change first
249 let original = create_test_change("Test load change");
250 let hash = store.save_change(&original).expect("Failed to save change");
251
252 // Clear cache to force disk read
253 store.clear_cache();
254
255 // Load the change
256 let loaded = store.load_change(&hash).expect("Failed to load change");
257
258 // Verify the data matches
259 assert_eq!(original.hashed.header.message, loaded.hashed.header.message);
260}
261
262#[test]
263fn 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