Skip to content

Commit b887f3b

Browse files
committed
💚 Fix pipeline on Windows
1 parent 64e4bc9 commit b887f3b

File tree

3 files changed

+39
-3
lines changed

3 files changed

+39
-3
lines changed

src/test/kotlin/io/github/tobi/laa/spring/boot/embedded/redis/cluster/ExecutionDirTest.kt

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,30 @@ package io.github.tobi.laa.spring.boot.embedded.redis.cluster
22

33
import io.github.tobi.laa.spring.boot.embedded.redis.IntegrationTest
44
import io.github.tobi.laa.spring.boot.embedded.redis.RedisTests
5+
import org.junit.jupiter.api.BeforeAll
56
import org.junit.jupiter.api.DisplayName
67
import org.junit.jupiter.api.Test
78
import org.springframework.beans.factory.annotation.Autowired
9+
import java.io.File
10+
11+
private const val CUSTOM_EXECUTION_DIR = "build/custom-execution-dir-cluster"
812

913
@IntegrationTest
10-
@EmbeddedRedisCluster(executeInDirectory = "build")
14+
@EmbeddedRedisCluster(executeInDirectory = CUSTOM_EXECUTION_DIR)
1115
@DisplayName("Using @EmbeddedRedisCluster with custom execution dir")
1216
internal class ExecutionDirTest {
1317

1418
@Autowired
1519
private lateinit var given: RedisTests
1620

21+
companion object {
22+
@BeforeAll
23+
@JvmStatic
24+
fun beforeAll() {
25+
File(CUSTOM_EXECUTION_DIR).mkdirs()
26+
}
27+
}
28+
1729
@Test
1830
@DisplayName("It should be possible to write to Redis and the data should be available afterwards")
1931
fun givenRandomTestdata_writingToRedis_dataShouldBeAvailable() {

src/test/kotlin/io/github/tobi/laa/spring/boot/embedded/redis/highavailability/ExecutionDirTest.kt

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,30 @@ package io.github.tobi.laa.spring.boot.embedded.redis.highavailability
22

33
import io.github.tobi.laa.spring.boot.embedded.redis.IntegrationTest
44
import io.github.tobi.laa.spring.boot.embedded.redis.RedisTests
5+
import org.junit.jupiter.api.BeforeAll
56
import org.junit.jupiter.api.DisplayName
67
import org.junit.jupiter.api.Test
78
import org.springframework.beans.factory.annotation.Autowired
9+
import java.io.File
10+
11+
private const val CUSTOM_EXECUTION_DIR = "build/custom-execution-dir-high-availability"
812

913
@IntegrationTest
10-
@EmbeddedRedisHighAvailability(executeInDirectory = "build")
14+
@EmbeddedRedisHighAvailability(executeInDirectory = CUSTOM_EXECUTION_DIR)
1115
@DisplayName("Using @EmbeddedRedisHighAvailability with custom execution dir")
1216
internal class ExecutionDirTest {
1317

1418
@Autowired
1519
private lateinit var given: RedisTests
1620

21+
companion object {
22+
@BeforeAll
23+
@JvmStatic
24+
fun beforeAll() {
25+
File(CUSTOM_EXECUTION_DIR).mkdirs()
26+
}
27+
}
28+
1729
@Test
1830
@DisplayName("It should be possible to write to Redis and the data should be available afterwards")
1931
fun givenRandomTestdata_writingToRedis_dataShouldBeAvailable() {

src/test/kotlin/io/github/tobi/laa/spring/boot/embedded/redis/standalone/ExecutionDirTest.kt

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,30 @@ package io.github.tobi.laa.spring.boot.embedded.redis.standalone
22

33
import io.github.tobi.laa.spring.boot.embedded.redis.IntegrationTest
44
import io.github.tobi.laa.spring.boot.embedded.redis.RedisTests
5+
import org.junit.jupiter.api.BeforeAll
56
import org.junit.jupiter.api.DisplayName
67
import org.junit.jupiter.api.Test
78
import org.springframework.beans.factory.annotation.Autowired
9+
import java.io.File
10+
11+
private const val CUSTOM_EXECUTION_DIR = "build/custom-execution-dir-standalone"
812

913
@IntegrationTest
10-
@EmbeddedRedisStandalone(executeInDirectory = "build")
14+
@EmbeddedRedisStandalone(executeInDirectory = CUSTOM_EXECUTION_DIR)
1115
@DisplayName("Using @EmbeddedRedisStandalone with custom execution dir")
1216
internal class ExecutionDirTest {
1317

1418
@Autowired
1519
private lateinit var given: RedisTests
1620

21+
companion object {
22+
@BeforeAll
23+
@JvmStatic
24+
fun beforeAll() {
25+
File(CUSTOM_EXECUTION_DIR).mkdirs()
26+
}
27+
}
28+
1729
@Test
1830
@DisplayName("It should be possible to write to Redis and the data should be available afterwards")
1931
fun givenRandomTestdata_writingToRedis_dataShouldBeAvailable() {

0 commit comments

Comments
 (0)