From: Yuval Lifshitz Date: Tue, 29 Oct 2024 17:09:37 +0000 (+0000) Subject: test/rgw/notification: replace calls to get_ip_http with get_ip X-Git-Tag: v19.2.1~108^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F60545%2Fhead;p=ceph.git test/rgw/notification: replace calls to get_ip_http with get_ip 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 --- diff --git a/src/test/rgw/bucket_notification/test_bn.py b/src/test/rgw/bucket_notification/test_bn.py index fb73a51a3c02..3ae5d5445501 100644 --- a/src/test/rgw/bucket_notification/test_bn.py +++ b/src/test/rgw/bucket_notification/test_bn.py @@ -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()