Commenting out code
Some checks failed
Rust Build / Check (pull_request) Successful in 48s
Rust Build / Test Suite (pull_request) Failing after 1m15s
Rust Build / Rustfmt (pull_request) Successful in 26s
Rust Build / Clippy (pull_request) Successful in 45s
Rust Build / build (pull_request) Successful in 1m11s

This commit is contained in:
2025-04-02 21:04:55 -04:00
parent 8a5430662e
commit c03e90725f

View File

@@ -28,6 +28,23 @@ const DEFAULT_TEST_DATABASE_URL: &str =
static SETUP: std::sync::Once = std::sync::Once::new();
// Ensure tracing is initialized only once for all tests in this file
/*
static TRACING_INIT: Lazy<()> = Lazy::new(|| {
if std::env::var("RUST_LOG").is_err() {
// Set default log level if not provided
unsafe {
std::env::set_var("RUST_LOG", "info,tower_http=debug,your_project_name=debug");
}
}
tracing_subscriber::fmt()
.with_env_filter(tracing_subscriber::EnvFilter::from_default_env())
.with_test_writer() // Write logs to the test output capture
.init();
});
*/
/*
async fn setup_database() -> sqlx::PgPool {
let database_url = std::env::var(TEST_DATABASE_URL_ENV)
.unwrap_or_else(|_| DEFAULT_TEST_DATABASE_URL.to_string());
@@ -35,17 +52,17 @@ async fn setup_database() -> sqlx::PgPool {
.await
.expect("Failed to connect to test database");
/*
let migrator = sqlx::migrate::Migrator::new(std::path::Path::new("./migrations"))
.await
.expect("Failed to create migrator");
migrator.run(&pool).await.expect("Failed to run migrations");
*/
// Seed here if needed
pool
}
*/
/*
#[tokio::test]
async fn test_db_health() {
SETUP.call_once(|| {
@@ -54,6 +71,7 @@ async fn test_db_health() {
});
});
}
*/
/*
async fn setup_test(pool: sqlx::PgPool) -> Router {
@@ -63,6 +81,7 @@ async fn setup_test(pool: sqlx::PgPool) -> Router {
}
*/
/*
#[tokio::test]
async fn test_hello_world() {
let app = Router::new().route(callers::endpoints::ROOT, get(callers::common::root)); // Replace with your handler
@@ -89,6 +108,7 @@ async fn test_hello_world() {
assert_eq!(body, "Hello, World!");
}
*/
/*
#[tokio::test]