tests are passing better than ever before, its looking decent actually nowc
This commit is contained in:
@@ -41,12 +41,18 @@ pub async fn setup_isolated_db() -> PgPool {
|
||||
.await
|
||||
.unwrap_or_else(|_| panic!("Failed to create schema: {}", schema_name));
|
||||
|
||||
root_conn
|
||||
.execute("CREATE SCHEMA IF NOT EXISTS \"default\"")
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
let pool = PgPoolOptions::new()
|
||||
.max_connections(5)
|
||||
.after_connect(move |conn, _meta| {
|
||||
let schema_name = schema_name.clone();
|
||||
Box::pin(async move {
|
||||
conn.execute(format!("SET search_path TO \"{}\"", schema_name).as_str())
|
||||
conn.execute(format!("SET search_path TO \"{}\", \"default\", \"public\"", schema_name).as_str())
|
||||
|
||||
.await?;
|
||||
Ok(())
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user