]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/workunits/rbd/copy.sh: fix test
authorSage Weil <sage@inktank.com>
Tue, 22 Apr 2014 16:37:32 +0000 (09:37 -0700)
committerJosh Durgin <josh.durgin@inktank.com>
Tue, 22 Apr 2014 18:59:23 +0000 (11:59 -0700)
I broke this in commit 9d64ac66082bd108ec3c2a74e2e77475b5564eae.

Signed-off-by: Sage Weil <sage@inktank.com>
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
qa/workunits/rbd/copy.sh

index 226f5bf01202481f85fab23108c6b0f4046bf588..59824f9245bff24b1f48357ad74c19ece0c8cee1 100755 (executable)
@@ -3,7 +3,7 @@
 # make sure rbd pool is EMPTY.. this is a test script!!
 rbd ls | wc -l | grep -v '^0$' && echo "nonempty rbd pool, aborting!  run this script on an empty test cluster only." && exit 1
 
-IMGS="testimg1 testimg2 testimg3 foo foo2 bar bar2 test1 test2 test3"
+IMGS="testimg1 testimg2 testimg3 foo foo2 bar bar2 test1 test2 test3 clone2"
 
 remove_images() {
     for img in $IMGS
@@ -288,9 +288,14 @@ test_pool_image_args() {
 
     rm -f /tmp/empty
     ceph osd pool delete test test --yes-i-really-really-mean-it
+
+    for f in foo test1 test10 test12 test2 test3 ; do
+       rbd rm $f
+    done
 }
 
 test_clone() {
+    echo "testing clone..."
     remove_images
     rbd create test1 $RBD_CREATE_ARGS -s 1
     rbd snap create test1@s1
@@ -309,9 +314,14 @@ test_clone() {
     rbd ls -l | grep clone2 | grep rbd2/clone@s1
     rbd -p rbd2 ls | grep -v clone2
 
+    rbd rm clone2
+    rbd snap unprotect rbd2/clone@s1
+    rbd snap rm rbd2/clone@s1
+    rbd rm rbd2/clone
+    rbd snap unprotect test1@s1
+    rbd snap rm test1@s1
+    rbd rm test1
     rados rmpool rbd2 rbd2 --yes-i-really-really-mean-it
-    rados rmpool rbd rbd --yes-i-really-really-mean-it
-    rados mkpool rbd rbd --yes-i-really-really-mean-it
 }
 
 test_pool_image_args