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

Function test_file_store_exists

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

Source from the content-addressed store, hash-verified

609
610#[tokio::test]
611async fn test_file_store_exists() {
612 let dir = tempdir().unwrap();
613 let store = FileSessionStore::new(dir.path()).await.unwrap();
614
615 let session = create_test_session_data();
616
617 // Not yet saved
618 assert!(!store.exists(&session.id).await.unwrap());
619
620 // Save and verify exists
621 store.save(&session).await.unwrap();
622 assert!(store.exists(&session.id).await.unwrap());
623
624 // Delete and verify gone
625 store.delete(&session.id).await.unwrap();
626 assert!(!store.exists(&session.id).await.unwrap());
627}
628
629#[tokio::test]
630async fn test_memory_store_exists() {

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