Create a test orchestrator with a real FallbackWatcher.
(dir: &TempDir)
| 13 | |
| 14 | /// Create a test orchestrator with a real FallbackWatcher. |
| 15 | fn make_orchestrator(dir: &TempDir) -> TurnOrchestrator { |
| 16 | // Create .atomic directory structure |
| 17 | fs::create_dir_all(dir.path().join(".atomic/sessions")).unwrap(); |
| 18 | |
| 19 | let session_store = SessionStore::for_repo(dir.path()).unwrap(); |
| 20 | let watcher_config = WatcherConfig::new(dir.path()); |
| 21 | let watcher = FallbackWatcher::new(watcher_config); |
| 22 | |
| 23 | TurnOrchestrator::with_watcher(dir.path(), session_store, Box::new(watcher)) |
| 24 | } |
| 25 | |
| 26 | fn session_start_event(session_id: &str) -> TurnEvent { |
| 27 | TurnEvent::new(session_id, HookType::SessionStart) |
no test coverage detected