summaryrefslogtreecommitdiffstats
path: root/tests/bugs/glusterd
diff options
context:
space:
mode:
Diffstat (limited to 'tests/bugs/glusterd')
-rw-r--r--tests/bugs/glusterd/bug-1094119-remove-replace-brick-support-from-glusterd.t30
-rwxr-xr-xtests/bugs/glusterd/bug-1095097.t2
-rwxr-xr-xtests/bugs/glusterd/bug-857330/normal.t14
-rwxr-xr-xtests/bugs/glusterd/bug-857330/xml.t24
4 files changed, 32 insertions, 38 deletions
diff --git a/tests/bugs/glusterd/bug-1094119-remove-replace-brick-support-from-glusterd.t b/tests/bugs/glusterd/bug-1094119-remove-replace-brick-support-from-glusterd.t
new file mode 100644
index 0000000..43acfcf
--- /dev/null
+++ b/tests/bugs/glusterd/bug-1094119-remove-replace-brick-support-from-glusterd.t
@@ -0,0 +1,30 @@
+#!/bin/bash
+
+## Test case for BZ: 1094119 Remove replace-brick support from gluster
+
+. $(dirname $0)/../../include.rc
+. $(dirname $0)/../../volume.rc
+
+cleanup;
+
+# Start glusterd
+TEST glusterd
+TEST pidof glusterd
+
+## Lets create and start volume
+TEST $CLI volume create $V0 $H0:$B0/brick1 $H0:$B0/brick2
+TEST $CLI volume start $V0
+
+## Now with this patch replace-brick only accept following commad
+## volume replace-brick <VOLNAME> <SOURCE-BRICK> <NEW-BRICK> {commit force}
+## Apart form this replace brick command will failed.
+
+TEST ! $CLI volume replace-brick $V0 $H0:$B0/brick1 $H0:$B0/brick3 start
+TEST ! $CLI volume replace-brick $V0 $H0:$B0/brick1 $H0:$B0/brick3 status
+TEST ! $CLI volume replace-brick $V0 $H0:$B0/brick1 $H0:$B0/brick3 abort
+
+
+## replace-brick commit force command should success
+TEST $CLI volume replace-brick $V0 $H0:$B0/brick1 $H0:$B0/brick3 commit force
+
+cleanup;
diff --git a/tests/bugs/glusterd/bug-1095097.t b/tests/bugs/glusterd/bug-1095097.t
index 0fe29f0..0a616f7 100755
--- a/tests/bugs/glusterd/bug-1095097.t
+++ b/tests/bugs/glusterd/bug-1095097.t
@@ -15,7 +15,5 @@ EXPECT 'Started' volinfo_field $V0 'Status';
TEST $CLI volume profile $V0 start
TEST $CLI volume profile $V0 info
-TEST $CLI volume replace-brick $V0 $H0:$B0/brick1 $H0:$B0/brick2 start
-TEST $CLI volume replace-brick $V0 $H0:$B0/brick1 $H0:$B0/brick2 status
cleanup;
diff --git a/tests/bugs/glusterd/bug-857330/normal.t b/tests/bugs/glusterd/bug-857330/normal.t
index 02018f2..6377b59 100755
--- a/tests/bugs/glusterd/bug-857330/normal.t
+++ b/tests/bugs/glusterd/bug-857330/normal.t
@@ -41,19 +41,7 @@ EXPECT_WITHIN 300 $PATTERN get-task-status
###################
REP_BRICK_PAIR="$H0:$B0/${V0}2 $H0:$B0/${V0}3"
-COMMAND="volume replace-brick $V0 $REP_BRICK_PAIR start"
-PATTERN="ID:"
-TEST check-and-store-task-id
-
-COMMAND="volume status $V0"
-PATTERN="ID"
-EXPECT $TASK_ID get-task-id
-
-COMMAND="volume replace-brick $V0 $REP_BRICK_PAIR status"
-PATTERN="complete"
-EXPECT_WITHIN 300 $PATTERN get-task-status
-
-TEST $CLI volume replace-brick $V0 $REP_BRICK_PAIR commit;
+TEST $CLI volume replace-brick $V0 $REP_BRICK_PAIR commit force;
##################
## Remove-brick ##
diff --git a/tests/bugs/glusterd/bug-857330/xml.t b/tests/bugs/glusterd/bug-857330/xml.t
index 3aec3b8..7d04fe1 100755
--- a/tests/bugs/glusterd/bug-857330/xml.t
+++ b/tests/bugs/glusterd/bug-857330/xml.t
@@ -47,29 +47,7 @@ EXPECT_WITHIN 300 $PATTERN get-task-status
###################
## Replace-brick ##
###################
-REP_BRICK_PAIR="$H0:$B0/${V0}2 $H0:$B0/${V0}3"
-
-COMMAND="volume replace-brick $V0 $REP_BRICK_PAIR start"
-PATTERN="task-id"
-TEST check-and-store-task-id-xml
-
-COMMAND="volume status $V0"
-PATTERN="id"
-EXPECT $TASK_ID get-task-id-xml
-
-COMMAND="volume replace-brick $V0 $REP_BRICK_PAIR status"
-PATTERN="task-id"
-EXPECT $TASK_ID get-task-id-xml
-
-## TODO: Add more tests for replace-brick pause|abort
-
-COMMAND="volume replace-brick $V0 $REP_BRICK_PAIR status"
-PATTERN="complete"
-EXPECT_WITHIN 300 $PATTERN get-task-status
-
-COMMAND="volume replace-brick $V0 $REP_BRICK_PAIR commit"
-PATTERN="task-id"
-EXPECT $TASK_ID get-task-id-xml
+TEST $CLI volume replace-brick $V0 $H0:$B0/${V0}2 $H0:$B0/${V0}3 commit force
##################
## Remove-brick ##