[sheepdog] [PATCH 2/4] test/func: add test case for cluster don't have snapshots

Ruoyu liangry at ucweb.com
Wed Sep 10 09:51:56 CEST 2014


If all VDIs of the cluster don't have snapshots, dog should complain it
in any situation.

Signed-off-by: Ruoyu <liangry at ucweb.com>
---
 tests/functional/030     | 1 +
 tests/functional/030.out | 4 ++++
 2 files changed, 5 insertions(+)

diff --git a/tests/functional/030 b/tests/functional/030
index dfa3cf2..06058e0 100755
--- a/tests/functional/030
+++ b/tests/functional/030
@@ -150,6 +150,7 @@ _random | $DOG vdi write test
 $DOG vdi snapshot -s vs1 test
 $DOG cluster snapshot save s4 $TMPDIR
 $DOG vdi delete -s 1 test
+$DOG cluster snapshot save s5 $TMPDIR
 $DOG vdi snapshot -s vs2 test
 $DOG cluster snapshot save s5 $TMPDIR
 echo "yes" | $DOG cluster snapshot load s5 $TMPDIR
diff --git a/tests/functional/030.out b/tests/functional/030.out
index 29063d2..a0460bf 100644
--- a/tests/functional/030.out
+++ b/tests/functional/030.out
@@ -104,6 +104,10 @@ s test8        1   10 MB   12 MB  0.0 MB DATE   fd4247      3          snap
    /\|`
   /  |   Caution! The cluster is not empty.
 (/_)_|_  Are you sure you want to continue? [yes/no]: using backend plain store
+Cannot execute. It may be caused by:
+1. The cluster is empty.
+2. All VDIs of the cluster don't have snapshots.
+Fail to save snapshot to path: /tmp/sheepdog/030/tmp.
     __
    ()'`;
    /\|`
-- 
1.8.3.2





More information about the sheepdog mailing list