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

Function test_store_save_overwrites

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

Source from the content-addressed store, hash-verified

2066
2067 #[test]
2068 fn test_store_save_overwrites() {
2069 let (_dir, store) = make_store();
2070
2071 let mut session = make_session();
2072 session.turn_count = 1;
2073 store.save(&session).unwrap();
2074
2075 session.turn_count = 5;
2076 store.save(&session).unwrap();
2077
2078 let loaded = store.load("sess-abc-123").unwrap().unwrap();
2079 assert_eq!(loaded.turn_count, 5);
2080 }
2081
2082 #[test]
2083 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