Problem: gluster volume remove-brick command, was not printing the error in case of volume-name specified is wrong. Fix: Fix will print error message to indicate that provided volume name is invalid. Although patch for bug 961669 http://review.gluster.org/#/c/4975/ does print cli-output now, but still xml is unable to use the response values Change-Id: I2ee1df86c1e756fb8e93b4d6bbdd102b4f368f87 BUG: 961307 Signed-off-by: Venkatesh Somyajulu <vsomyaju@redhat.com> Reviewed-on: http://review.gluster.org/4972 Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
33 lines
655 B
Bash
33 lines
655 B
Bash
#!/bin/bash
|
|
|
|
. $(dirname $0)/../include.rc
|
|
. $(dirname $0)/../volume.rc
|
|
|
|
cleanup;
|
|
|
|
REPLICA=2
|
|
|
|
TEST glusterd
|
|
TEST pidof glusterd
|
|
|
|
TEST $CLI volume create $V0 replica $REPLICA $H0:$B0/${V0}-00 $H0:$B0/${V0}-01 $H0:$B0/${V0}-10 $H0:$B0/${V0}-11
|
|
TEST $CLI volume start $V0
|
|
|
|
var1=$(gluster volume remove-brick $H0:$B0/${V0}-00 $H0:$B0/${V0}-01 start 2>&1)
|
|
var2="volume remove-brick start: failed: Volume $H0:$B0/${V0}-00 does not exist"
|
|
|
|
|
|
function compare_string()
|
|
{
|
|
val="-1"
|
|
if [ "$1" == "$2" ]; then
|
|
val="0"
|
|
else
|
|
val="1"
|
|
fi
|
|
echo $val
|
|
}
|
|
|
|
EXPECT 0 compare_string "$var1" "$var2"
|
|
cleanup;
|