File tree Expand file tree Collapse file tree 3 files changed +39
-3
lines changed
src/test/kotlin/io/github/tobi/laa/spring/boot/embedded/redis Expand file tree Collapse file tree 3 files changed +39
-3
lines changed Original file line number Diff line number Diff line change @@ -2,18 +2,30 @@ package io.github.tobi.laa.spring.boot.embedded.redis.cluster
22
33import io.github.tobi.laa.spring.boot.embedded.redis.IntegrationTest
44import io.github.tobi.laa.spring.boot.embedded.redis.RedisTests
5+ import org.junit.jupiter.api.BeforeAll
56import org.junit.jupiter.api.DisplayName
67import org.junit.jupiter.api.Test
78import 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" )
1216internal 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 () {
Original file line number Diff line number Diff line change @@ -2,18 +2,30 @@ package io.github.tobi.laa.spring.boot.embedded.redis.highavailability
22
33import io.github.tobi.laa.spring.boot.embedded.redis.IntegrationTest
44import io.github.tobi.laa.spring.boot.embedded.redis.RedisTests
5+ import org.junit.jupiter.api.BeforeAll
56import org.junit.jupiter.api.DisplayName
67import org.junit.jupiter.api.Test
78import 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" )
1216internal 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 () {
Original file line number Diff line number Diff line change @@ -2,18 +2,30 @@ package io.github.tobi.laa.spring.boot.embedded.redis.standalone
22
33import io.github.tobi.laa.spring.boot.embedded.redis.IntegrationTest
44import io.github.tobi.laa.spring.boot.embedded.redis.RedisTests
5+ import org.junit.jupiter.api.BeforeAll
56import org.junit.jupiter.api.DisplayName
67import org.junit.jupiter.api.Test
78import 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" )
1216internal 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 () {
You can’t perform that action at this time.
0 commit comments