[sheepdog] [PATCH v2 11/11] tests: add 063 to test reweight
Liu Yuan
namei.unix at gmail.com
Mon May 27 08:23:03 CEST 2013
Signed-off-by: Liu Yuan <namei.unix at gmail.com>
---
tests/063 | 45 +++++++++++++++++++++++++++++++++++++++++++++
tests/063.out | 34 ++++++++++++++++++++++++++++++++++
tests/group | 1 +
3 files changed, 80 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..8892904
--- /dev/null
+++ b/tests/063
@@ -0,0 +1,45 @@
+#!/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))
+_make_device 4 $((100 * 1024 ** 2))
+
+#start three in different size
+for i in 0 1 2; do
+ _start_sheep $i
+done
+_start_sheep 3 "-g"
+_wait_for_sheep 4
+$COLLIE cluster format -c 1
+sleep 1
+
+$COLLIE vdi create test 200M -P
+$COLLIE node info
+$COLLIE node list
+
+$COLLIE node md plug $STORE/4
+_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..ee987b9
--- /dev/null
+++ b/tests/063.out
@@ -0,0 +1,34 @@
+QA output created by 063
+using backend plain store
+Id Size Used Use%
+ 0 91 MB 76 MB 83%
+ 1 91 MB 56 MB 61%
+ 2 91 MB 72 MB 78%
+ 3 0.0 MB 0.0 MB 0%
+Total 274 MB 204 MB 74%
+
+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
+- 3 127.0.0.1:7003 0 3
+Id Size Used Use%
+ 0 182 MB 100 MB 54%
+ 1 91 MB 60 MB 65%
+ 2 91 MB 44 MB 48%
+ 3 0.0 MB 0.0 MB 0%
+Total 365 MB 204 MB 55%
+
+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
+- 3 127.0.0.1:7003 0 3
+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, 127.0.0.1:7003]
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