From b1f9d84007fa4bf909c1ce966b7ef63d030f9c6d Mon Sep 17 00:00:00 2001 From: shuiyisong Date: Mon, 9 Dec 2024 16:44:46 +0800 Subject: [PATCH] chore: move ready under loki --- src/servers/src/http.rs | 17 ++++++++--------- tests-integration/tests/http.rs | 2 +- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/src/servers/src/http.rs b/src/servers/src/http.rs index d8d07ed31fa0..7b86d61eb981 100644 --- a/src/servers/src/http.rs +++ b/src/servers/src/http.rs @@ -638,15 +638,10 @@ impl HttpServer { router.clone() }; - router = router - .route( - "/health", - routing::get(handler::health).post(handler::health), - ) - .route( - "/ready", - routing::get(handler::health).post(handler::health), - ); + router = router.route( + "/health", + routing::get(handler::health).post(handler::health), + ); router = router.route("/status", routing::get(handler::status)); @@ -728,6 +723,10 @@ impl HttpServer { fn route_loki(log_state: LogState) -> Router { Router::new() + .route( + "/ready", + routing::get(handler::health).post(handler::health), + ) .route("/api/v1/push", routing::post(event::loki_ingest)) .with_state(log_state) } diff --git a/tests-integration/tests/http.rs b/tests-integration/tests/http.rs index 8b5c7e9fc8fe..4136175266ae 100644 --- a/tests-integration/tests/http.rs +++ b/tests-integration/tests/http.rs @@ -776,7 +776,7 @@ pub async fn test_health_api(store_type: StorageType) { } health_api(&client, "/health").await; - health_api(&client, "/ready").await; + health_api(&client, "/v1/loki/ready").await; } pub async fn test_status_api(store_type: StorageType) {