[sheepdog] [PATCH v4 11/12] tests: add 063 to test reweight
Liu Yuan
namei.unix at gmail.com
Mon May 27 14:53:21 CEST 2013
Signed-off-by: Liu Yuan <namei.unix at gmail.com>
---
tests/063 | 45 +++++++++++++++++++++++++++++++++++++++++++++
tests/063.out | 35 +++++++++++++++++++++++++++++++++++
tests/group | 1 +
3 files changed, 81 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..4750a05
--- /dev/null
+++ b/tests/063.out
@@ -0,0 +1,35 @@
+QA output created by 063
+using backend plain store
+Id Size Used Avail Use%
+ 0 95 MB 76 MB 19 MB 79%
+ 1 95 MB 56 MB 39 MB 58%
+ 2 95 MB 72 MB 23 MB 75%
+ 3 0.0 MB 0.0 MB 0.0 MB 0%
+Total 286 MB 204 MB 82 MB 71%
+
+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 Avail Use%
+ 0 190 MB 100 MB 90 MB 52%
+ 1 95 MB 60 MB 35 MB 62%
+ 2 95 MB 44 MB 51 MB 46%
+ 3 0.0 MB 0.0 MB 0.0 MB 0%
+Total 381 MB 204 MB 177 MB 53%
+
+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 2 [127.0.0.1:7000, 127.0.0.1:7001, 127.0.0.1:7002, 127.0.0.1:7003]
+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