diff options
author | Kaushal M <kaushal@redhat.com> | 2015-12-08 19:06:24 +0530 |
---|---|---|
committer | Kaleb KEITHLEY <kkeithle@redhat.com> | 2015-12-09 04:18:21 -0800 |
commit | ba73b0a25ecdf1c8476eead8105a8edc8031b31c (patch) | |
tree | 6f5ee9597d4e7afbb01cc1224dbd26a32f8c8ed3 /tests | |
parent | 032e9a8bd923cf6913f0d3998546a2bd589adceb (diff) |
tests: fix brick_up_status
The brick_up_status function wasn't correct after the introduction of
the RDMA port into the `volume status` output.
It has been fixed to use the XML brick status of a specific brick
instead of normal CLI output.
Change-Id: I5327e1a32b1c6f326bc3def735d0daa9ea320074
BUG: 1289584
Signed-off-by: Kaushal M <kaushal@redhat.com>
Reviewed-on: http://review.gluster.org/12913
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/bugs/glusterd/bug-1225716-brick-online-validation-remove-brick.t | 2 | ||||
-rwxr-xr-x | tests/bugs/glusterd/bug-857330/normal.t | 2 | ||||
-rwxr-xr-x | tests/bugs/glusterd/bug-857330/xml.t | 2 | ||||
-rw-r--r-- | tests/volume.rc | 3 |
4 files changed, 4 insertions, 5 deletions
diff --git a/tests/bugs/glusterd/bug-1225716-brick-online-validation-remove-brick.t b/tests/bugs/glusterd/bug-1225716-brick-online-validation-remove-brick.t index 657c7f8eb01..870a6130674 100644 --- a/tests/bugs/glusterd/bug-1225716-brick-online-validation-remove-brick.t +++ b/tests/bugs/glusterd/bug-1225716-brick-online-validation-remove-brick.t @@ -18,7 +18,7 @@ kill -15 `cat $GLUSTERD_WORKDIR/vols/$V0/run/$H0-d-backends-${V0}1.pid`; TEST ! $CLI volume remove-brick $V0 $H0:$B0/${V0}1 start TEST $CLI volume start $V0 force -EXPECT_WITHIN $PROCESS_UP_TIMEOUT "Y" brick_up_status $V0 $H0 $B0/${V0}1 +EXPECT_WITHIN $PROCESS_UP_TIMEOUT "1" brick_up_status $V0 $H0 $B0/${V0}1 #remove-brick start should succeed as the brick is up TEST $CLI volume remove-brick $V0 $H0:$B0/${V0}1 start diff --git a/tests/bugs/glusterd/bug-857330/normal.t b/tests/bugs/glusterd/bug-857330/normal.t index d42f5dacaf6..70cb89dd462 100755 --- a/tests/bugs/glusterd/bug-857330/normal.t +++ b/tests/bugs/glusterd/bug-857330/normal.t @@ -46,7 +46,7 @@ TEST $CLI volume replace-brick $V0 $REP_BRICK_PAIR commit force; ################## ## Remove-brick ## ################## -EXPECT_WITHIN $PROCESS_UP_TIMEOUT "Y" brick_up_status $V0 $H0 $B0/${V0}3 +EXPECT_WITHIN $PROCESS_UP_TIMEOUT "1" brick_up_status $V0 $H0 $B0/${V0}3 COMMAND="volume remove-brick $V0 $H0:$B0/${V0}3 start" PATTERN="ID:" diff --git a/tests/bugs/glusterd/bug-857330/xml.t b/tests/bugs/glusterd/bug-857330/xml.t index 6b87f21d9c1..391d189e387 100755 --- a/tests/bugs/glusterd/bug-857330/xml.t +++ b/tests/bugs/glusterd/bug-857330/xml.t @@ -52,7 +52,7 @@ TEST $CLI volume replace-brick $V0 $H0:$B0/${V0}2 $H0:$B0/${V0}3 commit force ################## ## Remove-brick ## ################## -EXPECT_WITHIN $PROCESS_UP_TIMEOUT "Y" brick_up_status $V0 $H0 $B0/${V0}3 +EXPECT_WITHIN $PROCESS_UP_TIMEOUT "1" brick_up_status $V0 $H0 $B0/${V0}3 COMMAND="volume remove-brick $V0 $H0:$B0/${V0}3 start" PATTERN="task-id" diff --git a/tests/volume.rc b/tests/volume.rc index 2992e866fda..5df33d9f672 100644 --- a/tests/volume.rc +++ b/tests/volume.rc @@ -23,8 +23,7 @@ function brick_up_status { local vol=$1 local host=$2 local brick=$3 - brick_pid=$(get_brick_pid $vol $host $brick) - gluster volume status | grep $brick_pid | awk '{print $4}' + $CLI volume status $vol $host:$brick --xml | sed -ne 's/.*<status>\([01]\)<\/status>/\1/p' } function volume_option() |