summaryrefslogtreecommitdiffstats
path: root/tests/volume.rc
diff options
context:
space:
mode:
authorPranith Kumar K <pkarampu@redhat.com>2013-01-29 22:58:17 +0530
committerAnand Avati <avati@redhat.com>2013-02-03 11:44:13 -0800
commite4811fd339dc6c77fb81c1bef3466a521c8c134b (patch)
tree80879b45c417c5a31172bae98e7ba4f356d66614 /tests/volume.rc
parentf0724402d19e339ab58680d6135a91801606f4d0 (diff)
Tests: util to check if replace brick completed
Change-Id: I7748395395454765a35e34611d11f58dd4ef3efb BUG: 857549 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/4450 Reviewed-by: Anand Avati <avati@redhat.com> Tested-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'tests/volume.rc')
-rw-r--r--tests/volume.rc14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/volume.rc b/tests/volume.rc
index 2a2b32744ac..935e503908f 100644
--- a/tests/volume.rc
+++ b/tests/volume.rc
@@ -168,3 +168,17 @@ function gf_rm_file_and_gfid_link {
rm -f $(gf_get_gfid_backend_file_path $brickpath $filepath_in_brick)
rm -f "$brickpath/$filepath_in_brick"
}
+
+
+function gd_is_replace_brick_completed {
+ local host=$1
+ local vol=$2
+ local src_brick=$3
+ local dst_brick=$4
+ $CLI volume replace-brick $vol $src_brick $dst_brick status | grep -i "Migration complete"
+ if [ $? -eq 0 ]; then
+ echo "Y"
+ else
+ echo "N"
+ fi
+}