Skip to content

Commit

Permalink
Fix non-deterministic tests
Browse files Browse the repository at this point in the history
  • Loading branch information
translatenix committed Feb 26, 2024
1 parent 5fc9a56 commit e210fe9
Showing 1 changed file with 17 additions and 7 deletions.
24 changes: 17 additions & 7 deletions pkl-cli/src/test/kotlin/org/pkl/cli/CliProjectResolverTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class CliProjectResolverTest {
fun `missing PklProject when inferring a project dir`(@TempDir tempDir: Path) {
val packager =
CliProjectResolver(
CliBaseOptions(workingDir = tempDir),
CliBaseOptions(workingDir = tempDir, noCache = true),
emptyList(),
consoleWriter = StringWriter(),
errWriter = StringWriter()
Expand All @@ -55,7 +55,7 @@ class CliProjectResolverTest {
fun `missing PklProject when explicit dir is provided`(@TempDir tempDir: Path) {
val packager =
CliProjectResolver(
CliBaseOptions(),
CliBaseOptions(noCache = true),
listOf(tempDir),
consoleWriter = StringWriter(),
errWriter = StringWriter()
Expand All @@ -82,7 +82,9 @@ class CliProjectResolverTest {
CliProjectResolver(
CliBaseOptions(
workingDir = tempDir,
caCertificates = listOf(FileTestUtils.selfSignedCertificate)
caCertificates = listOf(FileTestUtils.selfSignedCertificate),
testPort = packageServer.port,
noCache = true
),
listOf(tempDir),
consoleWriter = StringWriter(),
Expand Down Expand Up @@ -135,7 +137,9 @@ class CliProjectResolverTest {
CliProjectResolver(
CliBaseOptions(
workingDir = tempDir,
caCertificates = listOf(FileTestUtils.selfSignedCertificate)
caCertificates = listOf(FileTestUtils.selfSignedCertificate),
testPort = packageServer.port,
noCache = true
),
emptyList(),
consoleWriter = StringWriter(),
Expand Down Expand Up @@ -232,7 +236,8 @@ class CliProjectResolverTest {
CliProjectResolver(
CliBaseOptions(
caCertificates = listOf(FileTestUtils.selfSignedCertificate),
testPort = packageServer.port
testPort = packageServer.port,
noCache = true
),
listOf(projectDir),
consoleWriter = StringWriter(),
Expand Down Expand Up @@ -311,7 +316,11 @@ class CliProjectResolverTest {
val consoleOut = StringWriter()
val errOut = StringWriter()
CliProjectResolver(
CliBaseOptions(caCertificates = listOf(FileTestUtils.selfSignedCertificate)),
CliBaseOptions(
caCertificates = listOf(FileTestUtils.selfSignedCertificate),
testPort = packageServer.port,
noCache = true
),
listOf(projectDir),
consoleWriter = consoleOut,
errWriter = errOut
Expand Down Expand Up @@ -384,7 +393,8 @@ class CliProjectResolverTest {
CliProjectResolver(
CliBaseOptions(
caCertificates = listOf(FileTestUtils.selfSignedCertificate),
testPort = packageServer.port
testPort = packageServer.port,
noCache = true
),
listOf(tempDir.resolve("project1"), tempDir.resolve("project2")),
consoleWriter = consoleOut,
Expand Down

0 comments on commit e210fe9

Please sign in to comment.