From cfdcfd87acdc10bedba6230b0cbe7dcf44b4652a Mon Sep 17 00:00:00 2001 From: Anurag Bandyopadhyay Date: Mon, 8 May 2023 13:31:57 +0530 Subject: Add support for cluster myshardid (#2704) * feat: adding support for cluster myshardid * lint fix * fix: comment fix and async test * fix: adding version check * fix lint: * linters --------- Co-authored-by: Anuragkillswitch <70265851+Anuragkillswitch@users.noreply.github.com> Co-authored-by: dvora-h <67596500+dvora-h@users.noreply.github.com> Co-authored-by: dvora-h --- tests/test_cluster.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tests/test_cluster.py') diff --git a/tests/test_cluster.py b/tests/test_cluster.py index 8371cc5..705e753 100644 --- a/tests/test_cluster.py +++ b/tests/test_cluster.py @@ -1162,6 +1162,13 @@ class TestClusterRedisCommands: for attribute in node.keys(): assert attribute in attributes + @skip_if_server_version_lt("7.2.0") + @skip_if_redis_enterprise() + def test_cluster_myshardid(self, r): + myshardid = r.cluster_myshardid() + assert isinstance(myshardid, str) + assert len(myshardid) > 0 + @skip_if_redis_enterprise() def test_cluster_addslots(self, r): node = r.get_random_node() -- cgit v1.2.1