Skip to content

Commit

Permalink
- code review changes
Browse files Browse the repository at this point in the history
  • Loading branch information
nshyrei committed Jan 27, 2025
1 parent 8b9cbf3 commit 4a070f3
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions vsock-proxy/parent/src/parent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -824,4 +824,15 @@ mod tests {
// Ensure the key was not removed
assert!(runtime_env_vars.get("RUNTIME_VAR").is_some());
}

#[test]
fn test_runtime_key_removed_when_values_are_the_same() {
let mut runtime_env_vars = HashMap::new();
runtime_env_vars.insert("MY_VAR".to_string(), "value".to_string());

filter_parent_env_from_runtime_envs(&mut runtime_env_vars, ("MY_VAR", "value"));

// Ensure the key was removed
assert!(runtime_env_vars.get("MY_VAR").is_none());
}
}

0 comments on commit 4a070f3

Please sign in to comment.