]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test/rgw/notification: replace calls to get_ip_http with get_ip 60545/head
authorYuval Lifshitz <ylifshit@ibm.com>
Tue, 29 Oct 2024 17:09:37 +0000 (17:09 +0000)
committerYuval Lifshitz <ylifshit@ibm.com>
Wed, 30 Oct 2024 12:26:39 +0000 (12:26 +0000)
this fix is complements the fix done
by: 4d74fe5e508ebdadf2d033b8b4c43d6b18986569
that was causing python errors when running the bucket notifications
http tests.
this is also adding a missing function from:
970113d4092567bae9c6fab060bc32d241f6c581
the above commit cannot be cherry-picked as-is, since it has other
dependencies to the product code (notification list json format).

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

index fb73a51a3c023bffab1a04e6425021ce8d691ee9..3ae5d544550198acc5a2a5791967709177ba6df1 100644 (file)
@@ -537,6 +537,16 @@ def another_user(user=None, tenant=None, account=None):
                       calling_format='boto.s3.connection.OrdinaryCallingFormat')
     return conn, arn
 
+
+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)
+    parsed_result = json.loads(result[0])
+    if assert_entries_number:
+        assert_equal(parsed_result['Topic Stats']['Entries'], assert_entries_number)
+    return parsed_result
+
+
 ##############
 # bucket notifications tests
 ##############
@@ -1628,7 +1638,7 @@ def test_ps_s3_notification_multi_delete_on_master():
 @attr('http_test')
 def test_ps_s3_notification_push_http_on_master():
     """ test pushing http s3 notification on master """
-    hostname = get_ip_http()
+    hostname = get_ip()
     conn = connection()
     zonegroup = get_config_zonegroup()
 
@@ -1712,7 +1722,7 @@ def test_ps_s3_notification_push_http_on_master():
 @attr('http_test')
 def test_ps_s3_notification_push_cloudevents_on_master():
     """ test pushing cloudevents notification on master """
-    hostname = get_ip_http()
+    hostname = get_ip()
     conn = connection()
     zonegroup = get_config_zonegroup()