From 42118ba86b5ff28b325898ebc7d62a44fc2267c9 Mon Sep 17 00:00:00 2001 From: Yuval Lifshitz Date: Tue, 17 Dec 2024 17:52:23 +0000 Subject: [PATCH] squid: test/rgw/notifications: fix test regression from commit: 05e2ade13292e7d924e6385ea234f58c13eb2d51 Signed-off-by: Yuval Lifshitz --- src/test/rgw/bucket_notification/test_bn.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/test/rgw/bucket_notification/test_bn.py b/src/test/rgw/bucket_notification/test_bn.py index 8f93dd5d2f3a5..574a9741ed777 100644 --- a/src/test/rgw/bucket_notification/test_bn.py +++ b/src/test/rgw/bucket_notification/test_bn.py @@ -538,6 +538,17 @@ def another_user(user=None, tenant=None, account=None): return conn, arn +def list_topics(assert_len=None, tenant=''): + if tenant == '': + result = admin(['topic', 'list'], get_config_cluster()) + else: + result = admin(['topic', 'list', '--tenant', tenant], get_config_cluster()) + parsed_result = json.loads(result[0]) + if assert_len: + assert_equal(len(parsed_result['topics']), assert_len) + return parsed_result + + def get_stats_persistent_topic(topic_name, assert_entries_number=None): result = admin(['topic', 'stats', '--topic', topic_name], get_config_cluster()) assert_equal(result[1], 0) -- 2.39.5