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; + } }