[sheepdog] [PATCH 2/2] tests/func: add a test dedicated for 'cluster format'

Liu Yuan namei.unix at gmail.com
Fri Nov 1 09:31:01 CET 2013


Signed-off-by: Liu Yuan <namei.unix at gmail.com>
---
 tests/functional/077     |   27 +++++++++++++++++++++++++++
 tests/functional/077.out |   11 +++++++++++
 tests/functional/group   |    1 +
 3 files changed, 39 insertions(+)
 create mode 100755 tests/functional/077
 create mode 100644 tests/functional/077.out

diff --git a/tests/functional/077 b/tests/functional/077
new file mode 100755
index 0000000..0b0f051
--- /dev/null
+++ b/tests/functional/077
@@ -0,0 +1,27 @@
+#!/bin/bash
+
+# Test cluster format option
+
+. ./common
+
+for i in `seq 0 6`; do
+    _start_sheep $i
+done
+
+_wait_for_sheep 7
+
+_cluster_format -c 4:2
+
+$DOG vdi create test1 20M
+$DOG vdi create -c 2 test2 20M
+$DOG vdi create -c 2:1 test3 20M
+_vdi_list
+$DOG cluster shutdown
+_wait_for_sheep_stop
+
+for i in `seq 0 6`; do
+    _start_sheep $i
+done
+_wait_for_sheep 7
+$DOG vdi create test4 20M
+_vdi_list
diff --git a/tests/functional/077.out b/tests/functional/077.out
new file mode 100644
index 0000000..c5d05fd
--- /dev/null
+++ b/tests/functional/077.out
@@ -0,0 +1,11 @@
+QA output created by 077
+using backend plain store
+  Name        Id    Size    Used  Shared    Creation time   VDI id  Copies  Tag
+  test1        0   20 MB  0.0 MB  0.0 MB DATE   fd32fc     6              
+  test3        0   20 MB  0.0 MB  0.0 MB DATE   fd3662     3              
+  test2        0   20 MB  0.0 MB  0.0 MB DATE   fd3815     2              
+  Name        Id    Size    Used  Shared    Creation time   VDI id  Copies  Tag
+  test4        0   20 MB  0.0 MB  0.0 MB DATE   fd2de3     6              
+  test1        0   20 MB  0.0 MB  0.0 MB DATE   fd32fc     6              
+  test3        0   20 MB  0.0 MB  0.0 MB DATE   fd3662     3              
+  test2        0   20 MB  0.0 MB  0.0 MB DATE   fd3815     2              
diff --git a/tests/functional/group b/tests/functional/group
index 8d15ffe..a44ae6a 100644
--- a/tests/functional/group
+++ b/tests/functional/group
@@ -91,3 +91,4 @@
 074 auto quick clster md
 075 auto quick vdi md
 076 auto quick vdi md
+077 auto quick vdi md
-- 
1.7.9.5




More information about the sheepdog mailing list