From 48e4d7709961f7e1ca94dea86ff3b57c4b9710ec Mon Sep 17 00:00:00 2001 From: Itamar Haber Date: Sun, 24 Oct 2021 12:32:53 +0300 Subject: [PATCH] Fixes `CLUSTER COUNTKEYSINSLOT` (#9672) Introduced via typo in #9504. Also adds a sanity test for coverage. --- src/server.c | 2 +- tests/cluster/tests/00-base.tcl | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/server.c b/src/server.c index 53303fc36..a064b8032 100644 --- a/src/server.c +++ b/src/server.c @@ -561,7 +561,7 @@ struct redisCommand clusterSubcommands[] = { {"count-failure-reports",clusterCommand,3, "admin ok-stale random"}, - {"countkeysinslots",clusterCommand,3, + {"countkeysinslot",clusterCommand,3, "ok-stale random"}, {"delslots",clusterCommand,-3, diff --git a/tests/cluster/tests/00-base.tcl b/tests/cluster/tests/00-base.tcl index 280befb9d..e731bf6a3 100644 --- a/tests/cluster/tests/00-base.tcl +++ b/tests/cluster/tests/00-base.tcl @@ -54,6 +54,11 @@ test "Nodes should report cluster_state is ok now" { assert_cluster_state ok } +test "Sanity for CLUSTER COUNTKEYSINSLOT" { + set reply [R 0 CLUSTER COUNTKEYSINSLOT 0] + assert {$reply eq 0} +} + test "It is possible to write and read from the cluster" { cluster_write_test 0 }