From 0ae8f31415b79065f7da3d3671deb487e9e9c670 Mon Sep 17 00:00:00 2001 From: "J. Eric Ivancich" Date: Mon, 2 Feb 2026 16:37:22 -0500 Subject: [PATCH] rgw/test: add more output in boto3 versioning testing 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 --- qa/workunits/rgw/test_rgw_versioning.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/qa/workunits/rgw/test_rgw_versioning.py b/qa/workunits/rgw/test_rgw_versioning.py index 1eaab22494e..43f87b6bc25 100755 --- a/qa/workunits/rgw/test_rgw_versioning.py +++ b/qa/workunits/rgw/test_rgw_versioning.py @@ -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 -- 2.47.3