feat: create individual databases for each test

This commit is contained in:
Aravinth Manivannan
2023-11-05 00:49:06 +05:30
parent 36600e2f13
commit 321fd2e89b
7 changed files with 134 additions and 85 deletions

View File

@@ -7,8 +7,8 @@
use std::env;
use sqlx::postgres::PgPoolOptions;
use sqlx::migrate::MigrateDatabase;
use sqlx::postgres::PgPoolOptions;
use url::Url;
use crate::*;
@@ -47,7 +47,6 @@ async fn everyting_works() {
}
sqlx::Postgres::create_database(&url).await.unwrap();
let pool_options = PgPoolOptions::new().max_connections(2);
let connection_options = ConnectionOptions::Fresh(Fresh {
pool_options,