summaryrefslogtreecommitdiffstats
path: root/tests/bugs/bug-1077682.t
blob: b47744e603c0cc7b78d7b63b6bb86420ecabafc2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/bash

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

function get-task-status()
{
        $CLI $COMMAND | grep -o $PATTERN
        if [ ${PIPESTATUS[0]} -ne 0 ];
        then
                return 1
        fi
        return 0
}

cleanup;

TEST glusterd
TEST pidof glusterd

TEST $CLI volume create $V0 $H0:$B0/${V0}{1,2,3,4}
TEST $CLI volume start $V0
TEST ! $CLI volume remove-brick $V0 $H0:$B0/${V0}1
TEST $CLI volume remove-brick $V0 $H0:$B0/${V0}2 force
TEST $CLI volume remove-brick $V0 $H0:$B0/${V0}3 start

EXPECT_WITHIN $REBALANCE_TIMEOUT "completed" remove_brick_status_completed_field "$V0" \
"$H0:$B0/${V0}3"

TEST $CLI volume remove-brick $V0 $H0:$B0/${V0}3 commit
TEST killall glusterd
TEST glusterd

cleanup