mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
refactor: rename flowy-test to event-integration (#3667)
This commit is contained in:
parent
cf521fe20b
commit
e59870e421
4
.github/workflows/rust_ci.yaml
vendored
4
.github/workflows/rust_ci.yaml
vendored
@ -60,8 +60,8 @@ jobs:
|
||||
echo SUPABASE_ANON_KEY=${{ secrets.SUPABASE_ANON_KEY }} >> .env.ci
|
||||
echo SUPABASE_JWT_SECRET=${{ secrets.SUPABASE_JWT_SECRET }} >> .env.ci
|
||||
|
||||
- name: Create .env file in flowy-test
|
||||
working-directory: frontend/rust-lib/flowy-test
|
||||
- name: Create .env file in event-integration
|
||||
working-directory: frontend/rust-lib/event-integration
|
||||
run: |
|
||||
touch .env.ci
|
||||
echo SUPABASE_URL=${{ secrets.SUPABASE_URL }} >> .env.ci
|
||||
|
96
frontend/rust-lib/Cargo.lock
generated
96
frontend/rust-lib/Cargo.lock
generated
@ -1534,6 +1534,51 @@ dependencies = [
|
||||
"backtrace",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "event-integration"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"assert-json-diff",
|
||||
"bytes",
|
||||
"collab",
|
||||
"collab-database",
|
||||
"collab-document",
|
||||
"collab-entity",
|
||||
"collab-folder",
|
||||
"collab-plugins",
|
||||
"dotenv",
|
||||
"flowy-core",
|
||||
"flowy-database-deps",
|
||||
"flowy-database2",
|
||||
"flowy-document-deps",
|
||||
"flowy-document2",
|
||||
"flowy-encrypt",
|
||||
"flowy-folder-deps",
|
||||
"flowy-folder2",
|
||||
"flowy-notification",
|
||||
"flowy-server",
|
||||
"flowy-server-config",
|
||||
"flowy-storage",
|
||||
"flowy-user",
|
||||
"flowy-user-deps",
|
||||
"futures-util",
|
||||
"lib-dispatch",
|
||||
"lib-infra",
|
||||
"nanoid",
|
||||
"parking_lot",
|
||||
"protobuf",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"tempdir",
|
||||
"thread-id",
|
||||
"tokio",
|
||||
"tokio-postgres",
|
||||
"tracing",
|
||||
"uuid",
|
||||
"zip",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "event-listener"
|
||||
version = "2.5.3"
|
||||
@ -1751,14 +1796,14 @@ dependencies = [
|
||||
"collab-integrate",
|
||||
"csv",
|
||||
"dashmap",
|
||||
"fancy-regex 0.10.0",
|
||||
"event-integration",
|
||||
"fancy-regex 0.11.0",
|
||||
"flowy-codegen",
|
||||
"flowy-database-deps",
|
||||
"flowy-derive",
|
||||
"flowy-error",
|
||||
"flowy-notification",
|
||||
"flowy-task",
|
||||
"flowy-test",
|
||||
"futures",
|
||||
"indexmap 1.9.3",
|
||||
"lazy_static",
|
||||
@ -1920,9 +1965,7 @@ dependencies = [
|
||||
"flowy-derive",
|
||||
"flowy-error",
|
||||
"flowy-folder-deps",
|
||||
"flowy-folder2",
|
||||
"flowy-notification",
|
||||
"flowy-test",
|
||||
"lazy_static",
|
||||
"lib-dispatch",
|
||||
"lib-infra",
|
||||
@ -2057,51 +2100,6 @@ dependencies = [
|
||||
"tracing",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "flowy-test"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"assert-json-diff",
|
||||
"bytes",
|
||||
"collab",
|
||||
"collab-database",
|
||||
"collab-document",
|
||||
"collab-entity",
|
||||
"collab-folder",
|
||||
"collab-plugins",
|
||||
"dotenv",
|
||||
"flowy-core",
|
||||
"flowy-database-deps",
|
||||
"flowy-database2",
|
||||
"flowy-document-deps",
|
||||
"flowy-document2",
|
||||
"flowy-encrypt",
|
||||
"flowy-folder-deps",
|
||||
"flowy-folder2",
|
||||
"flowy-notification",
|
||||
"flowy-server",
|
||||
"flowy-server-config",
|
||||
"flowy-storage",
|
||||
"flowy-user",
|
||||
"flowy-user-deps",
|
||||
"futures-util",
|
||||
"lib-dispatch",
|
||||
"lib-infra",
|
||||
"nanoid",
|
||||
"parking_lot",
|
||||
"protobuf",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"tempdir",
|
||||
"thread-id",
|
||||
"tokio",
|
||||
"tokio-postgres",
|
||||
"tracing",
|
||||
"uuid",
|
||||
"zip",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "flowy-user"
|
||||
version = "0.1.0"
|
||||
|
@ -6,7 +6,7 @@ members = [
|
||||
"dart-ffi",
|
||||
"flowy-user",
|
||||
"flowy-user-deps",
|
||||
"flowy-test",
|
||||
"event-integration",
|
||||
"flowy-sqlite",
|
||||
"flowy-folder2",
|
||||
"flowy-folder-deps",
|
||||
|
@ -1,5 +1,5 @@
|
||||
[package]
|
||||
name = "flowy-test"
|
||||
name = "event-integration"
|
||||
version = "0.1.0"
|
||||
edition = "2018"
|
||||
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
@ -2,13 +2,13 @@ use std::convert::TryFrom;
|
||||
|
||||
use bytes::Bytes;
|
||||
|
||||
use event_integration::event_builder::EventBuilder;
|
||||
use event_integration::FlowyCoreTest;
|
||||
use flowy_database2::entities::{
|
||||
CellChangesetPB, CellIdPB, ChecklistCellDataChangesetPB, DatabaseLayoutPB,
|
||||
DatabaseSettingChangesetPB, DatabaseViewIdPB, DateChangesetPB, FieldType, SelectOptionCellDataPB,
|
||||
UpdateRowMetaChangesetPB,
|
||||
};
|
||||
use flowy_test::event_builder::EventBuilder;
|
||||
use flowy_test::FlowyCoreTest;
|
||||
use lib_infra::util::timestamp;
|
||||
|
||||
#[tokio::test]
|
@ -7,10 +7,10 @@ use collab::preclude::updates::decoder::Decode;
|
||||
use collab::preclude::{merge_updates_v1, JsonValue, Update};
|
||||
use collab_entity::CollabType;
|
||||
|
||||
use event_integration::event_builder::EventBuilder;
|
||||
use flowy_database2::entities::{DatabasePB, DatabaseViewIdPB, RepeatedDatabaseSnapshotPB};
|
||||
use flowy_database2::event_map::DatabaseEvent::*;
|
||||
use flowy_folder2::entities::ViewPB;
|
||||
use flowy_test::event_builder::EventBuilder;
|
||||
|
||||
use crate::util::FlowySupabaseTest;
|
||||
|
@ -1,7 +1,7 @@
|
||||
use std::time::Duration;
|
||||
|
||||
use event_integration::assert_document_data_equal;
|
||||
use flowy_document2::entities::DocumentSyncStatePB;
|
||||
use flowy_test::assert_document_data_equal;
|
||||
|
||||
use crate::document::af_cloud_test::util::AFCloudDocumentTest;
|
||||
use crate::util::receive_with_timeout;
|
@ -1,7 +1,7 @@
|
||||
use collab_document::blocks::json_str_to_hashmap;
|
||||
use event_integration::document::document_event::DocumentEventTest;
|
||||
use event_integration::document::utils::*;
|
||||
use flowy_document2::entities::*;
|
||||
use flowy_test::document::document_event::DocumentEventTest;
|
||||
use flowy_test::document::utils::*;
|
||||
use serde_json::{json, Value};
|
||||
use std::collections::HashMap;
|
||||
|
@ -1,7 +1,7 @@
|
||||
use std::time::Duration;
|
||||
|
||||
use event_integration::assert_document_data_equal;
|
||||
use flowy_document2::entities::DocumentSyncStatePB;
|
||||
use flowy_test::assert_document_data_equal;
|
||||
|
||||
use crate::document::supabase_test::helper::FlowySupabaseDocumentTest;
|
||||
use crate::util::receive_with_timeout;
|
@ -1,9 +1,9 @@
|
||||
use std::ops::Deref;
|
||||
|
||||
use event_integration::event_builder::EventBuilder;
|
||||
use flowy_document2::entities::{OpenDocumentPayloadPB, RepeatedDocumentSnapshotPB};
|
||||
use flowy_document2::event_map::DocumentEvent::GetDocumentSnapshots;
|
||||
use flowy_folder2::entities::ViewPB;
|
||||
use flowy_test::event_builder::EventBuilder;
|
||||
|
||||
use crate::util::FlowySupabaseTest;
|
||||
|
@ -1,7 +1,10 @@
|
||||
use crate::script::{FolderScript::*, FolderTest};
|
||||
use collab_folder::core::ViewLayout;
|
||||
|
||||
use flowy_folder2::entities::icon::{ViewIconPB, ViewIconTypePB};
|
||||
|
||||
use crate::folder::local_test::script::FolderScript::*;
|
||||
use crate::folder::local_test::script::FolderTest;
|
||||
|
||||
#[tokio::test]
|
||||
async fn read_all_workspace_test() {
|
||||
let mut test = FolderTest::new().await;
|
@ -1,2 +1,4 @@
|
||||
mod folder_test;
|
||||
mod script;
|
||||
mod subscription_test;
|
||||
mod test;
|
@ -1,10 +1,10 @@
|
||||
use collab_folder::core::ViewLayout;
|
||||
|
||||
use event_integration::event_builder::EventBuilder;
|
||||
use event_integration::FlowyCoreTest;
|
||||
use flowy_folder2::entities::icon::{UpdateViewIconPayloadPB, ViewIconPB};
|
||||
use flowy_folder2::entities::*;
|
||||
use flowy_folder2::event_map::FolderEvent::*;
|
||||
use flowy_test::event_builder::EventBuilder;
|
||||
use flowy_test::FlowyCoreTest;
|
||||
|
||||
pub enum FolderScript {
|
||||
// Workspace
|
@ -1,8 +1,8 @@
|
||||
use std::time::Duration;
|
||||
|
||||
use event_integration::FlowyCoreTest;
|
||||
use flowy_folder2::entities::{ChildViewUpdatePB, RepeatedViewPB, UpdateViewPayloadPB};
|
||||
use flowy_folder2::notification::FolderNotification;
|
||||
use flowy_test::FlowyCoreTest;
|
||||
|
||||
use crate::util::receive_with_timeout;
|
||||
|
@ -1,7 +1,7 @@
|
||||
use event_integration::event_builder::EventBuilder;
|
||||
use event_integration::FlowyCoreTest;
|
||||
use flowy_folder2::entities::icon::{UpdateViewIconPayloadPB, ViewIconPB, ViewIconTypePB};
|
||||
use flowy_folder2::entities::*;
|
||||
use flowy_test::event_builder::EventBuilder;
|
||||
use flowy_test::FlowyCoreTest;
|
||||
use flowy_user::errors::ErrorCode;
|
||||
|
||||
#[tokio::test]
|
@ -7,9 +7,9 @@ use collab::preclude::updates::decoder::Decode;
|
||||
use collab::preclude::{merge_updates_v1, JsonValue, Update};
|
||||
use collab_folder::core::FolderData;
|
||||
|
||||
use event_integration::event_builder::EventBuilder;
|
||||
use flowy_folder2::entities::{FolderSnapshotPB, RepeatedFolderSnapshotPB, WorkspaceIdPB};
|
||||
use flowy_folder2::event_map::FolderEvent::GetFolderSnapshots;
|
||||
use flowy_test::event_builder::EventBuilder;
|
||||
|
||||
use crate::util::FlowySupabaseTest;
|
||||
|
@ -1,4 +1,4 @@
|
||||
use flowy_test::FlowyCoreTest;
|
||||
use event_integration::FlowyCoreTest;
|
||||
|
||||
use crate::util::{generate_test_email, get_af_cloud_config};
|
||||
|
@ -1,5 +1,5 @@
|
||||
use flowy_test::user_event::*;
|
||||
use flowy_test::{event_builder::EventBuilder, FlowyCoreTest};
|
||||
use event_integration::user_event::*;
|
||||
use event_integration::{event_builder::EventBuilder, FlowyCoreTest};
|
||||
use flowy_user::entities::{AuthTypePB, SignInPayloadPB, SignUpPayloadPB};
|
||||
use flowy_user::errors::ErrorCode;
|
||||
use flowy_user::event_map::UserEvent::*;
|
@ -1,7 +1,7 @@
|
||||
use std::collections::HashMap;
|
||||
|
||||
use flowy_test::event_builder::EventBuilder;
|
||||
use flowy_test::FlowyCoreTest;
|
||||
use event_integration::event_builder::EventBuilder;
|
||||
use event_integration::FlowyCoreTest;
|
||||
use flowy_user::entities::{ReminderPB, RepeatedReminderPB};
|
||||
use flowy_user::event_map::UserEvent::*;
|
||||
|
@ -1,5 +1,5 @@
|
||||
use crate::user::local_test::helper::*;
|
||||
use flowy_test::{event_builder::EventBuilder, FlowyCoreTest};
|
||||
use event_integration::{event_builder::EventBuilder, FlowyCoreTest};
|
||||
use flowy_user::entities::{UpdateUserProfilePayloadPB, UserProfilePB};
|
||||
use flowy_user::{errors::ErrorCode, event_map::UserEvent::*};
|
||||
use nanoid::nanoid;
|
@ -1,6 +1,6 @@
|
||||
use event_integration::FlowyCoreTest;
|
||||
use flowy_core::DEFAULT_NAME;
|
||||
use flowy_folder2::entities::ViewLayoutPB;
|
||||
use flowy_test::FlowyCoreTest;
|
||||
|
||||
use crate::util::unzip_history_user_db;
|
||||
|
@ -1,6 +1,6 @@
|
||||
use event_integration::FlowyCoreTest;
|
||||
use flowy_core::DEFAULT_NAME;
|
||||
use flowy_folder2::entities::ViewLayoutPB;
|
||||
use flowy_test::FlowyCoreTest;
|
||||
|
||||
use crate::util::unzip_history_user_db;
|
||||
|
@ -8,12 +8,12 @@ use collab_folder::core::FolderData;
|
||||
use nanoid::nanoid;
|
||||
use serde_json::json;
|
||||
|
||||
use event_integration::document::document_event::DocumentEventTest;
|
||||
use event_integration::event_builder::EventBuilder;
|
||||
use event_integration::FlowyCoreTest;
|
||||
use flowy_core::DEFAULT_NAME;
|
||||
use flowy_encrypt::decrypt_text;
|
||||
use flowy_server::supabase::define::{USER_EMAIL, USER_UUID};
|
||||
use flowy_test::document::document_event::DocumentEventTest;
|
||||
use flowy_test::event_builder::EventBuilder;
|
||||
use flowy_test::FlowyCoreTest;
|
||||
use flowy_user::entities::{AuthTypePB, OauthSignInPB, UpdateUserProfilePayloadPB, UserProfilePB};
|
||||
use flowy_user::errors::ErrorCode;
|
||||
use flowy_user::event_map::UserEvent::*;
|
@ -1,9 +1,9 @@
|
||||
use std::collections::HashMap;
|
||||
|
||||
use event_integration::{event_builder::EventBuilder, FlowyCoreTest};
|
||||
use flowy_folder2::entities::WorkspaceSettingPB;
|
||||
use flowy_folder2::event_map::FolderEvent::GetCurrentWorkspace;
|
||||
use flowy_server::supabase::define::{USER_EMAIL, USER_UUID};
|
||||
use flowy_test::{event_builder::EventBuilder, FlowyCoreTest};
|
||||
use flowy_user::entities::{AuthTypePB, OauthSignInPB, UserProfilePB};
|
||||
use flowy_user::event_map::UserEvent::*;
|
||||
|
@ -14,15 +14,15 @@ use tokio::time::timeout;
|
||||
use uuid::Uuid;
|
||||
use zip::ZipArchive;
|
||||
|
||||
use event_integration::event_builder::EventBuilder;
|
||||
use event_integration::Cleaner;
|
||||
use event_integration::FlowyCoreTest;
|
||||
use flowy_database_deps::cloud::DatabaseCloudService;
|
||||
use flowy_folder_deps::cloud::{FolderCloudService, FolderSnapshot};
|
||||
use flowy_server::supabase::api::*;
|
||||
use flowy_server::{AppFlowyEncryption, EncryptionImpl};
|
||||
use flowy_server_config::af_cloud_config::AFCloudConfiguration;
|
||||
use flowy_server_config::supabase_config::SupabaseConfiguration;
|
||||
use flowy_test::event_builder::EventBuilder;
|
||||
use flowy_test::Cleaner;
|
||||
use flowy_test::FlowyCoreTest;
|
||||
use flowy_user::entities::{AuthTypePB, UpdateUserProfilePayloadPB, UserCredentialsPB};
|
||||
use flowy_user::errors::FlowyError;
|
||||
use flowy_user::event_map::UserCloudServiceProvider;
|
@ -32,7 +32,7 @@ rusty-money = {version = "0.4.1", features = ["iso"]}
|
||||
lazy_static = "1.4.0"
|
||||
indexmap = {version = "1.9.2", features = ["serde"]}
|
||||
url = { version = "2"}
|
||||
fancy-regex = "0.10.0"
|
||||
fancy-regex = "0.11.0"
|
||||
futures = "0.3.26"
|
||||
dashmap = "5"
|
||||
anyhow = "1.0"
|
||||
@ -47,7 +47,7 @@ strum = "0.25"
|
||||
strum_macros = "0.25"
|
||||
|
||||
[dev-dependencies]
|
||||
flowy-test = { path = "../flowy-test", default-features = false }
|
||||
event-integration = { path = "../event-integration", default-features = false }
|
||||
|
||||
[build-dependencies]
|
||||
flowy-codegen = { path = "../../../shared-lib/flowy-codegen"}
|
||||
|
@ -6,6 +6,8 @@ use collab_database::fields::Field;
|
||||
use collab_database::rows::{CreateRowParams, RowDetail, RowId};
|
||||
use strum::EnumCount;
|
||||
|
||||
use event_integration::folder_event::ViewTest;
|
||||
use event_integration::FlowyCoreTest;
|
||||
use flowy_database2::entities::{FieldType, FilterPB, RowMetaPB, SelectOptionPB};
|
||||
use flowy_database2::services::cell::{CellBuilder, ToCellChangeset};
|
||||
use flowy_database2::services::database::DatabaseEditor;
|
||||
@ -18,8 +20,6 @@ use flowy_database2::services::field::{
|
||||
};
|
||||
use flowy_database2::services::share::csv::{CSVFormat, ImportResult};
|
||||
use flowy_error::FlowyResult;
|
||||
use flowy_test::folder_event::ViewTest;
|
||||
use flowy_test::FlowyCoreTest;
|
||||
|
||||
use crate::database::mock_data::{
|
||||
make_no_date_test_grid, make_test_board, make_test_calendar, make_test_grid,
|
||||
|
@ -30,10 +30,6 @@ protobuf = {version = "2.28.0"}
|
||||
uuid = { version = "1.3.3", features = ["v4"] }
|
||||
tokio-stream = { version = "0.1.14", features = ["sync"] }
|
||||
|
||||
[dev-dependencies]
|
||||
flowy-folder2 = { workspace = true }
|
||||
flowy-test = { path = "../flowy-test", default-features = false }
|
||||
|
||||
[build-dependencies]
|
||||
flowy-codegen = { path = "../../../shared-lib/flowy-codegen"}
|
||||
|
||||
|
@ -1,2 +0,0 @@
|
||||
mod folder_test;
|
||||
mod script;
|
@ -43,7 +43,7 @@ run_task = { name = ["rust_lib_unit_test", "shared_lib_unit_test"] }
|
||||
env = { RUST_LOG = "info" }
|
||||
description = "Run cloud unit tests"
|
||||
script = '''
|
||||
cd rust-lib/flowy-test
|
||||
cd rust-lib/event-integration
|
||||
RUST_BACKTRACE=1 cargo test supabase_ --features "cloud_test"
|
||||
'''
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user