diff options
-rw-r--r-- | redis/cluster.py | 10 | ||||
-rw-r--r-- | tests/test_cluster.py | 7 |
2 files changed, 15 insertions, 2 deletions
diff --git a/redis/cluster.py b/redis/cluster.py index 5464723..b594d30 100644 --- a/redis/cluster.py +++ b/redis/cluster.py @@ -118,6 +118,7 @@ REDIS_ALLOWED_KEYS = ( "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", @@ -288,6 +287,13 @@ class RedisCluster(RedisClusterCommands): ), list_keys_to_dict( [ + "FLUSHALL", + "FLUSHDB", + ], + PRIMARIES, + ), + list_keys_to_dict( + [ "CLUSTER COUNTKEYSINSLOT", "CLUSTER DELSLOTS", "CLUSTER GETKEYSINSLOT", diff --git a/tests/test_cluster.py b/tests/test_cluster.py index 90f52d4..ab98ed5 100644 --- a/tests/test_cluster.py +++ b/tests/test_cluster.py @@ -2640,3 +2640,10 @@ class TestClusterMonitor: 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 |