Skip to content

Commit

Permalink
Moved MetadataFactory to odf/metadata[#testing].
Browse files Browse the repository at this point in the history
Cleanup of odf imports within odf crates themselves
  • Loading branch information
zaychenko-sergei committed Jan 9, 2025
1 parent 00e821c commit 96c8abc
Show file tree
Hide file tree
Showing 124 changed files with 469 additions and 513 deletions.
18 changes: 5 additions & 13 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion src/adapter/auth-oso/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ tracing = { version = "0.1", default-features = false }

[dev-dependencies]
kamu = { workspace = true, features = ["testing"] }
odf-storage-impl = { workspace = true, features = ["testing"]}
time-source = { workspace = true }

tempfile = "3"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use kamu_adapter_auth_oso::{KamuAuthOso, OsoDatasetAuthorizer};
use kamu_core::auth::{DatasetAction, DatasetActionAuthorizer, DatasetActionUnauthorizedError};
use kamu_core::{CreateDatasetUseCase, TenancyConfig};
use messaging_outbox::DummyOutboxImpl;
use odf_storage_impl::testing::MetadataFactory;
use odf::metadata::testing::MetadataFactory;
use tempfile::TempDir;
use time_source::SystemTimeSourceDefault;

Expand Down
1 change: 0 additions & 1 deletion src/adapter/graphql/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ kamu-flow-system-inmem = { workspace = true }
kamu-task-system-inmem = { workspace = true }
kamu-task-system-services = { workspace = true }
messaging-outbox = { workspace = true }
odf-storage-impl = { workspace = true, features = ["testing"]}
time-source = { workspace = true }

indoc = "2"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ use kamu_flow_system_inmem::{
use kamu_task_system_inmem::InMemoryTaskEventStore;
use kamu_task_system_services::TaskSchedulerImpl;
use messaging_outbox::{register_message_dispatcher, Outbox, OutboxImmediateImpl};
use odf_storage_impl::testing::MetadataFactory;
use odf::metadata::testing::MetadataFactory;
use time_source::SystemTimeSourceDefault;

use crate::utils::authentication_catalogs;
Expand Down
2 changes: 1 addition & 1 deletion src/adapter/graphql/tests/tests/test_gql_data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ use kamu_core::*;
use kamu_datasets_inmem::InMemoryDatasetDependencyRepository;
use kamu_datasets_services::DependencyGraphServiceImpl;
use messaging_outbox::DummyOutboxImpl;
use odf_storage_impl::testing::MetadataFactory;
use odf::metadata::testing::MetadataFactory;
use serde_json::json;
use time_source::SystemTimeSourceDefault;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ use kamu_datasets::DatasetEnvVarsConfig;
use kamu_datasets_inmem::{InMemoryDatasetDependencyRepository, InMemoryDatasetEnvVarRepository};
use kamu_datasets_services::{DatasetEnvVarServiceImpl, DependencyGraphServiceImpl};
use messaging_outbox::DummyOutboxImpl;
use odf_storage_impl::testing::MetadataFactory;
use odf::metadata::testing::MetadataFactory;
use time_source::SystemTimeSourceDefault;

use crate::utils::authentication_catalogs;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ use kamu_datasets_services::DependencyGraphServiceImpl;
use kamu_flow_system_inmem::InMemoryFlowConfigurationEventStore;
use kamu_flow_system_services::FlowConfigurationServiceImpl;
use messaging_outbox::DummyOutboxImpl;
use odf_storage_impl::testing::MetadataFactory;
use odf::metadata::testing::MetadataFactory;
use time_source::SystemTimeSourceDefault;

use crate::utils::{authentication_catalogs, expect_anonymous_access_error};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ use kamu_task_system::{self as ts, TaskMetadata};
use kamu_task_system_inmem::InMemoryTaskEventStore;
use kamu_task_system_services::TaskSchedulerImpl;
use messaging_outbox::{register_message_dispatcher, Outbox, OutboxExt, OutboxImmediateImpl};
use odf_storage_impl::testing::MetadataFactory;
use odf::metadata::testing::MetadataFactory;
use time_source::SystemTimeSourceDefault;

use crate::utils::{authentication_catalogs, expect_anonymous_access_error};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ use kamu_datasets_inmem::InMemoryDatasetDependencyRepository;
use kamu_flow_system_inmem::{InMemoryFlowConfigurationEventStore, InMemoryFlowTriggerEventStore};
use kamu_flow_system_services::FlowTriggerServiceImpl;
use messaging_outbox::DummyOutboxImpl;
use odf_storage_impl::testing::MetadataFactory;
use odf::metadata::testing::MetadataFactory;
use time_source::SystemTimeSourceDefault;

use crate::utils::{authentication_catalogs, expect_anonymous_access_error};
Expand Down
2 changes: 1 addition & 1 deletion src/adapter/graphql/tests/tests/test_gql_datasets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ use kamu_datasets_inmem::InMemoryDatasetDependencyRepository;
use kamu_datasets_services::DependencyGraphServiceImpl;
use messaging_outbox::{register_message_dispatcher, Outbox, OutboxImmediateImpl};
use mockall::predicate::eq;
use odf_storage_impl::testing::MetadataFactory;
use odf::metadata::testing::MetadataFactory;
use time_source::SystemTimeSourceDefault;

use crate::utils::{authentication_catalogs, expect_anonymous_access_error};
Expand Down
2 changes: 1 addition & 1 deletion src/adapter/graphql/tests/tests/test_gql_metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use kamu_core::*;
use kamu_datasets_inmem::InMemoryDatasetDependencyRepository;
use kamu_datasets_services::DependencyGraphServiceImpl;
use messaging_outbox::DummyOutboxImpl;
use odf_storage_impl::testing::MetadataFactory;
use odf::metadata::testing::MetadataFactory;
use time_source::SystemTimeSourceDefault;

use crate::utils::authentication_catalogs;
Expand Down
2 changes: 1 addition & 1 deletion src/adapter/graphql/tests/tests/test_gql_metadata_chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use kamu_core::*;
use kamu_datasets_inmem::InMemoryDatasetDependencyRepository;
use kamu_datasets_services::DependencyGraphServiceImpl;
use messaging_outbox::DummyOutboxImpl;
use odf_storage_impl::testing::MetadataFactory;
use odf::metadata::testing::MetadataFactory;
use time_source::SystemTimeSourceDefault;

use crate::utils::{authentication_catalogs, expect_anonymous_access_error};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use kamu::*;
use kamu_core::utils::metadata_chain_comparator::CompareChainsResult;
use kamu_core::*;
use messaging_outbox::DummyOutboxImpl;
use odf_storage_impl::testing::MetadataFactory;
use odf::metadata::testing::MetadataFactory;
use tempfile::TempDir;
use time_source::SystemTimeSourceDefault;
use url::Url;
Expand Down
2 changes: 1 addition & 1 deletion src/adapter/graphql/tests/tests/test_gql_search.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use kamu_core::*;
use kamu_datasets_inmem::InMemoryDatasetDependencyRepository;
use kamu_datasets_services::DependencyGraphServiceImpl;
use messaging_outbox::DummyOutboxImpl;
use odf_storage_impl::testing::MetadataFactory;
use odf::metadata::testing::MetadataFactory;
use time_source::SystemTimeSourceDefault;

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Expand Down
2 changes: 1 addition & 1 deletion src/adapter/http/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ kamu-datasets-inmem = { workspace = true }
kamu-ingest-datafusion = { workspace = true }
messaging-outbox = { workspace = true }
odf-dataset-impl = { workspace = true, features = ["testing"] }
odf-storage-impl = { workspace = true, features = ["testing"] }
odf-storage-impl = { workspace = true }
test-utils = { workspace = true }

fs_extra = "1.3" # Recursive folder copy
Expand Down
2 changes: 1 addition & 1 deletion src/adapter/http/tests/harness/common_harness.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ use datafusion::arrow::array::{Array, RecordBatch, UInt64Array};
use datafusion::arrow::datatypes::{DataType, Field, Schema};
use kamu::domain::*;
use kamu::testing::ParquetWriterHelper;
use odf::metadata::testing::{AddDataBuilder, MetadataFactory};
use odf::storage::ObjectRepository as _;
use odf_dataset_impl::DatasetLayout;
use odf_storage_impl::testing::{AddDataBuilder, MetadataFactory};
use odf_storage_impl::ObjectRepositoryLocalFSSha3;

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Expand Down
2 changes: 1 addition & 1 deletion src/adapter/http/tests/tests/test_data_query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use kamu::domain::*;
use kamu::*;
use kamu_adapter_http::data::query_types::IdentityConfig;
use kamu_ingest_datafusion::DataWriterDataFusion;
use odf_storage_impl::testing::MetadataFactory;
use odf::metadata::testing::MetadataFactory;
use serde_json::json;

use crate::harness::*;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ use kamu_datasets_inmem::InMemoryDatasetDependencyRepository;
use kamu_datasets_services::DependencyGraphServiceImpl;
use messaging_outbox::DummyOutboxImpl;
use mockall::predicate::{eq, function};
use odf_storage_impl::testing::MetadataFactory;
use odf::metadata::testing::MetadataFactory;
use time_source::SystemTimeSourceDefault;
use url::Url;

Expand Down
2 changes: 1 addition & 1 deletion src/adapter/http/tests/tests/test_dataset_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

use chrono::Utc;
use kamu_core::TenancyConfig;
use odf_storage_impl::testing::MetadataFactory;
use odf::metadata::testing::MetadataFactory;
use serde_json::json;

use crate::harness::*;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ use kamu_adapter_http::smart_protocol::messages::{self, SMART_TRANSFER_PROTOCOL_
use kamu_adapter_http::smart_protocol::protocol_dataset_helper::*;
use kamu_adapter_http::{BearerHeader, OdfSmtpVersion};
use kamu_core::TenancyConfig;
use odf_storage_impl::testing::MetadataFactory;
use odf::metadata::testing::MetadataFactory;
use test_utils::TEST_BUCKET_NAME;
use url::Url;

Expand Down
2 changes: 1 addition & 1 deletion src/adapter/http/tests/tests/test_routing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ use kamu_accounts::CurrentAccountSubject;
use kamu_datasets_inmem::InMemoryDatasetDependencyRepository;
use kamu_datasets_services::DependencyGraphServiceImpl;
use messaging_outbox::DummyOutboxImpl;
use odf::metadata::testing::MetadataFactory;
use odf_dataset_impl::{DatasetFactoryImpl, IpfsGateway};
use odf_storage_impl::testing::MetadataFactory;
use time_source::SystemTimeSourceDefault;
use utoipa_axum::router::OpenApiRouter;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
// the Business Source License, use of this software will be governed
// by the Apache License, Version 2.0.

use odf::metadata::testing::MetadataFactory;
use odf_dataset_impl::DatasetLayout;
use odf_storage_impl::testing::MetadataFactory;

use crate::harness::{
commit_add_data_event,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
// the Business Source License, use of this software will be governed
// by the Apache License, Version 2.0.

use odf::metadata::testing::MetadataFactory;
use odf_dataset_impl::DatasetLayout;
use odf_storage_impl::testing::MetadataFactory;

use crate::harness::{
commit_add_data_event,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// by the Apache License, Version 2.0.

use kamu::domain::*;
use odf_storage_impl::testing::MetadataFactory;
use odf::metadata::testing::MetadataFactory;

use crate::harness::{
copy_dataset_files,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
// by the Apache License, Version 2.0.

use kamu::domain::*;
use odf::metadata::testing::MetadataFactory;
use odf_dataset_impl::DatasetLayout;
use odf_storage_impl::testing::MetadataFactory;

use crate::harness::{
commit_add_data_event,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
// the Business Source License, use of this software will be governed
// by the Apache License, Version 2.0.

use odf::metadata::testing::MetadataFactory;
use odf_dataset_impl::DatasetLayout;
use odf_storage_impl::testing::MetadataFactory;

use crate::harness::{
commit_add_data_event,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
// the Business Source License, use of this software will be governed
// by the Apache License, Version 2.0.

use odf::metadata::testing::MetadataFactory;
use odf_dataset_impl::DatasetLayout;
use odf_storage_impl::testing::MetadataFactory;

use crate::harness::{
commit_add_data_event,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
// the Business Source License, use of this software will be governed
// by the Apache License, Version 2.0.

use odf::metadata::testing::MetadataFactory;
use odf_dataset_impl::DatasetLayout;
use odf_storage_impl::testing::MetadataFactory;

use crate::harness::{
commit_add_data_event,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
// the Business Source License, use of this software will be governed
// by the Apache License, Version 2.0.

use odf::metadata::testing::MetadataFactory;
use odf_dataset_impl::DatasetLayout;
use odf_storage_impl::testing::MetadataFactory;

use crate::harness::{ClientSideHarness, ServerSideHarness};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
// the Business Source License, use of this software will be governed
// by the Apache License, Version 2.0.

use odf::metadata::testing::MetadataFactory;
use odf_dataset_impl::DatasetLayout;
use odf_storage_impl::testing::MetadataFactory;

use crate::harness::{
commit_add_data_event,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
// the Business Source License, use of this software will be governed
// by the Apache License, Version 2.0.

use odf::metadata::testing::MetadataFactory;
use odf_dataset_impl::DatasetLayout;
use odf_storage_impl::testing::MetadataFactory;

use crate::harness::{
commit_add_data_event,
Expand Down
Loading

0 comments on commit 96c8abc

Please sign in to comment.