From 4c2887c9472cf7ef1b30d410c1cdfe36fde14f0f Mon Sep 17 00:00:00 2001 From: kdeng00 Date: Sun, 1 Jun 2025 19:47:57 -0400 Subject: [PATCH] Test fix --- src/main.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/main.rs b/src/main.rs index 89fdc0a..3148662 100644 --- a/src/main.rs +++ b/src/main.rs @@ -206,11 +206,8 @@ mod tests { Ok(()) } - pub fn get_database_name() -> Result> { - let rt = tokio::runtime::Runtime::new().unwrap(); - - // Block on the async function to get the result - let database_url = rt.block_on(icarus_envy::environment::get_db_url()); + pub async fn get_database_name() -> Result> { + let database_url = icarus_envy::environment::get_db_url().await; let parsed_url = url::Url::parse(&database_url)?; if parsed_url.scheme() == "postgres" || parsed_url.scheme() == "postgresql" {