Skip to content

Commit

Permalink
Mark SSL & ACL test's since 7.0
Browse files Browse the repository at this point in the history
In 6.2.16 CLUSTER slots command returns the non-tls port when contacted by tls one.
Tests need to be revisited to make them compatible with 6.2.x
  • Loading branch information
ggivo committed Nov 19, 2024
1 parent 8374218 commit 36dce37
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ public static void prepare() {
}

@Test
@SinceRedisVersion(value = "7.0.0", message = "Redis 6.2.x returns non-tls port in CLUSTER SLOTS command. Enable for 6.2.x after test is fixed.")
public void testSSLDiscoverNodesAutomatically() {
DefaultJedisClientConfig config = DefaultJedisClientConfig.builder()
.user("default")
Expand Down
4 changes: 4 additions & 0 deletions src/test/java/redis/clients/jedis/SSLJedisClusterTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import javax.net.ssl.HostnameVerifier;
import javax.net.ssl.SSLParameters;

import io.redis.test.annotations.SinceRedisVersion;
import io.redis.test.utils.RedisVersion;
import io.redis.test.utils.RedisVersionUtil;
import redis.clients.jedis.util.TlsUtil;
Expand Down Expand Up @@ -46,6 +47,7 @@ public static void prepare() {
}

@Test
@SinceRedisVersion(value = "7.0.0", message = "Redis 6.2.x returns non-tls port in CLUSTER SLOTS command. Enable for 6.2.x after test is fixed.")
public void testSSLDiscoverNodesAutomatically() {
try (JedisCluster jc = new JedisCluster(Collections.singleton(new HostAndPort("localhost", 8379)),
DefaultJedisClientConfig.builder().password("cluster")
Expand Down Expand Up @@ -113,6 +115,7 @@ public void testSSLWithoutPortMap() {
}

@Test
@SinceRedisVersion(value = "7.0.0", message = "Redis 6.2.x returns non-tls port in CLUSTER SLOTS command. Enable for 6.2.x after test is fixed.")
public void connectByIpAddress() {
try (JedisCluster jc = new JedisCluster(new HostAndPort("127.0.0.1", 8379),
DefaultJedisClientConfig.builder()
Expand Down Expand Up @@ -147,6 +150,7 @@ public void connectToNodesFailsWithSSLParametersAndNoHostMapping() {
}

@Test
@SinceRedisVersion(value = "7.0.0", message = "Redis 6.2.x returns non-tls port in CLUSTER SLOTS command. Enable for 6.2.x after test is fixed.")
public void connectToNodesSucceedsWithSSLParametersAndHostMapping() {
final SSLParameters sslParameters = new SSLParameters();
sslParameters.setEndpointIdentificationAlgorithm("HTTPS");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ public void aclUsers() {
}

@Test
@SinceRedisVersion(value = "7.0.0", message = "Redis 6.2.x misses [~]>")
public void aclGetUser() {
// get default user information
AccessControlUser userInfo = jedis.aclGetUser("default");
Expand Down Expand Up @@ -507,6 +508,7 @@ public void aclGenPassBinary() {
}

@Test
@SinceRedisVersion(value = "7.0.0", message = "Redis 6.2.x skips [&]>")
public void aclBinaryCommandsTest() {
jedis.aclSetUser(USER_NAME.getBytes());
assertNotNull(jedis.aclGetUser(USER_NAME));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -533,6 +533,7 @@ public void commandInfo() {
}

@Test // GitHub Issue #4020
@SinceRedisVersion(value = "7.0.0", message = "In Redis 6.2.x ACL flags not empty")
public void commandInfoAcl() {
Map<String, CommandInfo> infos = jedis.commandInfo("ACL");
assertThat(infos, Matchers.aMapWithSize(1));
Expand Down

0 comments on commit 36dce37

Please sign in to comment.