From d890c8b93e285b73fc199b537737c12816e3c360 Mon Sep 17 00:00:00 2001 From: Zack Fu Zi Xiang Date: Fri, 26 Jul 2024 21:27:19 +0800 Subject: [PATCH] chore: test use dotenvy --- frontend/rust-lib/event-integration-test/tests/util.rs | 6 +++--- frontend/rust-lib/flowy-server/tests/af_cloud_test/util.rs | 2 +- frontend/rust-lib/flowy-server/tests/supabase_test/util.rs | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/frontend/rust-lib/event-integration-test/tests/util.rs b/frontend/rust-lib/event-integration-test/tests/util.rs index ad1a01bcff..0a5b7b92b1 100644 --- a/frontend/rust-lib/event-integration-test/tests/util.rs +++ b/frontend/rust-lib/event-integration-test/tests/util.rs @@ -34,7 +34,7 @@ use flowy_user_pub::cloud::UserCloudService; use flowy_user_pub::entities::Authenticator; pub fn get_supabase_config() -> Option { - dotenv::from_path(".env.ci").ok()?; + dotenvy::from_path(".env.ci").ok()?; SupabaseConfiguration::from_env().ok() } @@ -80,13 +80,13 @@ pub async fn receive_with_timeout(mut receiver: Receiver, duration: Durati } pub fn get_supabase_ci_config() -> Option { - dotenv::from_filename("./.env.ci").ok()?; + dotenvy::from_filename("./.env.ci").ok()?; SupabaseConfiguration::from_env().ok() } #[allow(dead_code)] pub fn get_supabase_dev_config() -> Option { - dotenv::from_filename("./.env.dev").ok()?; + dotenvy::from_filename("./.env.dev").ok()?; SupabaseConfiguration::from_env().ok() } diff --git a/frontend/rust-lib/flowy-server/tests/af_cloud_test/util.rs b/frontend/rust-lib/flowy-server/tests/af_cloud_test/util.rs index 71dacfab04..1a8eb5b709 100644 --- a/frontend/rust-lib/flowy-server/tests/af_cloud_test/util.rs +++ b/frontend/rust-lib/flowy-server/tests/af_cloud_test/util.rs @@ -22,7 +22,7 @@ use crate::setup_log; /// - `GOTRUE_ADMIN_EMAIL=admin@example.com` /// - `GOTRUE_ADMIN_PASSWORD=password` pub fn get_af_cloud_config() -> Option { - dotenv::from_filename("./.env.ci").ok()?; + dotenvy::from_filename("./.env.ci").ok()?; setup_log(); AFCloudConfiguration::from_env().ok() } diff --git a/frontend/rust-lib/flowy-server/tests/supabase_test/util.rs b/frontend/rust-lib/flowy-server/tests/supabase_test/util.rs index 7fba91fe9a..78803a0256 100644 --- a/frontend/rust-lib/flowy-server/tests/supabase_test/util.rs +++ b/frontend/rust-lib/flowy-server/tests/supabase_test/util.rs @@ -23,14 +23,14 @@ use lib_infra::future::FutureResult; use crate::setup_log; pub fn get_supabase_ci_config() -> Option { - dotenv::from_filename("./.env.ci").ok()?; + dotenvy::from_filename("./.env.ci").ok()?; setup_log(); SupabaseConfiguration::from_env().ok() } #[allow(dead_code)] pub fn get_supabase_dev_config() -> Option { - dotenv::from_filename("./.env.dev").ok()?; + dotenvy::from_filename("./.env.dev").ok()?; setup_log(); SupabaseConfiguration::from_env().ok() }