#!/bin/bash

. $(dirname $0)/../include.rc
. $(dirname $0)/../volume.rc

cleanup

TEST glusterd

TEST $CLI volume create $V1 replica 2 $H0:$B0/${V1}{1,2}

TEST $CLI volume start $V1
TEST $GFS --volfile-id=$V1 --volfile-server=$H0 $M1

kill_brick $V1 $H0 $B0/${V1}1
EXPECT_WITHIN ${PROCESS_UP_TIMEOUT} "1" online_brick_count

TEST $CLI volume start $V1 force
EXPECT_WITHIN $PROCESS_UP_TIMEOUT "2" online_brick_count
EXPECT_WITHIN $PROCESS_UP_TIMEOUT "Y" glustershd_up_status

TEST $CLI volume heal $V1
