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

Liu Yuan namei.unix at gmail.com
Thu Nov 14 06:45:48 CET 2013


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

diff --git a/tests/functional/078 b/tests/functional/078
new file mode 100755
index 0000000..0b0f051
--- /dev/null
+++ b/tests/functional/078
@@ -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/078.out b/tests/functional/078.out
new file mode 100644
index 0000000..f041108
--- /dev/null
+++ b/tests/functional/078.out
@@ -0,0 +1,11 @@
+QA output created by 078
+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 22ec578..9460834 100644
--- a/tests/functional/group
+++ b/tests/functional/group
@@ -92,3 +92,4 @@
 075 auto quick vdi md
 076 auto quick vdi md
 077 auto quick vdi
+078 auto quick vdi md
-- 
1.7.9.5




More information about the sheepdog mailing list