mirror of
https://github.com/n08i40k/schedule-parser-rusted.git
synced 2025-12-06 09:47:50 +03:00
feat(env): add ability to set custom .env file for testing on local machine
This commit is contained in:
@@ -9,7 +9,9 @@ pub(crate) mod tests {
|
||||
|
||||
pub fn test_env() {
|
||||
info!("Loading test environment file...");
|
||||
dotenvy::from_path(".env.test").expect("Failed to load test environment file");
|
||||
dotenvy::from_filename(".env.test.local")
|
||||
.or_else(|_| dotenvy::from_filename(".env.test"))
|
||||
.expect("Failed to load test environment file");
|
||||
}
|
||||
|
||||
pub async fn test_app_state() -> web::Data<AppState> {
|
||||
|
||||
Reference in New Issue
Block a user