[sheepdog] [PATCH 9/9] tests: add 063 to test reweight

Liu Yuan namei.unix at gmail.com
Sun May 26 15:40:49 CEST 2013


Signed-off-by: Liu Yuan <namei.unix at gmail.com>
---
 tests/063     |   44 ++++++++++++++++++++++++++++++++++++++++++++
 tests/063.out |   30 ++++++++++++++++++++++++++++++
 tests/group   |    1 +
 3 files changed, 75 insertions(+)
 create mode 100755 tests/063
 create mode 100644 tests/063.out

diff --git a/tests/063 b/tests/063
new file mode 100755
index 0000000..f89d627
--- /dev/null
+++ b/tests/063
@@ -0,0 +1,44 @@
+#!/bin/bash
+
+# Test reweight
+seq=`basename $0`
+echo "QA output created by $seq"
+
+here=`pwd`
+tmp=/tmp/$$
+status=1        # failure is the default!
+
+# get standard environment, filters and checks
+. ./common.rc
+. ./common.filter
+
+_need_to_be_root
+
+_cleanup
+
+_make_device 0 $((100 * 1024 ** 2))
+_make_device 1 $((100 * 1024 ** 2))
+_make_device 2 $((100 * 1024 ** 2))
+_make_device 3 $((100 * 1024 ** 2))
+
+#start three in different size
+for i in 0 1 2; do
+	_start_sheep $i
+done
+_wait_for_sheep 3
+$COLLIE cluster format -c 1
+sleep 1
+
+$COLLIE vdi create test 200M -P
+$COLLIE node info
+$COLLIE node list
+
+$COLLIE node md plug $STORE/3
+_wait_for_sheep_recovery 0
+
+$COLLIE cluster reweight
+_wait_for_sheep_recovery 0
+$COLLIE node info
+$COLLIE node list
+$COLLIE cluster info | _filter_cluster_info
+
diff --git a/tests/063.out b/tests/063.out
new file mode 100644
index 0000000..c35a581
--- /dev/null
+++ b/tests/063.out
@@ -0,0 +1,30 @@
+QA output created by 063
+using backend plain store
+Id	Size	Used	Use%
+ 0	90 MB	76 MB	 84%
+ 1	90 MB	56 MB	 62%
+ 2	90 MB	72 MB	 79%
+Total	270 MB	204 MB	 75%
+
+Total virtual image size	200 MB
+M   Id   Host:Port         V-Nodes       Zone
+-    0   127.0.0.1:7000      	64          0
+-    1   127.0.0.1:7001      	64          1
+-    2   127.0.0.1:7002      	64          2
+Id	Size	Used	Use%
+ 0	180 MB	100 MB	 55%
+ 1	90 MB	60 MB	 66%
+ 2	90 MB	44 MB	 48%
+Total	360 MB	204 MB	 56%
+
+Total virtual image size	200 MB
+M   Id   Host:Port         V-Nodes       Zone
+-    0   127.0.0.1:7000      	96          0
+-    1   127.0.0.1:7001      	48          1
+-    2   127.0.0.1:7002      	48          2
+Cluster status: running, auto-recovery enabled
+
+Cluster created at DATE
+
+Epoch Time           Version
+DATE      1 [127.0.0.1:7000, 127.0.0.1:7001, 127.0.0.1:7002]
diff --git a/tests/group b/tests/group
index 46364a6..40a24b0 100644
--- a/tests/group
+++ b/tests/group
@@ -76,3 +76,4 @@
 060 auto quick cluster md
 061 auto quick cluster md
 062 auto quick cluster md
+063 auto quick cluster md
-- 
1.7.9.5




More information about the sheepdog mailing list