MCPcopy Create free account
hub / github.com/AI45Lab/Code / test_file_store_delete

Function test_file_store_delete

core/src/store/tests.rs:136–152  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

134
135#[tokio::test]
136async fn test_file_store_delete() {
137 let dir = tempdir().unwrap();
138 let store = FileSessionStore::new(dir.path()).await.unwrap();
139
140 let session = create_test_session_data();
141 store.save(&session).await.unwrap();
142
143 // Verify exists
144 assert!(store.exists(&session.id).await.unwrap());
145
146 // Delete
147 store.delete(&session.id).await.unwrap();
148
149 // Verify gone
150 assert!(!store.exists(&session.id).await.unwrap());
151 assert!(store.load(&session.id).await.unwrap().is_none());
152}
153
154#[tokio::test]
155async fn test_file_store_save_and_load_artifacts() {

Callers

nothing calls this directly

Calls 4

create_test_session_dataFunction · 0.85
pathMethod · 0.80
saveMethod · 0.45
deleteMethod · 0.45

Tested by

no test coverage detected