Skip to content

Commit d2ba8e4

Browse files
committed
test(common-utils): Test EnvironmentVariableFilter with empty deny list
Signed-off-by: Sebastian Schuberth <[email protected]>
1 parent 0753d33 commit d2ba8e4

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

utils/common/src/test/kotlin/EnvironmentVariableFilterTest.kt

+14
Original file line numberDiff line numberDiff line change
@@ -80,4 +80,18 @@ class EnvironmentVariableFilterTest : StringSpec({
8080

8181
environment should containExactly(filteredEnvironment)
8282
}
83+
84+
"An empty deny list should not deny anything" {
85+
EnvironmentVariableFilter.reset(denySubstrings = emptyList())
86+
87+
EnvironmentVariableFilter.DEFAULT_DENY_SUBSTRINGS.forAll {
88+
EnvironmentVariableFilter.isAllowed(it) shouldBe true
89+
}
90+
91+
EnvironmentVariableFilter.DEFAULT_ALLOW_NAMES.forAll {
92+
EnvironmentVariableFilter.isAllowed(it) shouldBe true
93+
}
94+
95+
EnvironmentVariableFilter.isAllowed("PATH") shouldBe true
96+
}
8397
})

0 commit comments

Comments
 (0)