Skip to content

Commit

Permalink
fix: integration test
Browse files Browse the repository at this point in the history
  • Loading branch information
killme2008 committed Aug 28, 2024
1 parent 26e2f90 commit 746f30e
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions tests-integration/src/tests/test_util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,10 @@ pub(crate) async fn distributed() -> Arc<dyn MockInstance> {
pub(crate) async fn standalone_with_multiple_object_stores() -> Arc<dyn MockInstance> {
let _ = dotenv::dotenv();
let test_name = uuid::Uuid::new_v4().to_string();
let storage_types = StorageType::build_storage_types_based_on_env();
let mut storage_types = StorageType::build_storage_types_based_on_env();
// File is the default storage, remove it to avoid panic
storage_types.retain(|x| *x != StorageType::File);

let instance = GreptimeDbStandaloneBuilder::new(&test_name)
.with_store_providers(storage_types)
.build()
Expand All @@ -202,10 +205,13 @@ pub(crate) async fn standalone_with_multiple_object_stores() -> Arc<dyn MockInst
pub(crate) async fn distributed_with_multiple_object_stores() -> Arc<dyn MockInstance> {
let _ = dotenv::dotenv();
let test_name = uuid::Uuid::new_v4().to_string();
let providers = StorageType::build_storage_types_based_on_env();
let mut storage_types = StorageType::build_storage_types_based_on_env();
// File is the default storage, remove it to avoid panic
storage_types.retain(|x| *x != StorageType::File);

let cluster = GreptimeDbClusterBuilder::new(&test_name)
.await
.with_store_providers(providers)
.with_store_providers(storage_types)
.build()
.await;
Arc::new(MockDistributedInstance(cluster))
Expand Down

0 comments on commit 746f30e

Please sign in to comment.