()
| 565 | |
| 566 | #[tokio::test] |
| 567 | async fn test_file_store_mixed_separator_sanitization() { |
| 568 | let dir = tempdir().unwrap(); |
| 569 | let store = FileSessionStore::new(dir.path()).await.unwrap(); |
| 570 | |
| 571 | let mut session = create_test_session_data(); |
| 572 | session.id = r"foo/bar\baz..qux".to_string(); |
| 573 | store.save(&session).await.unwrap(); |
| 574 | |
| 575 | let loaded = store.load(&session.id).await.unwrap(); |
| 576 | assert!(loaded.is_some()); |
| 577 | |
| 578 | let loaded = loaded.unwrap(); |
| 579 | assert_eq!(loaded.id, session.id); |
| 580 | |
| 581 | // / -> _, \ -> _, .. -> _ |
| 582 | let expected_path = dir.path().join("foo_bar_baz_qux.json"); |
| 583 | assert!(expected_path.exists()); |
| 584 | } |
| 585 | |
| 586 | // ======================================================================== |
| 587 | // Error Recovery Tests |
nothing calls this directly
no test coverage detected