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

Function test_store_save_overwrites

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

Source from the content-addressed store, hash-verified

2059
2060 #[test]
2061 fn test_store_save_overwrites() {
2062 let (_dir, store) = make_store();
2063
2064 let mut session = make_session();
2065 session.turn_count = 1;
2066 store.save(&session).unwrap();
2067
2068 session.turn_count = 5;
2069 store.save(&session).unwrap();
2070
2071 let loaded = store.load("sess-abc-123").unwrap().unwrap();
2072 assert_eq!(loaded.turn_count, 5);
2073 }
2074
2075 #[test]
2076 fn test_store_load_rejects_path_traversal() {

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