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

Function test_store_save_and_load

atomic-agent/src/turn/session.rs:1050–1062  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1048
1049 #[test]
1050 fn test_store_save_and_load() {
1051 let (_dir, store) = make_store();
1052 let session = make_session();
1053
1054 store.save(&session).unwrap();
1055
1056 let loaded = store.load("sess-abc-123").unwrap();
1057 assert!(loaded.is_some());
1058
1059 let loaded = loaded.unwrap();
1060 assert_eq!(loaded.session_id, "sess-abc-123");
1061 assert_eq!(loaded.agent_name, "claude-code");
1062 }
1063
1064 #[test]
1065 fn test_store_load_nonexistent() {

Callers

nothing calls this directly

Calls 5

make_storeFunction · 0.85
make_sessionFunction · 0.70
unwrapMethod · 0.45
saveMethod · 0.45
loadMethod · 0.45

Tested by

no test coverage detected