diff --git a/pkl-core/src/test/kotlin/org/pkl/core/EvaluatorTest.kt b/pkl-core/src/test/kotlin/org/pkl/core/EvaluatorTest.kt index 6190f3da3..c38cb64cd 100644 --- a/pkl-core/src/test/kotlin/org/pkl/core/EvaluatorTest.kt +++ b/pkl-core/src/test/kotlin/org/pkl/core/EvaluatorTest.kt @@ -22,7 +22,6 @@ import java.nio.file.FileSystems import java.nio.file.Files import java.nio.file.Path import java.util.* -import java.util.concurrent.TimeUnit import java.util.regex.Pattern import kotlin.io.encoding.Base64 import kotlin.io.path.createParentDirectories @@ -31,11 +30,8 @@ import org.assertj.core.api.Assertions.assertThat import org.assertj.core.api.Assertions.assertThatCode import org.junit.jupiter.api.AfterAll import org.junit.jupiter.api.Test -import org.junit.jupiter.api.Timeout import org.junit.jupiter.api.assertDoesNotThrow import org.junit.jupiter.api.assertThrows -import org.junit.jupiter.api.condition.EnabledOnOs -import org.junit.jupiter.api.condition.OS import org.junit.jupiter.api.io.TempDir import org.pkl.commons.createTempFile import org.pkl.commons.test.PackageServer @@ -556,28 +552,6 @@ class EvaluatorTest { } } - @Test - @EnabledOnOs(OS.WINDOWS) - @Timeout(1, unit = TimeUnit.SECONDS) - fun `root dir check happens without any UNC or SMB access`() { - val evaluator = - with(EvaluatorBuilder.preconfigured()) { - rootDir = Path.of("/tmp/test") - build() - } - // this uses a TEST-NET-1 IP which has no server running in order to force a timeout-driven - // failure (takes ~20s) - // root dir check failure should prevent any I/O and fail fast instead of hitting the timeout - val exc = - assertThrows { - evaluator.evaluate(text("result = import(\"file://192.0.2.1/share/nope.pkl\")")) - } - assertThat(exc) - .hasMessageContaining( - "Refusing to load module `file://192.0.2.1/share/nope.pkl` because it is not within the root directory (`--root-dir`)." - ) - } - @Test fun `constraint failures activate instrumentation`() { val evaluator =