Skip to content

Commit

Permalink
Improve environment variable test
Browse files Browse the repository at this point in the history
  • Loading branch information
cd-work committed Nov 29, 2023
1 parent ed000c7 commit 02b1d44
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions integration/env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ pub fn setup() -> TestSetup {
}

pub fn validate(_data: String) {
// The `PUBLIC` environment variable can be accessed.
assert_eq!(env::var("PUBLIC"), Ok("GOOD".into()));

// The `PRIVATE` environment variable was removed.
assert_eq!(env::var_os("PRIVATE"), None);
// Only the `PUBLIC` environment variable remains.
let env: Vec<_> = env::vars().collect();
assert_eq!(env, vec![("PUBLIC".into(), "GOOD".into())]);
}

0 comments on commit 02b1d44

Please sign in to comment.