]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rbd: tests for copy with explicit/implicit pool names
authorDan Mick <dan.mick@inktank.com>
Fri, 16 Nov 2012 06:49:16 +0000 (22:49 -0800)
committerSage Weil <sage@inktank.com>
Tue, 27 Nov 2012 22:06:23 +0000 (14:06 -0800)
Validate change to not assume dest pool == src pool

Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
(cherry picked from commit 39180430b9be14a94502b7e5bef30dd582ce3ad8)

qa/workunits/rbd/copy.sh

index 7571f50471dfecb2e3232480cea8f53456995b93..f38fe21a293755d577980ff92f36257eb487896d 100755 (executable)
@@ -254,8 +254,22 @@ test_pool_image_args() {
     rbd import --pool test /tmp/empty
     rbd ls test | grep -q empty
 
+    # copy with no explicit pool goes to pool rbd
+    rbd copy test/test9 test10
+    rbd ls test | grep -qv test10
+    rbd ls | grep -q test10
+    rbd copy test/test9 test/test10
+    rbd ls test | grep -q test10
+    rbd copy --pool test test10 --dest-pool test test11
+    rbd ls test | grep -q test11
+    rbd copy --dest-pool rbd --pool test test11 test12
+    rbd ls | grep test12
+    rbd ls test | grep -qv test12
+
     rm -f /tmp/empty
     ceph osd pool delete test
+    ceph osd pool delete rbd
+    ceph osd pool create rbd 100
 }
 
 test_pool_image_args