diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2024-01-08 18:51:49 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-08 18:51:49 -0500 |
commit | 0efb17b2cbd326abec1a053fb0eb81ce5c881eea (patch) | |
tree | 9016a4a58ee856ad7290802495d8e7cea7814a88 /test_util/src | |
parent | ea5c9a338325de338b8741989627983f4b00f21f (diff) |
fix(unstable/tar): skip node_modules, .git, and config "exclude" (#21816)
Diffstat (limited to 'test_util/src')
-rw-r--r-- | test_util/src/builders.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test_util/src/builders.rs b/test_util/src/builders.rs index 7957b946c..8d04dae48 100644 --- a/test_util/src/builders.rs +++ b/test_util/src/builders.rs @@ -130,6 +130,19 @@ impl TestContextBuilder { self } + pub fn envs<I, K, V>(self, vars: I) -> Self + where + I: IntoIterator<Item = (K, V)>, + K: AsRef<str>, + V: AsRef<str>, + { + let mut this = self; + for (key, value) in vars { + this = this.env(key, value); + } + this + } + pub fn env(mut self, key: impl AsRef<str>, value: impl AsRef<str>) -> Self { self .envs |