summaryrefslogtreecommitdiffstats
path: root/tests/bugs/glusterd/bug-1121584-brick-existing-validation-for-remove-brick-status-stop.t
blob: de80afcc2eb47c81d2a9c64ecf636d76b8ddba58 (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

## Test case for BZ-1121584. Execution of remove-brick status/stop command
## should give error for brick which is not part of volume.

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

cleanup;

## Start glusterd
TEST glusterd
TEST pidof glusterd

## Lets Create and start volume
TEST $CLI volume create $V0 $H0:$B0/${V0}1 $H0:$B0/${V0}2
TEST $CLI volume start $V0

## Start remove-brick operation on the volume
TEST $CLI volume remove-brick $V0 $H0:$B0/${V0}1 start

## By giving non existing brick for remove-brick status/stop command should
## give error.
TEST ! $CLI volume remove-brick $V0 $H0:$B0/ABCD status
TEST ! $CLI volume remove-brick $V0 $H0:$B0/ABCD stop

## By giving brick which is part of volume for remove-brick status/stop command
## should print statistics of remove-brick operation or stop remove-brick
## operation.
TEST $CLI volume remove-brick $V0 $H0:$B0/${V0}1 status
TEST $CLI volume remove-brick $V0 $H0:$B0/${V0}1 stop

cleanup;