From 02e2859da37317e783d81ca44b7f527ce5317816 Mon Sep 17 00:00:00 2001 From: jruaux Date: Wed, 23 Oct 2024 12:24:33 -0700 Subject: [PATCH] test: Using fixed tags for stack and enterprise Redis containers --- .../com/redis/riot/RedisContainerFactory.java | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/plugins/riot/src/test/java/com/redis/riot/RedisContainerFactory.java b/plugins/riot/src/test/java/com/redis/riot/RedisContainerFactory.java index 35527430a..2c1a3152f 100644 --- a/plugins/riot/src/test/java/com/redis/riot/RedisContainerFactory.java +++ b/plugins/riot/src/test/java/com/redis/riot/RedisContainerFactory.java @@ -6,24 +6,23 @@ import com.redis.enterprise.testcontainers.RedisEnterpriseServer; import com.redis.testcontainers.RedisStackContainer; -public class RedisContainerFactory { +public interface RedisContainerFactory { - private RedisContainerFactory() { - } + String ENTERPRISE_TAG = "7.4.6-102"; + String STACK_TAG = "7.2.0-v13"; - public static RedisStackContainer stack() { - return new RedisStackContainer(RedisStackContainer.DEFAULT_IMAGE_NAME.withTag("7.2.0-v11")); + static RedisStackContainer stack() { + return new RedisStackContainer(RedisStackContainer.DEFAULT_IMAGE_NAME.withTag(STACK_TAG)); } @SuppressWarnings("resource") - public static RedisEnterpriseContainer enterprise() { - return new RedisEnterpriseContainer( - RedisEnterpriseContainer.DEFAULT_IMAGE_NAME.withTag(RedisEnterpriseContainer.DEFAULT_TAG)) + static RedisEnterpriseContainer enterprise() { + return new RedisEnterpriseContainer(RedisEnterpriseContainer.DEFAULT_IMAGE_NAME.withTag(ENTERPRISE_TAG)) .withDatabase(Database.builder().name("BatchTests").memoryMB(50).ossCluster(true) .modules(RedisModule.TIMESERIES, RedisModule.JSON, RedisModule.SEARCH).build()); } - public static RedisEnterpriseServer enterpriseServer() { + static RedisEnterpriseServer enterpriseServer() { RedisEnterpriseServer server = new RedisEnterpriseServer(); server.withDatabase(Database.builder().shardCount(2).port(12001).ossCluster(true) .modules(RedisModule.JSON, RedisModule.SEARCH, RedisModule.TIMESERIES).build());