@@ -26,22 +26,23 @@ public class RedisContainerIntegrationTests {
2626
2727 private static final String REDIS_STACK_CLUSTER = "clustered-stack" ;
2828
29- private static final String REDIS_STACK_VERSION = System .getProperty ("REDIS_STACK_VERSION" , "8.0-M04-pre" ); ;
29+ private static final String REDIS_STACK_VERSION = System .getProperty ("REDIS_STACK_VERSION" ) ;
3030
3131 private static Exception initializationException ;
3232
3333 public static ComposeContainer CLUSTERED_STACK = new ComposeContainer (
3434 new File ("src/test/resources/docker/docker-compose.yml" )).withExposedService (REDIS_STACK_CLUSTER , 36379 )
3535 .withExposedService (REDIS_STACK_CLUSTER , 36380 ).withExposedService (REDIS_STACK_CLUSTER , 36381 )
36- .withExposedService (REDIS_STACK_STANDALONE , 6379 )
37- .withEnv ("CLIENT_LIBS_TEST_IMAGE" , "redislabs/client-libs-test" )
38- .withEnv ("REDIS_STACK_VERSION" , REDIS_STACK_VERSION ).withPull (false ).withLocalCompose (true );
36+ .withExposedService (REDIS_STACK_STANDALONE , 6379 ).withPull (false ).withLocalCompose (true );
3937
4038 // Singleton container pattern - start the containers only once
4139 // See https://java.testcontainers.org/test_framework_integration/manual_lifecycle_control/#singleton-containers
4240 static {
4341 int attempts = 0 ;
4442
43+ if (REDIS_STACK_VERSION != null && !REDIS_STACK_VERSION .isEmpty ()) {
44+ CLUSTERED_STACK .withEnv ("REDIS_VERSION" , REDIS_STACK_VERSION );
45+ }
4546 // In case you need to debug the container uncomment these lines to redirect the output
4647 CLUSTERED_STACK .withLogConsumer (REDIS_STACK_CLUSTER , (OutputFrame frame ) -> LOGGER .debug (frame .getUtf8String ()));
4748 CLUSTERED_STACK .withLogConsumer (REDIS_STACK_STANDALONE , (OutputFrame frame ) -> LOGGER .debug (frame .getUtf8String ()));
0 commit comments