diff options
Diffstat (limited to 'tests/bugs')
-rw-r--r-- | tests/bugs/distribute/bug-1122443.t | 3 | ||||
-rw-r--r-- | tests/bugs/glusterd/bug-1120647.t | 3 | ||||
-rw-r--r-- | tests/bugs/glusterd/bug-1121584-brick-existing-validation-for-remove-brick-status-stop.t | 34 |
3 files changed, 38 insertions, 2 deletions
diff --git a/tests/bugs/distribute/bug-1122443.t b/tests/bugs/distribute/bug-1122443.t index 3e2455e6382..d944a066eba 100644 --- a/tests/bugs/distribute/bug-1122443.t +++ b/tests/bugs/distribute/bug-1122443.t @@ -1,6 +1,7 @@ #!/bin/bash . $(dirname $0)/../../include.rc +. $(dirname $0)/../../volume.rc . $(dirname $0)/../../dht.rc make_files() { @@ -46,7 +47,7 @@ BEFORE="$(stat -c %n:%Y $M0/subdir/* | tr '\n' ',')" # Migrate brick TEST $CLI volume add-brick $V0 $H0:$B0/${V0}1 TEST $CLI volume remove-brick $V0 $H0:$B0/${V0}0 start -EXPECT_WITHIN $REBALANCE_TIMEOUT "0" remove_brick_completed +EXPECT_WITHIN 10 "completed" remove_brick_status_completed_field "$V0 $H0:$B0/${V0}0" TEST $CLI volume remove-brick $V0 $H0:$B0/${V0}0 commit # Get mtime after migration diff --git a/tests/bugs/glusterd/bug-1120647.t b/tests/bugs/glusterd/bug-1120647.t index 0223f460398..90d069ca502 100644 --- a/tests/bugs/glusterd/bug-1120647.t +++ b/tests/bugs/glusterd/bug-1120647.t @@ -10,7 +10,8 @@ TEST pidof glusterd TEST $CLI volume create $V0 replica 2 $H0:$B0/brick{1..4} TEST $CLI volume start $V0 TEST $CLI volume remove-brick $V0 $H0:$B0/brick{3..4} start -EXPECT_WITHIN 10 "completed" remove_brick_status_completed_field "$V0 $H0:$B0/brick{3..4}" +EXPECT_WITHIN 10 "completed" remove_brick_status_completed_field "$V0 $H0:$B0/brick3" +EXPECT_WITHIN 10 "completed" remove_brick_status_completed_field "$V0 $H0:$B0/brick4" TEST $CLI volume remove-brick $V0 $H0:$B0/brick{3..4} commit TEST $CLI volume remove-brick $V0 replica 1 $H0:$B0/brick2 force diff --git a/tests/bugs/glusterd/bug-1121584-brick-existing-validation-for-remove-brick-status-stop.t b/tests/bugs/glusterd/bug-1121584-brick-existing-validation-for-remove-brick-status-stop.t new file mode 100644 index 00000000000..de80afcc2eb --- /dev/null +++ b/tests/bugs/glusterd/bug-1121584-brick-existing-validation-for-remove-brick-status-stop.t @@ -0,0 +1,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; |