]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/workunits/rbd: test new move-to-trash on image remove config override 24476/head
authorJason Dillaman <dillaman@redhat.com>
Mon, 8 Oct 2018 14:50:32 +0000 (10:50 -0400)
committerJason Dillaman <dillaman@redhat.com>
Wed, 10 Oct 2018 13:08:03 +0000 (09:08 -0400)
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
qa/workunits/rbd/cli_generic.sh

index 3f22893648087e1e7225380fc1b11c501b5d644c..2de7a825c170ee7cdfdc59880876cecdcdd196b5 100755 (executable)
@@ -468,6 +468,13 @@ test_trash() {
     rbd snap purge --image-id $ID
     rbd snap ls --image-id $ID | grep -v 'SNAPID' | wc -l | grep 0
 
+    rbd rm --rbd_move_to_trash_on_remove=true --rbd_move_to_trash_on_remove_expire_seconds=3600 test1
+    rbd trash ls | grep test1
+    rbd trash ls | wc -l | grep 1
+    rbd trash ls -l | grep 'test1.*USER.*protected until'
+    rbd trash rm $ID 2>&1 | grep 'Deferment time has not expired'
+    rbd trash rm --image-id $ID --force
+
     remove_images
 }