From 4d2cf73927e2163811b6c1ee61e9cbd9a83ebacf Mon Sep 17 00:00:00 2001 From: Casey Bodley Date: Thu, 24 May 2018 15:13:05 -0400 Subject: [PATCH] test/rgw: use version_id from key directly now that PutObj returns the x-amz-version-id, it's available through Key.version_id without resorting to Bucket.list_versions() Signed-off-by: Casey Bodley --- src/test/rgw/rgw_multi/tests.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/test/rgw/rgw_multi/tests.py b/src/test/rgw/rgw_multi/tests.py index a6b1152705a..8d692470acf 100644 --- a/src/test/rgw/rgw_multi/tests.py +++ b/src/test/rgw/rgw_multi/tests.py @@ -675,22 +675,19 @@ def test_versioned_object_incremental_sync(): k = new_key(zone_conn, bucket, obj) k.set_contents_from_string('version1') - v = get_latest_object_version(k) - log.debug('version1 id=%s', v.version_id) + log.debug('version1 id=%s', k.version_id) # don't delete version1 - this tests that the initial version # doesn't get squashed into later versions # create and delete the following object versions to test that # the operations don't race with each other during sync k.set_contents_from_string('version2') - v = get_latest_object_version(k) - log.debug('version2 id=%s', v.version_id) - k.bucket.delete_key(obj, version_id=v.version_id) + log.debug('version2 id=%s', k.version_id) + k.bucket.delete_key(obj, version_id=k.version_id) k.set_contents_from_string('version3') - v = get_latest_object_version(k) - log.debug('version3 id=%s', v.version_id) - k.bucket.delete_key(obj, version_id=v.version_id) + log.debug('version3 id=%s', k.version_id) + k.bucket.delete_key(obj, version_id=k.version_id) for _, bucket in zone_bucket: zonegroup_bucket_checkpoint(zonegroup_conns, bucket.name) -- 2.39.5