Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 22 additions & 1 deletion src/crates/core/src/infrastructure/debug_log/http_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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());

Expand Down Expand Up @@ -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;
}
}
Loading