diff --git a/src/crates/core/src/infrastructure/debug_log/http_server.rs b/src/crates/core/src/infrastructure/debug_log/http_server.rs index 5c360265d..9272f09f2 100644 --- a/src/crates/core/src/infrastructure/debug_log/http_server.rs +++ b/src/crates/core/src/infrastructure/debug_log/http_server.rs @@ -100,7 +100,7 @@ impl IngestServerManager { let app = Router::new() .route("/health", get(health_handler)) - .route("/ingest/:session_id", post(ingest_handler)) + .route("/ingest/{session_id}", post(ingest_handler)) .layer(cors) .with_state(state.clone()); @@ -227,3 +227,24 @@ async fn ingest_handler( } } } + +#[cfg(test)] +mod tests { + use super::*; + + #[tokio::test] + async fn starts_with_session_id_ingest_route() { + let manager = IngestServerManager::new(); + let config = IngestServerConfig { + port: 0, + ..IngestServerConfig::default() + }; + + manager + .start(Some(config)) + .await + .expect("ingest server should start with session id route"); + + manager.stop().await; + } +}