]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test/rgw: add multisite test_suspended_delete_marker_full_sync()
authorCasey Bodley <cbodley@redhat.com>
Tue, 22 Jan 2019 15:56:56 +0000 (10:56 -0500)
committerCasey Bodley <cbodley@redhat.com>
Tue, 29 Jan 2019 20:48:44 +0000 (15:48 -0500)
Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit 8686b6429c520aff388fb64d46172d691d71950d)

src/test/rgw/rgw_multi/tests.py

index 0668cb6ec0158c2eabddf95edf8a2b7bc7b72821..8f1a10f298f2781c9f4a516895da66f4c79e35e3 100644 (file)
@@ -711,6 +711,30 @@ def test_delete_marker_full_sync():
     for _, bucket in zone_bucket:
         zonegroup_bucket_checkpoint(zonegroup_conns, bucket.name)
 
+def test_suspended_delete_marker_full_sync():
+    zonegroup = realm.master_zonegroup()
+    zonegroup_conns = ZonegroupConns(zonegroup)
+    buckets, zone_bucket = create_bucket_per_zone(zonegroup_conns)
+
+    # enable/suspend versioning
+    for _, bucket in zone_bucket:
+        bucket.configure_versioning(True)
+        bucket.configure_versioning(False)
+    zonegroup_meta_checkpoint(zonegroup)
+
+    for zone, bucket in zone_bucket:
+        # upload an initial object
+        key1 = new_key(zone, bucket, 'obj')
+        key1.set_contents_from_string('')
+
+        # create a delete marker
+        key2 = new_key(zone, bucket, 'obj')
+        key2.delete()
+
+    # wait for full sync
+    for _, bucket in zone_bucket:
+        zonegroup_bucket_checkpoint(zonegroup_conns, bucket.name)
+
 def test_bucket_versioning():
     buckets, zone_bucket = create_bucket_per_zone_in_realm()
     for _, bucket in zone_bucket: