summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAvra Sengupta <asengupt@redhat.com>2012-12-12 17:34:43 +0530
committerAnand Avati <avati@redhat.com>2012-12-18 19:15:15 -0800
commitc9c0fe3f7d737b175dea3833071f3e54d2f412fa (patch)
tree6e1b90471d723cb06244d475adba4f2521d6dfaa /tests
parent020fc237765670432ae645ee104c4816d724c5ea (diff)
cli: Fixing the xml output in failure cases for gluster peer probe
Change-Id: I9ebec995cbf47d9ced7140e37787e74ff9c63769 BUG: 879490 Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/4301 Reviewed-by: Kaushal M <kaushal@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'tests')
-rwxr-xr-xtests/bugs/bug-879490.t37
1 files changed, 37 insertions, 0 deletions
diff --git a/tests/bugs/bug-879490.t b/tests/bugs/bug-879490.t
new file mode 100755
index 0000000..5b9ae7b
--- /dev/null
+++ b/tests/bugs/bug-879490.t
@@ -0,0 +1,37 @@
+#!/bin/bash
+
+. $(dirname $0)/../include.rc
+. $(dirname $0)/../volume.rc
+
+cleanup;
+
+## Start and create a volume
+TEST glusterd;
+TEST pidof glusterd;
+TEST $CLI volume info;
+
+TEST $CLI volume create $V0 replica 2 stripe 2 $H0:$B0/${V0}{1,2,3,4,5,6,7,8};
+
+## Verify volume is is created
+EXPECT "$V0" volinfo_field $V0 'Volume Name';
+EXPECT 'Created' volinfo_field $V0 'Status';
+
+## Start volume and verify
+TEST $CLI volume start $V0;
+EXPECT 'Started' volinfo_field $V0 'Status';
+
+function peer_probe()
+{
+ $CLI peer probe a.b.c.d --xml | xmllint --format - | grep "<opErrstr>"
+}
+
+EXPECT " <opErrstr>Probe returned with unknown errno 107</opErrstr>" peer_probe
+
+## Finish up
+TEST $CLI volume stop $V0;
+EXPECT 'Stopped' volinfo_field $V0 'Status';
+
+TEST $CLI volume delete $V0;
+TEST ! $CLI volume info $V0;
+
+cleanup;