summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorKaushal M <kaushal@redhat.com>2013-09-04 13:06:57 +0530
committerVijay Bellur <vbellur@redhat.com>2013-09-19 10:29:42 -0700
commitac2f281ad3105236b024550bac48395d513260ec (patch)
tree8b1fc7b38b395fa18f99f2da6bd6917028a0f533 /tests
parentc8e970495d24af1303b4dda8da9ac7bd6c8849fe (diff)
cli: Fix 'status all' xml output when volumes are not started
Backport of 7d9bc0d21408c31651a65a6ec0e67c3b8acd0fde from master CLI now only outputs one XML document for 'status all' only containing those volumes which are started. BUG: 1004218 Change-Id: I119ac40282380886b46a09fd9a19d35115fd869d Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.org/5970 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/bugs/bug-1004218.t26
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/bugs/bug-1004218.t b/tests/bugs/bug-1004218.t
new file mode 100644
index 00000000000..17eb3c65b12
--- /dev/null
+++ b/tests/bugs/bug-1004218.t
@@ -0,0 +1,26 @@
+#!/bin/bash
+
+# Test if only a single xml document is generated by 'status all'
+# when a volume is not started
+
+. $(dirname $0)/../include.rc
+
+cleanup;
+
+TEST glusterd
+
+TEST $CLI volume create ${V0}1 $H0:$B0/${V0}1{1,2}
+TEST $CLI volume create ${V0}2 $H0:$B0/${V0}2{1,2}
+
+TEST $CLI volume start ${V0}1
+
+function test_status_all ()
+{
+ $CLI volume status all --xml | xmllint -format -
+}
+
+TEST test_status_all
+
+TEST $CLI volume stop ${V0}1
+
+cleanup