Fix versioning tests failures due multiple removal of object

Signed-off-by: Pragadeeswaran Sathyanarayanan <psathyan@redhat.com>
This commit is contained in:
Pragadeeswaran Sathyanarayanan 2022-03-02 19:37:52 +05:30
parent 3c76774ad9
commit d64681cba0
No known key found for this signature in database
GPG key ID: E640F159CDA35D8C

View file

@ -6854,8 +6854,9 @@ def _do_remove_versions(bucket, objname, remove_start_idx, idx_inc, head_rm_rati
for j in xrange(total):
r += head_rm_ratio
if r >= 1:
r %= 1
# Head object can be removed only once.
if r == 1:
remove_obj_head(bucket, objname, k, c)
else:
remove_obj_version(bucket, k, c, idx)