Fix test db setup
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
Rafael Caricio 2023-04-27 22:40:20 +02:00
parent 5d0b03c2a3
commit d8bea2c868
Signed by: rafaelcaricio
GPG key ID: 3C86DBCE8E93C947

View file

@ -19,7 +19,7 @@ pub async fn create_test_database() -> Client {
// Create connection without database name
db_config.dbname("");
let db_client = create_database_client(&db_config).await;
let db_client = create_database_client(&db_config, None).await;
let drop_db_statement = format!("DROP DATABASE IF EXISTS {db_name:?}", db_name = db_name,);
db_client.execute(&drop_db_statement, &[]).await.unwrap();
let create_db_statement = format!(
@ -31,7 +31,7 @@ pub async fn create_test_database() -> Client {
// Create new connection to database
db_config.dbname(&db_name);
let mut db_client = create_database_client(&db_config).await;
let mut db_client = create_database_client(&db_config, None).await;
apply_migrations(&mut db_client).await;
db_client
}