1
0
Fork 0

Merging upstream version 1.12.0.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-09 17:09:15 +01:00
parent d6445459ac
commit 7865f9a813
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
20 changed files with 536 additions and 80 deletions

View file

@ -31,6 +31,20 @@ def test_client_list(judge_command):
{"command": "client list", "type_const": "TYPE", "conntype": "REPLICA"},
)
judge_command(
"client list TYPE REPLICA id 1 2 3",
{
"command": "client list",
"type_const": "TYPE",
"conntype": "REPLICA",
"clientids": "1 2 3",
},
)
judge_command(
"client list ID 1 2 3",
{"command": "client list", "clientids": "1 2 3"},
)
def test_configset(judge_command):
judge_command(
@ -71,6 +85,18 @@ def test_client_kill(judge_command):
"CLIENT KILL 127.0.0.1:12345 ",
{"command": "CLIENT KILL", "ip_port": "127.0.0.1:12345"},
)
judge_command(
"CLIENT KILL ADDR 127.0.0.1:12345 ",
{"command": "CLIENT KILL", "ip_port": "127.0.0.1:12345", "addr": "ADDR"},
)
judge_command(
"CLIENT KILL LADDR 127.0.0.1:12345 ",
{"command": "CLIENT KILL", "ip_port": "127.0.0.1:12345", "laddr": "LADDR"},
)
judge_command(
"CLIENT KILL USER myuser",
{"command": "CLIENT KILL", "const_user": "USER", "username": "myuser"},
)
judge_command(
"CLIENT KILL id 123455 type pubsub skipme no",
{
@ -199,3 +225,48 @@ def test_acl_setuser(judge_command):
def test_acl_getuser(judge_command):
judge_command("acl getuser alan", {"command": "acl getuser", "username": "alan"})
judge_command("acl getuser", None)
def test_failover(judge_command):
judge_command(
"failover to 10.0.0.5 7379 abort timeout 101",
{
"command": "failover",
"to_const": "to",
"host": "10.0.0.5",
"port": "7379",
"abort_const": "abort",
"timeout_const": "timeout",
"millisecond": "101",
},
)
judge_command(
"failover abort timeout 101",
{
"command": "failover",
"abort_const": "abort",
"timeout_const": "timeout",
"millisecond": "101",
},
)
judge_command(
"failover timeout 101",
{
"command": "failover",
"timeout_const": "timeout",
"millisecond": "101",
},
)
judge_command(
"failover to 10.0.0.5 7379 force abort timeout 101",
{
"command": "failover",
"to_const": "to",
"force": "force",
"host": "10.0.0.5",
"port": "7379",
"abort_const": "abort",
"timeout_const": "timeout",
"millisecond": "101",
},
)