add folder migration & add folder unit test

This commit is contained in:
appflowy
2022-01-19 16:00:11 +08:00
parent 44ff74a37c
commit 324dc53e5f
22 changed files with 479 additions and 341 deletions

View File

@ -4,8 +4,9 @@ pub mod helper;
use crate::helper::*;
use backend_service::configuration::{get_client_server_configuration, ClientServerConfiguration};
use flowy_sdk::{FlowySDK, FlowySDKConfig};
use flowy_user::entities::UserProfile;
use flowy_user::{entities::UserProfile, services::database::UserDB};
use lib_infra::uuid_string;
use std::sync::Arc;
pub mod prelude {
pub use crate::{event_builder::*, helper::*, *};
@ -51,3 +52,15 @@ impl FlowySDKTest {
context.user_profile
}
}
pub struct MigrationTest {
pub db: UserDB,
}
impl MigrationTest {
pub fn new() -> Self {
let dir = root_dir();
let db = UserDB::new(&dir);
Self { db }
}
}