summaryrefslogtreecommitdiffstats
path: root/tests/bugs/bug-888752.t
diff options
context:
space:
mode:
authorKaushal M <kaushal@redhat.com>2013-07-10 18:10:49 +0530
committerAnand Avati <avati@redhat.com>2013-08-03 05:51:16 -0700
commit572f5f0a85c97a4f90a33be87b96368a0d7e7a8e (patch)
treea5ca4c029acc6b8c8b3e7147373743e629e4a97e /tests/bugs/bug-888752.t
parentfbc543633525865b33ff0a156090006c5fdd1ab3 (diff)
cli,glusterd: Fix when tasks are shown in 'volume status'
Asynchronous tasks are shown in 'volume status' only for a normal volume status request for either all volumes or a single volume. Change-Id: I9d47101511776a179d213598782ca0bbdf32b8c2 BUG: 888752 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.org/5308 Reviewed-by: Amar Tumballi <amarts@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'tests/bugs/bug-888752.t')
-rw-r--r--tests/bugs/bug-888752.t24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/bugs/bug-888752.t b/tests/bugs/bug-888752.t
new file mode 100644
index 000000000..56d3f9ffb
--- /dev/null
+++ b/tests/bugs/bug-888752.t
@@ -0,0 +1,24 @@
+#!/bin/bash
+
+. $(dirname $0)/../include.rc
+. $(dirname $0)/../cluster.rc
+
+# Check if xml output is generated correctly for volume status for a single brick
+# present on another peer and no async tasks are running.
+
+function get_peer_count {
+ $CLI_1 peer status | grep 'Peer in Cluster (Connected)' | wc -l
+}
+cleanup
+
+TEST launch_cluster 2;
+TEST $CLI_1 peer probe $H2;
+EXPECT_WITHIN 5 1 get_peer_count
+TEST $CLI_1 volume create $V0 $H1:$B1/$V0 $H2:$B2/$V0
+TEST $CLI_1 volume start $V0
+
+TEST $CLI_1 volume status $V0 $H2:$B2/$V0 --xml
+
+TEST $CLI_1 volume stop $V0
+
+cleanup