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:2002–2014  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2000
2001 #[test]
2002 fn test_store_save_and_load() {
2003 let (_dir, store) = make_store();
2004 let session = make_session();
2005
2006 store.save(&session).unwrap();
2007
2008 let loaded = store.load("sess-abc-123").unwrap();
2009 assert!(loaded.is_some());
2010
2011 let loaded = loaded.unwrap();
2012 assert_eq!(loaded.session_id, "sess-abc-123");
2013 assert_eq!(loaded.agent_name, "claude-code");
2014 }
2015
2016 #[test]
2017 fn test_store_concurrent_saves_do_not_share_temp_files() {

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