diff options
authorSunny Kumar <>2020-04-24 15:17:12 +0100
committerSunny Kumar <>2020-05-02 11:24:39 +0100
commitc8d733c3ed39f297d0f56052c6dc4d02aecdbc4d (patch)
parent11ea746d0813e9599c2c8d0c36fcd7be5d25ac65 (diff)
test: improve geo-rep non root test
Make sure bricks are up before mounting volume. Also made sure that mount is available before creating test data. Change-Id: I4915b837df46e43be5678dac8ae5602021c52685 Updates: #1197 Signed-off-by: Sunny Kumar <>
2 files changed, 23 insertions, 9 deletions
diff --git a/tests/00-geo-rep/00-georep-verify-non-root-setup.t b/tests/00-geo-rep/00-georep-verify-non-root-setup.t
index 27ed827..a55fd3e 100644
--- a/tests/00-geo-rep/00-georep-verify-non-root-setup.t
+++ b/tests/00-geo-rep/00-georep-verify-non-root-setup.t
@@ -5,7 +5,7 @@
. $(dirname $0)/../geo-rep.rc
. $(dirname $0)/../env.rc
### Basic Non-root geo-rep setup test with Distribute Replicate volumes
@@ -144,12 +144,15 @@ TEST pidof glusterd;
TEST $CLI volume create $META_VOL replica 3 $H0:$B0/${META_VOL}{1,2,3};
TEST $CLI volume start $META_VOL
TEST mkdir -p $META_MNT
TEST glusterfs -s $H0 --volfile-id $META_VOL $META_MNT
##Mount master
TEST glusterfs -s $H0 --volfile-id $GMV0 $M0
##Mount slave
TEST glusterfs -s $H0 --volfile-id $GSV0 $M1
## Check status of mount-broker
@@ -189,6 +192,8 @@ TEST gluster-georep-sshkey generate
TEST $GEOREP_CLI $master $slave_url create push-pem
+#check for session creation
+EXPECT_WITHIN $GEO_REP_TIMEOUT 4 check_status_non_root "Created"
#Config gluster-command-dir
TEST $GEOREP_CLI $master $slave_url config gluster-command-dir ${GLUSTER_CMD_DIR}
@@ -240,21 +245,25 @@ TEST ! $GEOREP_CLI $master $slave_url config ssh-port 22a
TEST $GEOREP_CLI $master $slave config ssh-port 22
#Hybrid directory rename test BZ#1763439
TEST $GEOREP_CLI $master $slave_url config change_detector xsync
-mkdir ${master_mnt}/dir1
-mkdir ${master_mnt}/dir1/dir2
-mkdir ${master_mnt}/dir1/dir3
-mkdir ${master_mnt}/hybrid_d1
+#verify master and slave mount
-EXPECT_WITHIN $GEO_REP_TIMEOUT 0 directory_ok ${slave_mnt}/hybrid_d1
-EXPECT_WITHIN $GEO_REP_TIMEOUT 0 directory_ok ${slave_mnt}/dir1
-EXPECT_WITHIN $GEO_REP_TIMEOUT 0 directory_ok ${slave_mnt}/dir1/dir2
-EXPECT_WITHIN $GEO_REP_TIMEOUT 0 directory_ok ${slave_mnt}/dir1/dir3
+EXPECT_WITHIN $CHECK_MOUNT_TIMEOUT "^1$" check_mounted ${master_mnt}
+EXPECT_WITHIN $CHECK_MOUNT_TIMEOUT "^1$" check_mounted ${slave_mnt}
+#Create test data for hybrid crawl
+TEST mkdir ${master_mnt}/dir1
+TEST mkdir ${master_mnt}/dir1/dir2
+TEST mkdir ${master_mnt}/dir1/dir3
+TEST mkdir ${master_mnt}/hybrid_d1
mv ${master_mnt}/hybrid_d1 ${master_mnt}/hybrid_rn_d1
mv ${master_mnt}/dir1/dir2 ${master_mnt}/rn_dir2
mv ${master_mnt}/dir1/dir3 ${master_mnt}/dir1/rn_dir3
+#Verify hybrid crawl data on slave
+EXPECT_WITHIN $GEO_REP_TIMEOUT 0 directory_ok ${slave_mnt}/dir1
EXPECT_WITHIN $GEO_REP_TIMEOUT 0 directory_ok ${slave_mnt}/hybrid_rn_d1
EXPECT_WITHIN $GEO_REP_TIMEOUT 0 directory_ok ${slave_mnt}/rn_dir2
EXPECT_WITHIN $GEO_REP_TIMEOUT 0 directory_ok ${slave_mnt}/dir1/rn_dir3
diff --git a/tests/geo-rep.rc b/tests/geo-rep.rc
index 84c2c22..9ba4262 100644
--- a/tests/geo-rep.rc
+++ b/tests/geo-rep.rc
@@ -1,4 +1,9 @@
+#check for mount point
+function check_mounted () {
+ df | grep $1 | wc -l
function check_status_num_rows()