Skip to content

Commit

Permalink
Based on RedisContainerIntegrationTests
Browse files Browse the repository at this point in the history
  • Loading branch information
sazzad16 committed Jan 29, 2025
1 parent 1259913 commit 83903a8
Showing 1 changed file with 19 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,10 @@
*/
package io.lettuce.core.commands;

import io.lettuce.core.AclCategory;
import io.lettuce.core.AclSetuserArgs;
import io.lettuce.core.TestSupport;
import io.lettuce.core.*;
import io.lettuce.core.api.sync.RedisCommands;
import io.lettuce.test.LettuceExtension;
import io.lettuce.test.condition.EnabledOnCommand;

import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.TestInstance;
import org.junit.jupiter.api.extension.ExtendWith;

import javax.inject.Inject;
import org.junit.jupiter.api.*;

import java.util.Arrays;

Expand All @@ -45,16 +35,25 @@
* @author M Sazzadul Hoque
*/
@Tag(INTEGRATION_TEST)
@ExtendWith(LettuceExtension.class)
@TestInstance(TestInstance.Lifecycle.PER_CLASS)
@EnabledOnCommand("ACL")
public class ConsolidatedAclCommandIntegrationTests extends TestSupport {
public class ConsolidatedAclCommandIntegrationTests extends RedisContainerIntegrationTests {

private static RedisClient client;

private static RedisCommands<String, String> redis;

private final RedisCommands<String, String> redis;
@BeforeAll
public static void setup() {
RedisURI redisURI = RedisURI.Builder.redis("127.0.0.1").withPort(16379).build();

client = RedisClient.create(redisURI);
redis = client.connect().sync();
}

@Inject
protected ConsolidatedAclCommandIntegrationTests(RedisCommands<String, String> redis) {
this.redis = redis;
@AfterAll
static void teardown() {
if (client != null) {
client.shutdown();
}
}

@BeforeEach
Expand Down

0 comments on commit 83903a8

Please sign in to comment.