mirror of
https://github.com/lennart-k/rustical.git
synced 2025-12-14 01:12:24 +00:00
Janky fix for sqlite tests
This commit is contained in:
@@ -43,8 +43,12 @@ pub async fn create_db_pool(db_url: &str, migrate: bool) -> Result<Pool<Sqlite>,
|
||||
Ok(db)
|
||||
}
|
||||
|
||||
pub async fn create_test_store() -> Result<SqliteStore, sqlx::Error> {
|
||||
pub async fn create_test_db() -> Result<SqlitePool, sqlx::Error> {
|
||||
let db = SqlitePool::connect("sqlite::memory:").await?;
|
||||
sqlx::migrate!("./migrations").run(&db).await?;
|
||||
Ok(SqliteStore::new(db))
|
||||
Ok(db)
|
||||
}
|
||||
|
||||
pub async fn create_test_store() -> Result<SqliteStore, sqlx::Error> {
|
||||
Ok(SqliteStore::new(create_test_db().await?))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user