[sheepdog] [PATCH 1/2] tests: add test to check vdi list after cluster startup

MORITA Kazutaka morita.kazutaka at lab.ntt.co.jp
Sat Aug 25 04:58:19 CEST 2012


Signed-off-by: MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp>
---
 tests/031     |   35 +++++++++++++++++++++++++++++++++++
 tests/031.out |   10 ++++++++++
 tests/group   |    1 +
 3 files changed, 46 insertions(+), 0 deletions(-)
 create mode 100755 tests/031
 create mode 100644 tests/031.out

diff --git a/tests/031 b/tests/031
new file mode 100755
index 0000000..44ef34f
--- /dev/null
+++ b/tests/031
@@ -0,0 +1,35 @@
+#!/bin/bash
+
+# Test vdi list after cluster restart
+
+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
+
+_start_sheep 0
+_wait_for_sheep 1
+
+$COLLIE cluster format -c 1
+
+for i in 1 2 3; do
+    $COLLIE vdi create test$i ${i}00MB
+done
+
+$COLLIE vdi list | _filter_short_date
+
+$COLLIE cluster shutdown
+sleep 1
+
+_start_sheep 0
+_wait_for_sheep 1
+
+$COLLIE vdi list | _filter_short_date
diff --git a/tests/031.out b/tests/031.out
new file mode 100644
index 0000000..175c386
--- /dev/null
+++ b/tests/031.out
@@ -0,0 +1,10 @@
+QA output created by 031
+using backend farm store
+  Name        Id    Size    Used  Shared    Creation time   VDI id  Copies  Tag
+  test1        1  100 MB  0.0 MB  0.0 MB DATE   fd32fc     1              
+  test3        1  300 MB  0.0 MB  0.0 MB DATE   fd3662     1              
+  test2        1  200 MB  0.0 MB  0.0 MB DATE   fd3815     1              
+  Name        Id    Size    Used  Shared    Creation time   VDI id  Copies  Tag
+  test1        1  100 MB  0.0 MB  0.0 MB DATE   fd32fc     1              
+  test3        1  300 MB  0.0 MB  0.0 MB DATE   fd3662     1              
+  test2        1  200 MB  0.0 MB  0.0 MB DATE   fd3815     1              
diff --git a/tests/group b/tests/group
index babeb3d..0de7942 100644
--- a/tests/group
+++ b/tests/group
@@ -42,3 +42,4 @@
 028 auto quick store
 029 auto quick vdi
 030 auto quick store
+031 auto quick vdi
-- 
1.7.2.5




More information about the sheepdog mailing list