From: Yuval Lifshitz Date: Tue, 17 Dec 2024 17:52:23 +0000 (+0000) Subject: squid: test/rgw/notifications: fix test regression X-Git-Tag: v19.2.1~11^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F61119%2Fhead;p=ceph.git squid: test/rgw/notifications: fix test regression from commit: 05e2ade13292e7d924e6385ea234f58c13eb2d51 Signed-off-by: Yuval Lifshitz --- diff --git a/src/test/rgw/bucket_notification/test_bn.py b/src/test/rgw/bucket_notification/test_bn.py index 8f93dd5d2f3a..574a9741ed77 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)