diff options
author | hari gowtham <hgowtham@redhat.com> | 2017-11-29 11:23:40 +0530 |
---|---|---|
committer | Atin Mukherjee <amukherj@redhat.com> | 2017-11-30 10:15:10 +0000 |
commit | eb013e4c180014238c95d58f67246ff19b40c437 (patch) | |
tree | a4eee4844ba5720d6df0c28b649bcf4d3759633c /tests/basic | |
parent | 5b4b25c697f93d3dfe352013a442f2ec73fd3b8b (diff) |
tests: fix for bug-1260185-donot-allow-detach-commit-unnecessarily.t failure
problem: detach commit was issues before detach start was completed.
fix: wait for detach start to finish and then detach commit.
Change-Id: I639962be6de6dbd1512f0a5617050d1e6872eac8
BUG: 1517961
Signed-off-by: hari gowtham <hgowtham@redhat.com>
Diffstat (limited to 'tests/basic')
-rw-r--r-- | tests/basic/tier/bug-1260185-donot-allow-detach-commit-unnecessarily.t | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/tests/basic/tier/bug-1260185-donot-allow-detach-commit-unnecessarily.t b/tests/basic/tier/bug-1260185-donot-allow-detach-commit-unnecessarily.t new file mode 100644 index 00000000000..6efbe32f121 --- /dev/null +++ b/tests/basic/tier/bug-1260185-donot-allow-detach-commit-unnecessarily.t @@ -0,0 +1,47 @@ +#!/bin/bash + +## Test case for BZ: 1260185 +## Do not allow detach-tier commit without "force" option or without +## user have not started "detach-tier start" operation + +. $(dirname $0)/../../include.rc +. $(dirname $0)/../../volume.rc +. $(dirname $0)/../../cluster.rc +. $(dirname $0)/../../tier.rc + +cleanup; + +## Start glusterd +TEST glusterd; +TEST pidof glusterd; + +## Lets create and start the volume +TEST $CLI volume create $V0 $H0:$B0/${V0}{1..2} +TEST $CLI volume start $V0 + +## Perform attach-tier operation on volume $V0 +TEST $CLI volume tier $V0 attach $H0:$B0/${V0}{3..4} + +## detach-tier commit operation without force option on volume $V0 +## should not succeed +TEST ! $CLI --mode=script volume tier $V0 detach commit + +## detach-tier commit operation with force option on volume $V0 +## should succeed +TEST $CLI volume tier $V0 detach force + +sleep 3 + +## Again performing attach-tier operation on volume $V0 +TEST $CLI volume tier $V0 attach $H0:$B0/${V0}{5..6} + +## Do detach-tier start on volume $V0 +TEST $CLI volume tier $V0 detach start + +## Now detach-tier commit on volume $V0 should succeed. +## wait for the detach to complete +EXPECT_WITHIN $PROCESS_UP_TIMEOUT "1" tier_detach_commit_for_single_node + +cleanup; + +#G_TESTDEF_TEST_STATUS_NETBSD7=KNOWN_ISSUE,BUG=1517961 |