]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw/test: add more output in boto3 versioning testing 67190/head
authorJ. Eric Ivancich <ivancich@redhat.com>
Mon, 2 Feb 2026 21:37:22 +0000 (16:37 -0500)
committerJ. Eric Ivancich <ivancich@redhat.com>
Wed, 4 Feb 2026 18:07:29 +0000 (13:07 -0500)
Saw a spurious error in this test and figured it'd be helpful if more
information was logged in case another spurious error occcurs.

Signed-off-by: J. Eric Ivancich <ivancich@redhat.com>
qa/workunits/rgw/test_rgw_versioning.py

index 1eaab22494e08c649c460249e3f03b6847496d8f..43f87b6bc2539ae3f98b0f06dff3e5345a75de67 100755 (executable)
@@ -59,18 +59,25 @@ def main():
     assert resp['DeleteMarker'], 'DeleteMarker value not True in response'
     assert 'VersionId' in resp, 'VersionId key not present in response'
     version_id_1 = resp['VersionId']
+    log.info(f"first delete marker has version id {version_id_1}")
 
     resp = bucket.Object(key).delete()
     assert 'DeleteMarker' in resp, 'DeleteMarker key not present in response'
     assert resp['DeleteMarker'], 'DeleteMarker value not True in response'
     assert 'VersionId' in resp, 'VersionId key not present in response'
     version_id_2 = resp['VersionId']
+    log.info(f"second delete marker has version id {version_id_2}")
 
     connection.ObjectVersion(bucket.name, key, version_id_2).delete()
-    # bucket index should only include entries for an object version
+    # bucket index should only contain entries for one version of one object
     out = exec_cmd(f'radosgw-admin bi list --bucket {BUCKET_NAME}')
     json_out = json.loads(out.replace(b'\x80', b'0x80'))
-    assert len(json_out) == 4, 'bucket index did not only include entries for an object version'
+    log.info(f"json_out has length of { len(json_out) }")
+    idx_list = list(map(lambda v: v['idx'], json_out))
+    log.info(f"json_out has idx's of { idx_list }")
+    assert(len(json_out) == 4,
+           "bucket index did not only contain entries for one version of one " \
+           "object; expecting two plain, one instance, and one OLH entry")
 
     connection.ObjectVersion(bucket.name, key, version_id_1).delete()
     # bucket index should now be empty