From 5b6dd0c4f712ba5aef5eb7b1ab80feb1ff1d5dc3 Mon Sep 17 00:00:00 2001 From: Lucien Cartier-Tilet Date: Tue, 2 Jun 2026 01:05:31 +0200 Subject: [PATCH] fix(health): move test to dedicated test mod --- src/route/health.rs | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/route/health.rs b/src/route/health.rs index 0d6a4bb..270c216 100644 --- a/src/route/health.rs +++ b/src/route/health.rs @@ -28,11 +28,14 @@ impl HealthApi { } } -#[tokio::test] -async fn health_check_works() { - let app = crate::get_test_app(); - let cli = poem::test::TestClient::new(app); - let resp = cli.get("/api/health").send().await; - resp.assert_status_is_ok(); - resp.assert_text("").await; +#[cfg(test)] +mod tests { + #[tokio::test] + async fn health_check_works() { + let app = crate::get_test_app(); + let cli = poem::test::TestClient::new(app); + let resp = cli.get("/api/health").send().await; + resp.assert_status_is_ok(); + resp.assert_text("").await; + } }