From 44f586a369cbb4cb99b1023af158b6e30fbd2236 Mon Sep 17 00:00:00 2001 From: Kristofers Solo Date: Sun, 22 Jun 2025 13:57:59 +0300 Subject: [PATCH] fix: tests --- server/tests/api/health_check.rs | 2 +- server/tests/api/helpers.rs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/server/tests/api/health_check.rs b/server/tests/api/health_check.rs index 70f5c6f..40db9d7 100644 --- a/server/tests/api/health_check.rs +++ b/server/tests/api/health_check.rs @@ -4,7 +4,7 @@ use reqwest::Client; #[tokio::test] async fn health_check() { let app = spawn_app().await; - let url = format!("{}/health_check", &app.addr); + let url = format!("http://{}/api/v1/health_check", &app.addr); let client = Client::new(); let response = client .get(&url) diff --git a/server/tests/api/helpers.rs b/server/tests/api/helpers.rs index 9f69f51..ba0ce21 100644 --- a/server/tests/api/helpers.rs +++ b/server/tests/api/helpers.rs @@ -21,6 +21,7 @@ static TRACING: Lazy<()> = Lazy::new(|| { } }); +#[derive(Debug)] pub struct TestApp { pub _pool: PgPool, pub addr: SocketAddr, @@ -46,7 +47,7 @@ pub async fn spawn_app() -> TestApp { .expect("Failed to build application."); let addr = application.addr(); - let _ = tokio::spawn(application.start()).await; + tokio::spawn(application.start()); TestApp { _pool: get_connection_pool(&config.database),