]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
rgw/pubsub: make sure bucket is empty before deletion
authorYuval Lifshitz <yuvalif@yahoo.com>
Mon, 29 Apr 2019 07:33:06 +0000 (10:33 +0300)
committerYuval Lifshitz <yuvalif@yahoo.com>
Mon, 29 Apr 2019 07:33:06 +0000 (10:33 +0300)
Signed-off-by: Yuval Lifshitz <yuvalif@yahoo.com>
src/test/rgw/rgw_multi/tests_ps.py

index b31df060f037742dfd926c2c39a281c9fecfcd3d..d043d2876322e1371640ce6f99d84591e9346b47 100644 (file)
@@ -892,19 +892,22 @@ def test_ps_versioned_deletion():
     # wait for sync
     zone_bucket_checkpoint(ps_zones[0].zone, zones[0].zone, bucket_name)
 
-    # get the create events from the subscription
+    # get the delete events from the subscription
     result, _ = sub_conf.get_events()
     parsed_result = json.loads(result)
     for event in parsed_result['events']:
         log.debug('Event key: "' + str(event['info']['key']['name']) + '" type: "' + str(event['event']) + '"')
+        assert_equal(str(event['event']), 'OBJECT_DELETE')
 
-    # TODO: verify the specific events
+    # TODO: verify we have exactly 2 events
     assert len(parsed_result['events']) >= 2
 
     # cleanup
     sub_conf.del_config()
     notification_conf.del_config()
     topic_conf.del_config()
+    for key in bucket.list():
+        key.delete()
     zones[0].delete_bucket(bucket_name)