use sqlx::Postgres; use testdb::*; #[async_std::test] async fn test_setup() { let url = std::env::var("DATABASE_URL").unwrap(); let _ = TestDb::new(&url, |mut connection| { futures::executor::block_on(async { let statements = async_std::fs::read_to_string("tests/schema_postgres.sql") .await .unwrap(); for statement in statements.split(";") { sqlx::query::(&statement) .execute(&mut connection) .await .unwrap(); } }); }) .await; }