()
| 358 | |
| 359 | #[tokio::test] |
| 360 | async fn test_file_store_list() { |
| 361 | let dir = tempdir().unwrap(); |
| 362 | let store = FileSessionStore::new(dir.path()).await.unwrap(); |
| 363 | |
| 364 | // Initially empty |
| 365 | let list = store.list().await.unwrap(); |
| 366 | assert!(list.is_empty()); |
| 367 | |
| 368 | // Add sessions |
| 369 | for i in 1..=3 { |
| 370 | let mut session = create_test_session_data(); |
| 371 | session.id = format!("session-{}", i); |
| 372 | store.save(&session).await.unwrap(); |
| 373 | } |
| 374 | |
| 375 | // List should have 3 sessions |
| 376 | let list = store.list().await.unwrap(); |
| 377 | assert_eq!(list.len(), 3); |
| 378 | assert!(list.contains(&"session-1".to_string())); |
| 379 | assert!(list.contains(&"session-2".to_string())); |
| 380 | assert!(list.contains(&"session-3".to_string())); |
| 381 | } |
| 382 | |
| 383 | #[tokio::test] |
| 384 | async fn test_file_store_overwrite() { |
nothing calls this directly
no test coverage detected