()
| 382 | |
| 383 | #[tokio::test] |
| 384 | async fn test_file_store_overwrite() { |
| 385 | let dir = tempdir().unwrap(); |
| 386 | let store = FileSessionStore::new(dir.path()).await.unwrap(); |
| 387 | |
| 388 | let mut session = create_test_session_data(); |
| 389 | store.save(&session).await.unwrap(); |
| 390 | |
| 391 | // Modify and save again |
| 392 | session.messages.push(Message::user("Another message")); |
| 393 | session.updated_at = 1700000200; |
| 394 | store.save(&session).await.unwrap(); |
| 395 | |
| 396 | // Load and verify |
| 397 | let loaded = store.load(&session.id).await.unwrap().unwrap(); |
| 398 | assert_eq!(loaded.messages.len(), 3); |
| 399 | assert_eq!(loaded.updated_at, 1700000200); |
| 400 | } |
| 401 | |
| 402 | #[tokio::test] |
| 403 | async fn test_file_store_path_traversal_prevention() { |
nothing calls this directly
no test coverage detected