Skip to content
This repository has been archived by the owner on Aug 25, 2024. It is now read-only.

Commit

Permalink
test: add test for using CONFIG_ENV_PREFIX
Browse files Browse the repository at this point in the history
  • Loading branch information
hseeberger committed Nov 5, 2023
1 parent 2771f48 commit 6f12d65
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,10 @@ mod tests {

#[test]
fn test_load() -> Result<(), Error> {
env::set_var(CONFIG_DIR, "test-config");
env::set_var(CONFIG_OVERLAYS, "feat, dev");
env::set_var("APP__QUX__CORGE_GRAULT", "corge-grault-env");
env::set_var("CONFIG_DIR", "test-config");
env::set_var("CONFIG_OVERLAYS", "feat, dev");
env::set_var("CONFIG_ENV_PREFIX", "FOO");
env::set_var("FOO__QUX__CORGE_GRAULT", "corge-grault-env");

let config = Config::load()?;

Expand Down

0 comments on commit 6f12d65

Please sign in to comment.