fix: load .env file in integration tests and examples
Add dotenvy to dev-dependencies and call dotenvy::dotenv().ok() in the integration test common module and all examples so env vars can be loaded from a .env file.
This commit is contained in:
@@ -2,6 +2,7 @@ use onspring::{OnspringClient, PagingRequest};
|
||||
|
||||
#[tokio::main]
|
||||
async fn main() -> onspring::Result<()> {
|
||||
dotenvy::dotenv().ok();
|
||||
let base_url = std::env::var("API_BASE_URL").expect("API_BASE_URL is required");
|
||||
let api_key = std::env::var("SANDBOX_API_KEY").expect("SANDBOX_API_KEY is required");
|
||||
let app_id: i32 = std::env::var("TEST_SURVEY_ID")
|
||||
|
||||
Reference in New Issue
Block a user