-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create proper config for integration tests
- Loading branch information
Showing
4 changed files
with
26 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
pub(crate) struct WeekNumber(u8); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
const CONFIG: &[(&str, &str)] = &[ | ||
("COMPANY_ID", "company123"), | ||
("AUTHENTICATION__SSO__LOGIN_URL", "https://some.website.com"), | ||
( | ||
"AUTHENTICATION__SSO__COOKIE_PATH", | ||
"tests/integration/helpers/integration_test_maconomy_cookie", | ||
), | ||
// `MACONOMY_URL` is set by the tests (from mock URL) | ||
]; | ||
|
||
pub(crate) fn create_test_config() { | ||
for (key, value) in CONFIG { | ||
std::env::set_var(format!("MACONOMY__{key}"), value); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
mod cli; | ||
mod helpers { | ||
pub(crate) mod config; | ||
pub(crate) mod maconomy_mock; | ||
pub(crate) mod mock_data; | ||
} |