mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
setup flowy sdk server configuration
This commit is contained in:
@ -3,7 +3,7 @@ mod helper;
|
||||
pub mod workspace;
|
||||
|
||||
use crate::helper::*;
|
||||
use backend_service::config::ServerConfig;
|
||||
use backend_service::configuration::{get_client_server_configuration, ClientServerConfiguration};
|
||||
use flowy_sdk::{FlowySDK, FlowySDKConfig};
|
||||
use flowy_user::entities::UserProfile;
|
||||
use lib_infra::uuid;
|
||||
@ -22,7 +22,7 @@ pub struct FlowyTest {
|
||||
|
||||
impl FlowyTest {
|
||||
pub fn setup() -> Self {
|
||||
let server_config = ServerConfig::default();
|
||||
let server_config = get_client_server_configuration().unwrap();
|
||||
let test = Self::setup_with(server_config);
|
||||
std::mem::forget(test.sdk.dispatcher());
|
||||
test
|
||||
@ -38,7 +38,7 @@ impl FlowyTest {
|
||||
context.user_profile
|
||||
}
|
||||
|
||||
pub fn setup_with(server_config: ServerConfig) -> Self {
|
||||
pub fn setup_with(server_config: ClientServerConfiguration) -> Self {
|
||||
let config = FlowySDKConfig::new(&root_dir(), server_config, &uuid()).log_filter("debug");
|
||||
let sdk = FlowySDK::new(config);
|
||||
Self { sdk }
|
||||
|
Reference in New Issue
Block a user