From 2252ff8ec62a6af3bd23c9e2250e722913db163e Mon Sep 17 00:00:00 2001 From: phoenix Date: Tue, 1 Apr 2025 23:32:19 -0400 Subject: [PATCH] Commenting out test code for now --- tests/auth_tests.rs | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/tests/auth_tests.rs b/tests/auth_tests.rs index 359033e..22efc5a 100644 --- a/tests/auth_tests.rs +++ b/tests/auth_tests.rs @@ -12,7 +12,7 @@ use axum::{ }; // use hyper::client::conn; // use sqlx::PgPool; -use sqlx::postgres::PgPoolOptions; +use sqlx::postgres::{self, PgPoolOptions}; use testcontainers_modules::testcontainers::runners::AsyncRunner; // use hyper::client; // use sqlx::postgres; @@ -57,8 +57,9 @@ async fn test_hello_world() { assert_eq!(body, "Hello, World!"); } +/* #[tokio::test] -async fn test_db_health_check() { +async fn _test_db_health_check() { let container = testcontainers_modules::postgres::Postgres::default() .start() .await @@ -73,6 +74,20 @@ async fn test_db_health_check() { println!("Test Database: {}", conn_string); + let app = Router::new().route(callers::endpoints::DBTEST, get(callers::common::db_ping)); // Replace with your handler + + let response = app + .oneshot( + Request::builder() + .uri(callers::endpoints::DBTEST) + .body(Body::empty()) + .unwrap(), + ) + .await + .unwrap(); + + assert_eq!(response.status(), StatusCode::OK); + match PgPoolOptions::new().connect(conn_string).await { Ok(_) => { assert!(true, "Success"); @@ -82,3 +97,4 @@ async fn test_db_health_check() { } }; } + */