Test fix
Rust Build / Rustfmt (pull_request) Successful in 41s
Rust Build / Test Suite (pull_request) Failing after 52s

This commit is contained in:
2026-06-20 22:19:02 -04:00
parent 4c006e9150
commit a58bba00a2
+9 -4
View File
@@ -31,8 +31,11 @@ mod db_mgr {
template_pool: &sqlx::PgPool, template_pool: &sqlx::PgPool,
db_name: &str, db_name: &str,
) -> Result<(), sqlx::Error> { ) -> Result<(), sqlx::Error> {
let create_query = format!("CREATE DATABASE {}", db_name); match sqlx::query(r#"CREATE DATABASE $1"#)
match sqlx::query(&create_query).execute(template_pool).await { .bind(db_name)
.execute(template_pool)
.await
{
Ok(_) => Ok(()), Ok(_) => Ok(()),
Err(e) => Err(e), Err(e) => Err(e),
} }
@@ -66,8 +69,10 @@ mod db_mgr {
template_pool: &sqlx::PgPool, template_pool: &sqlx::PgPool,
db_name: &str, db_name: &str,
) -> Result<(), sqlx::Error> { ) -> Result<(), sqlx::Error> {
let drop_query = format!("DROP DATABASE IF EXISTS {} WITH (FORCE)", db_name); sqlx::query(r#"DROP DATABASE IF EXISTS $1 WITH (FORCE)"#)
sqlx::query(&drop_query).execute(template_pool).await?; .bind(db_name)
.execute(template_pool)
.await?;
Ok(()) Ok(())
} }