Skip to content

Commit 2e70267

Browse files
committed
Fix cluster configuration
1 parent 0eb4589 commit 2e70267

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

docker-compose.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,14 @@ services:
4242
environment:
4343
- REDIS_CLUSTER=yes
4444
- NODES=6
45+
- REPLICAS=1
4546
- TLS_ENABLED=yes
4647
- PORT=16379
47-
- TLS_PORT=17379
48-
command: --tls-auth-clients optional
48+
- TLS_PORT=27379
49+
command: --enable-debug-command yes --tls-auth-clients optional
4950
ports:
5051
- "16379-16384:16379-16384"
51-
- "17379-17384:17379-17384"
52+
- "27379-27384:27379-27384"
5253
volumes:
5354
- "./dockers/cluster:/redis/work"
5455
profiles:

tests/test_asyncio/test_cluster.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -493,8 +493,8 @@ async def test_execute_command_node_flag_replicas(self, r: RedisCluster) -> None
493493
Test command execution with nodes flag REPLICAS
494494
"""
495495
replicas = r.get_replicas()
496-
if not replicas:
497-
r = await get_mocked_redis_client(default_host, default_port)
496+
assert len(replicas) != 0, "This test requires Cluster with 1 replica"
497+
498498
primaries = r.get_primaries()
499499
mock_all_nodes_resp(r, "PONG")
500500
assert await r.ping(target_nodes=RedisCluster.REPLICAS) is True

0 commit comments

Comments
 (0)