Skip to content

Commit

Permalink
Merge pull request #625 from hmaheswa/comment_topic_get_for_notifc_topic
Browse files Browse the repository at this point in the history
[TFA]removing topic get for auto-generated notif topic on all versions and removing topic list on quincy
  • Loading branch information
mergify[bot] authored Aug 29, 2024
2 parents 4423734 + 245efec commit c1a50ea
Showing 1 changed file with 18 additions and 29 deletions.
47 changes: 18 additions & 29 deletions rgw/v2/tests/s3_swift/test_bucket_notifications.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ def test_exec(config, ssh_con):
rgw_admin_notif_commands_available = False
ceph_version_id = ceph_version_id.split("-")
ceph_version_id = ceph_version_id[0].split(".")
if (
if (float(ceph_version_id[0]) >= 19) or (
float(ceph_version_id[0]) == 18
and float(ceph_version_id[1]) >= 2
and float(ceph_version_id[2]) >= 1
Expand Down Expand Up @@ -235,36 +235,25 @@ def test_exec(config, ssh_con):
rgw_s3_client, bucket_name_to_create
)

# get bucket notification using rgw cli
log.info("get notification topic using rgw cli")
get_notif_topic = notification.rgw_admin_topic_notif_ops(
op="get",
args={"topic": bkt_notif_topic_name, **extra_topic_args},
)
if get_notif_topic is False:
raise TestExecError(
"radosgw-admin topic get failed for bucket notification topic"
)

# list rgw topics using rgw admin cli
log.info("list topic using rgw cli")
topics_list = notification.rgw_admin_topic_notif_ops(
op="list",
args={"topic": bkt_notif_topic_name, **extra_topic_args},
)
topic_listed = False
notif_topic_listed = False
for topic_dict in topics_list["topics"]:
if topic_dict["name"] == topic_name:
topic_listed = True
if topic_dict["name"] == bkt_notif_topic_name:
notif_topic_listed = True
if topic_listed is False:
raise TestExecError(
f"radosgw-admin topic list doesnot contain topic: {topic_name}"
if rgw_admin_notif_commands_available:
# list rgw topics using rgw admin cli
log.info("list topic using rgw cli")
topics_list = notification.rgw_admin_topic_notif_ops(
op="list",
args={**extra_topic_args},
)
topic_listed = False
notif_topic_listed = False
for topic_dict in topics_list["topics"]:
if topic_dict["name"] == topic_name:
topic_listed = True
if topic_dict["name"] == bkt_notif_topic_name:
notif_topic_listed = True
if topic_listed is False:
raise TestExecError(
f"radosgw-admin topic list doesnot contain topic: {topic_name}"
)

if rgw_admin_notif_commands_available:
# verify notification topic does not list in radosgw-admin topic list
if notif_topic_listed is True:
raise TestExecError(
Expand Down

0 comments on commit c1a50ea

Please sign in to comment.