diff options
author | Pranith Kumar K <pkarampu@redhat.com> | 2013-01-22 14:46:48 +0530 |
---|---|---|
committer | Anand Avati <avati@redhat.com> | 2013-01-22 19:44:03 -0800 |
commit | 2c65cdfd6484dc073241c46de041da2ab380bc09 (patch) | |
tree | faac475f0705111ac3c00972a0fefb96e9a54a39 /tests/volume.rc | |
parent | e908659dfee988799deee888259ca54a0a9f6e31 (diff) |
Tests: Add utils to get index-path, index-count
Change-Id: I6eebae4b419f92212a30ce5e0dfc889a4541a4ce
BUG: 861015
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/4408
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Diffstat (limited to 'tests/volume.rc')
-rw-r--r-- | tests/volume.rc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/volume.rc b/tests/volume.rc index 2cae421ae5b..9ecb24d405c 100644 --- a/tests/volume.rc +++ b/tests/volume.rc @@ -114,3 +114,13 @@ function afr_get_pending_heal_count { local vol=$1 gluster volume heal $vol info | grep "Number of entries" | awk '{ sum+=$4} END {print sum}' } + +function afr_get_index_path { + local brick_path=$1 + echo "$brick_path/.glusterfs/indices/xattrop" +} + +function afr_get_num_indices_in_brick { + local brick_path=$1 + echo $(ls $(afr_get_index_path $brick_path) | grep -v xattrop | wc -l) +} |