From a2ac2de0119c7a7b7ec89f73cfd749c39f3e2f01 Mon Sep 17 00:00:00 2001 From: tamo Date: Tue, 16 Mar 2021 11:17:54 +0100 Subject: [PATCH] Use 200 status code for healthcheck endpoint --- meilisearch-http/src/routes/health.rs | 2 +- meilisearch-http/tests/health.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/meilisearch-http/src/routes/health.rs b/meilisearch-http/src/routes/health.rs index c57e4c7e9..5544e2cea 100644 --- a/meilisearch-http/src/routes/health.rs +++ b/meilisearch-http/src/routes/health.rs @@ -9,5 +9,5 @@ pub fn services(cfg: &mut web::ServiceConfig) { #[get("/health")] async fn get_health() -> Result { - Ok(HttpResponse::NoContent().finish()) + Ok(HttpResponse::Ok().finish()) } diff --git a/meilisearch-http/tests/health.rs b/meilisearch-http/tests/health.rs index f72127431..57738e009 100644 --- a/meilisearch-http/tests/health.rs +++ b/meilisearch-http/tests/health.rs @@ -7,5 +7,5 @@ async fn test_healthyness() { // Check that the server is healthy let (_response, status_code) = server.get_health().await; - assert_eq!(status_code, 204); + assert_eq!(status_code, 200); }