[sheepdog] [PATCH 1/6] tests: add test to check cluster halt

MORITA Kazutaka morita.kazutaka at lab.ntt.co.jp
Tue Feb 26 05:06:45 CET 2013


Signed-off-by: MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp>
---
 tests/051     | 32 ++++++++++++++++++++++++++++++++
 tests/051.out | 23 +++++++++++++++++++++++
 tests/group   |  1 +
 3 files changed, 56 insertions(+)
 create mode 100755 tests/051
 create mode 100644 tests/051.out

diff --git a/tests/051 b/tests/051
new file mode 100755
index 0000000..5c5f385
--- /dev/null
+++ b/tests/051
@@ -0,0 +1,32 @@
+#!/bin/bash
+
+# Test cluster halt
+
+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
+
+_cleanup
+
+for i in 0 1; do
+    _start_sheep $i
+done
+_wait_for_sheep 2
+$COLLIE cluster format
+sleep 1
+$COLLIE cluster info | _filter_cluster_info
+
+_start_sheep 2
+_wait_for_sheep 3
+$COLLIE cluster info | _filter_cluster_info
+
+_kill_sheep 2
+_wait_for_sheep 2
+$COLLIE cluster info | _filter_cluster_info
diff --git a/tests/051.out b/tests/051.out
new file mode 100644
index 0000000..23d43ee
--- /dev/null
+++ b/tests/051.out
@@ -0,0 +1,23 @@
+QA output created by 051
+using backend farm store
+Cluster status: IO has halted as there are too few living nodes
+
+Cluster created at DATE
+
+Epoch Time           Version
+DATE      1 [127.0.0.1:7000, 127.0.0.1:7001]
+Cluster status: running
+
+Cluster created at DATE
+
+Epoch Time           Version
+DATE      2 [127.0.0.1:7000, 127.0.0.1:7001, 127.0.0.1:7002]
+DATE      1 [127.0.0.1:7000, 127.0.0.1:7001]
+Cluster status: IO has halted as there are too few living nodes
+
+Cluster created at DATE
+
+Epoch Time           Version
+DATE      3 [127.0.0.1:7000, 127.0.0.1:7001]
+DATE      2 [127.0.0.1:7000, 127.0.0.1:7001, 127.0.0.1:7002]
+DATE      1 [127.0.0.1:7000, 127.0.0.1:7001]
diff --git a/tests/group b/tests/group
index 145cbfa..f46134e 100644
--- a/tests/group
+++ b/tests/group
@@ -63,3 +63,4 @@
 048 auto quick collie
 049 auto quick cache
 050 auto quick cluster
+051 auto quick cluster
-- 
1.8.1.3.566.gaa39828




More information about the sheepdog mailing list