From fcb61ff87dda563d611e92085d552a785ff6d281 Mon Sep 17 00:00:00 2001 From: Yuval Lifshitz Date: Tue, 29 Oct 2024 17:09:37 +0000 Subject: [PATCH] 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 --- src/test/rgw/bucket_notification/test_bn.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/test/rgw/bucket_notification/test_bn.py b/src/test/rgw/bucket_notification/test_bn.py index fb73a51a3c0..3ae5d544550 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() -- 2.39.5