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