Skip to content

Commit

Permalink
test: Using fixed tags for stack and enterprise Redis containers
Browse files Browse the repository at this point in the history
  • Loading branch information
jruaux committed Oct 23, 2024
1 parent fc30f3f commit 02e2859
Showing 1 changed file with 8 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down

0 comments on commit 02e2859

Please sign in to comment.