()
| 843 | |
| 844 | #[tokio::test] |
| 845 | async 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] |
| 870 | async fn test_memory_store_rejects_future_workflow_checkpoint() { |
nothing calls this directly
no test coverage detected