Skip to content

Commit

Permalink
Merge pull request #644 from ckulal/fix_noncurrent_event
Browse files Browse the repository at this point in the history
TFA: Fixing difference in noncurrent event type
  • Loading branch information
mergify[bot] authored Nov 21, 2024
2 parents 1c546e1 + 6ef33ac commit b7b0632
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions rgw/v2/tests/s3_swift/reusables/bucket_notification.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,13 @@ def verify_event_record(
raise EventRecordDataError("event record not generated! File is empty")

# verify event record for a particular event type
ceph_version_id, _ = utils.get_ceph_version()
ceph_version_id = ceph_version_id.split("-")
ceph_version_id = ceph_version_id[0].split(".")
if float(ceph_version_id[0]) >= 19:
non_current = "NonCurrent"
else:
non_current = "Noncurrent"
notifications_received = False
events = []
if "Delete" in event_type:
Expand All @@ -265,14 +272,14 @@ def verify_event_record(
if "LifecycleExpiration" in event_type:
events = [
"ObjectLifecycle:Expiration:Current",
"ObjectLifecycle:Expiration:Noncurrent",
f"ObjectLifecycle:Expiration:{non_current}",
"ObjectLifecycle:Expiration:DeleteMarker",
"ObjectLifecycle:Expiration:AbortMultipartUpload",
]
if "LifecycleTransition" in event_type:
events = [
"ObjectLifecycle:Transition:Current",
"ObjectLifecycle:Transition:Noncurrent",
f"ObjectLifecycle:Transition:{non_current}",
]
if "MultisiteReplication" in event_type:
events = ["ObjectSynced:Create"]
Expand Down

0 comments on commit b7b0632

Please sign in to comment.