diff --git a/redis/cluster.py b/redis/cluster.py index 546472357d..b594d3084a 100644 --- a/redis/cluster.py +++ b/redis/cluster.py @@ -118,6 +118,7 @@ def fix_server(*args): "ssl_certfile", "ssl_cert_reqs", "ssl_keyfile", + "ssl_password", "unix_socket_path", "username", ) @@ -241,8 +242,6 @@ class RedisCluster(RedisClusterCommands): "SHUTDOWN", "KEYS", "SCAN", - "FLUSHALL", - "FLUSHDB", "DBSIZE", "BGSAVE", "SLOWLOG GET", @@ -286,6 +285,13 @@ class RedisCluster(RedisClusterCommands): ], DEFAULT_NODE, ), + list_keys_to_dict( + [ + "FLUSHALL", + "FLUSHDB", + ], + PRIMARIES, + ), list_keys_to_dict( [ "CLUSTER COUNTKEYSINSLOT", diff --git a/tests/test_cluster.py b/tests/test_cluster.py index 90f52d4899..ab98ed515d 100644 --- a/tests/test_cluster.py +++ b/tests/test_cluster.py @@ -2640,3 +2640,10 @@ def test_command_with_escaped_data(self, r): r.get(byte_string) response = wait_for_command(r, m, "GET {foo}bar\\\\x92", key=key) assert response["command"] == "GET {foo}bar\\\\x92" + + def test_flush(self, r): + r.set("x", "1") + r.set("z", "1") + r.flushall() + assert r.get("x") is None + assert r.get("y") is None