summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorVarsha Rao <varao@redhat.com>2018-03-08 11:08:34 +0530
committerVarsha Rao <varao@redhat.com>2018-03-14 10:53:20 +0530
commita4e34af38d3a58c24862890fe5f4c075d0635e8c (patch)
treec90daf3e44c5f40c58cc2bd1704ae08308f291b6 /tests
parent7f81067f4522f973e98aa5abbb4d2028da2a2e6f (diff)
tests/basic/namespace: Fix the namespace test failure
In the jenkins regression test brick multiplexing is enabled by is_brick_mx_enabled function and not by setting cluster.brick-multiplex option. Hence check the count of bricks and its logs, this fixes the failure. Change-Id: Ibb2ed8fbffd3765f283da741689304a5579d447c BUG: 1555167 Signed-off-by: Varsha Rao <varao@redhat.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/basic/namespace.t12
1 files changed, 7 insertions, 5 deletions
diff --git a/tests/basic/namespace.t b/tests/basic/namespace.t
index 7f4fe2c9268..25a6b98b440 100644
--- a/tests/basic/namespace.t
+++ b/tests/basic/namespace.t
@@ -11,12 +11,14 @@ NAMESPACE2_HASH=3926991974
NAMESPACE3_HASH=3493960770
function check_brick_multiplex() {
- $CLI volume info|grep "cluster.brick-multiplex" &>/dev/null
- rt=$?
- cnt="$(ls /var/log/glusterfs/bricks|wc -l)"
+ local ret=$($CLI volume info|grep "cluster.brick-multiplex"|cut -d" " -f2)
+ local cnt="$(ls /var/log/glusterfs/bricks|wc -l)"
+ local bcnt="$(brick_count)"
- if [ $rt -eq 0 ]; then
- local ret=$($CLI volume info|grep "cluster.brick-multiplex"|cut -d" " -f2)
+ if [ $bcnt -ne 1 ]; then
+ if [ -z $ret ]; then
+ ret="no"
+ fi
if [ $ret = "on" ] || [ $cnt -eq 1 ]; then
echo "Y"