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

Function test_file_store_workflow_checkpoint_roundtrip

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

Source from the content-addressed store, hash-verified

843
844#[tokio::test]
845async fn test_file_store_workflow_checkpoint_roundtrip() {
846 let dir = tempdir().unwrap();
847 let store = FileSessionStore::new(dir.path()).await.unwrap();
848 let cp = sample_workflow_checkpoint("wf-1");
849 store.save_workflow_checkpoint("wf-1", &cp).await.unwrap();
850
851 let loaded = store
852 .load_workflow_checkpoint("wf-1")
853 .await
854 .unwrap()
855 .expect("present");
856 assert_eq!(loaded, cp);
857 assert_eq!(loaded.completed().len(), 2);
858
859 store.delete_workflow_checkpoint("wf-1").await.unwrap();
860 assert!(store
861 .load_workflow_checkpoint("wf-1")
862 .await
863 .unwrap()
864 .is_none());
865 // Idempotent on a missing file.
866 store.delete_workflow_checkpoint("wf-1").await.unwrap();
867}
868
869#[tokio::test]
870async fn test_memory_store_rejects_future_workflow_checkpoint() {

Callers

nothing calls this directly

Calls 6

pathMethod · 0.80
expectMethod · 0.80

Tested by

no test coverage detected