summaryrefslogtreecommitdiff
path: root/tests/test_cluster.py
diff options
context:
space:
mode:
authorMeir Shpilraien (Spielrein) <meir@redis.com>2022-02-07 09:46:45 +0200
committerGitHub <noreply@github.com>2022-02-07 09:46:45 +0200
commit045d5ed15305ccc44a0330e6f65f669998815598 (patch)
treeee779b6c2d8f2e4120062967f1a8dfe512d39a09 /tests/test_cluster.py
parentb1ffbc91b2c0ee305dd9fd9ebe01654a7ec18e8b (diff)
downloadredis-py-045d5ed15305ccc44a0330e6f65f669998815598.tar.gz
Fix flushdb and flushall (#1926)
* Fix flushdb and flushall Both commands should be broadcasted to all the shards. * Support ssl_password on cluster * linter fix * change commands to run only on primary nodes Co-authored-by: Chayim I. Kirshen <c@kirshen.com> Co-authored-by: dvora-h <dvora.heller@redis.com>
Diffstat (limited to 'tests/test_cluster.py')
-rw-r--r--tests/test_cluster.py7
1 files changed, 7 insertions, 0 deletions
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