]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
test/rgw: add multisite test_delete_marker_full_sync()
authorCasey Bodley <cbodley@redhat.com>
Tue, 22 Jan 2019 15:30:04 +0000 (10:30 -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 fba4ed72fd8b3ebec25b18ecce44ffd2717c0d91)

src/test/rgw/rgw_multi/tests.py

index 5b4f0a0d3caf776365bdce620337ac2e7338bb8a..0668cb6ec0158c2eabddf95edf8a2b7bc7b72821 100644 (file)
@@ -688,6 +688,28 @@ def test_versioned_object_incremental_sync():
     for _, bucket in zone_bucket:
         zonegroup_bucket_checkpoint(zonegroup_conns, bucket.name)
 
+def test_delete_marker_full_sync():
+    zonegroup = realm.master_zonegroup()
+    zonegroup_conns = ZonegroupConns(zonegroup)
+    buckets, zone_bucket = create_bucket_per_zone(zonegroup_conns)
+
+    # enable versioning
+    for _, bucket in zone_bucket:
+        bucket.configure_versioning(True)
+    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()