]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
squid: test/rgw/notifications: fix test regression
authorYuval Lifshitz <ylifshit@ibm.com>
Tue, 17 Dec 2024 17:52:23 +0000 (17:52 +0000)
committerYuval Lifshitz <ylifshit@ibm.com>
Tue, 17 Dec 2024 17:52:23 +0000 (17:52 +0000)
from commit: 05e2ade13292e7d924e6385ea234f58c13eb2d51

Signed-off-by: Yuval Lifshitz <ylifshit@ibm.com>
src/test/rgw/bucket_notification/test_bn.py

index 8f93dd5d2f3a5854cbb8eba5f79fd08c0c3fa71c..574a9741ed7778f83525c6cb5e529c044acf465b 100644 (file)
@@ -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)