mirror of
https://github.com/block/buzz.git
synced 2026-11-02 07:22:55 +00:00
test(sections): reuse migrated integration database
Signed-off-by: Larry <8cf5a83f590ec0955b11647d1c88f796a98e088c30a492c58e0e46c3026ae7a4@buzz.block.builderlab.xyz>
This commit is contained in:
@@ -1205,13 +1205,9 @@ mod tests {
|
||||
let database_url = std::env::var("BUZZ_TEST_DATABASE_URL")
|
||||
.or_else(|_| std::env::var("DATABASE_URL"))
|
||||
.unwrap_or_else(|_| TEST_DB_URL.to_owned());
|
||||
let pool = PgPool::connect(&database_url)
|
||||
PgPool::connect(&database_url)
|
||||
.await
|
||||
.expect("connect to test database");
|
||||
crate::migration::run_migrations(&pool)
|
||||
.await
|
||||
.expect("apply migrations");
|
||||
pool
|
||||
.expect("connect to test database")
|
||||
}
|
||||
|
||||
async fn make_community(pool: &PgPool) -> CommunityId {
|
||||
|
||||
Reference in New Issue
Block a user