mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
chore: replace uuid with nanoid
This commit is contained in:
@ -26,6 +26,7 @@ futures-util = "0.3.15"
|
||||
thread-id = "3.3.0"
|
||||
log = "0.4"
|
||||
bytes = "1.0"
|
||||
nanoid = "0.4.0"
|
||||
|
||||
[dev-dependencies]
|
||||
quickcheck = "0.9.2"
|
||||
|
@ -14,7 +14,6 @@ use flowy_user::{
|
||||
event_map::UserEvent::{InitUser, SignIn, SignOut, SignUp},
|
||||
};
|
||||
use lib_dispatch::prelude::{EventDispatcher, ModuleRequest, ToBytes};
|
||||
use lib_infra::uuid;
|
||||
use std::{fs, path::PathBuf, sync::Arc};
|
||||
|
||||
pub struct ViewTest {
|
||||
@ -127,7 +126,7 @@ pub fn root_dir() -> String {
|
||||
}
|
||||
|
||||
pub fn random_email() -> String {
|
||||
format!("{}@appflowy.io", uuid())
|
||||
format!("{}@appflowy.io", nanoid!(10))
|
||||
}
|
||||
|
||||
pub fn login_email() -> String {
|
||||
|
@ -5,7 +5,7 @@ use crate::helper::*;
|
||||
use flowy_net::{get_client_server_configuration, ClientServerConfiguration};
|
||||
use flowy_sdk::{FlowySDK, FlowySDKConfig};
|
||||
use flowy_user::entities::UserProfile;
|
||||
use lib_infra::uuid;
|
||||
use nanoid::nanoid;
|
||||
|
||||
pub mod prelude {
|
||||
pub use crate::{event_builder::*, helper::*, *};
|
||||
@ -36,7 +36,7 @@ impl std::default::Default for FlowySDKTest {
|
||||
|
||||
impl FlowySDKTest {
|
||||
pub fn new(server_config: ClientServerConfiguration) -> Self {
|
||||
let config = FlowySDKConfig::new(&root_dir(), server_config, &uuid()).log_filter("trace");
|
||||
let config = FlowySDKConfig::new(&root_dir(), server_config, &nanoid!(6)).log_filter("trace");
|
||||
let sdk = std::thread::spawn(|| FlowySDK::new(config)).join().unwrap();
|
||||
std::mem::forget(sdk.dispatcher());
|
||||
Self { inner: sdk }
|
||||
|
Reference in New Issue
Block a user