Public Access
fix: test
This commit is contained in:
+1
-3
@@ -4,7 +4,6 @@ use testcontainers::runners::AsyncRunner;
|
|||||||
use testcontainers_modules::postgres::Postgres;
|
use testcontainers_modules::postgres::Postgres;
|
||||||
|
|
||||||
pub struct TestDb {
|
pub struct TestDb {
|
||||||
pub pool: PgPool,
|
|
||||||
pub repository: EntityRepository,
|
pub repository: EntityRepository,
|
||||||
_container: testcontainers::ContainerAsync<Postgres>,
|
_container: testcontainers::ContainerAsync<Postgres>,
|
||||||
}
|
}
|
||||||
@@ -20,10 +19,9 @@ impl TestDb {
|
|||||||
let pool = PgPool::connect(&url).await.unwrap();
|
let pool = PgPool::connect(&url).await.unwrap();
|
||||||
ensure_schema(&pool).await.unwrap();
|
ensure_schema(&pool).await.unwrap();
|
||||||
|
|
||||||
let repository = EntityRepository::new(pool.clone());
|
let repository = EntityRepository::new(pool);
|
||||||
|
|
||||||
Self {
|
Self {
|
||||||
pool,
|
|
||||||
repository,
|
repository,
|
||||||
_container: container,
|
_container: container,
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user