From aa3255b84405aaf0e3a6347a52ecf5e52d2cd7f3 Mon Sep 17 00:00:00 2001 From: Josh Durgin Date: Thu, 28 Jun 2012 18:38:39 -0700 Subject: [PATCH] qa: add tests for rbd ls with old and new formats Signed-off-by: Josh Durgin --- qa/workunits/rbd/copy.sh | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/qa/workunits/rbd/copy.sh b/qa/workunits/rbd/copy.sh index dd54e6b155e..d62c862ffe0 100755 --- a/qa/workunits/rbd/copy.sh +++ b/qa/workunits/rbd/copy.sh @@ -79,8 +79,39 @@ test_rename() { remove_images } +test_ls() { + echo "testing ls..." + remove_images + + rbd create -s 1 test1 + rbd create -s 1 test2 + rbd ls | grep test1 + rbd ls | grep test2 + rbd ls | wc -l | grep 2 + + rbd rm test1 + rbd rm test2 + + rbd create --new-format -s 1 test1 + rbd create --new-format -s 1 test2 + rbd ls | grep test1 + rbd ls | grep test2 + rbd ls | wc -l | grep 2 + + rbd rm test1 + rbd rm test2 + + rbd create --new-format -s 1 test1 + rbd create -s 1 test2 + rbd ls | grep test1 + rbd ls | grep test2 + rbd ls | wc -l | grep 2 + + remove_images +} test_rename +test_ls test_others echo OK