diff options
author | Sunny Kumar <sunkumar@redhat.com> | 2020-04-24 15:17:12 +0100 |
---|---|---|
committer | Sunny Kumar <sunkumar@redhat.com> | 2020-05-02 11:24:39 +0100 |
commit | c8d733c3ed39f297d0f56052c6dc4d02aecdbc4d (patch) | |
tree | 79a023fab10a93b56f5e7c3488c7d989601cdcec /tests/00-geo-rep | |
parent | 11ea746d0813e9599c2c8d0c36fcd7be5d25ac65 (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 <sunkumar@redhat.com>
Diffstat (limited to 'tests/00-geo-rep')
-rw-r--r-- | tests/00-geo-rep/00-georep-verify-non-root-setup.t | 27 |
1 files changed, 18 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 27ed82732c9..a55fd3e5e6a 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 -SCRIPT_TIMEOUT=500 +SCRIPT_TIMEOUT=600 ### 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 +EXPECT_WITHIN ${PROCESS_UP_TIMEOUT} "3" brick_count ${META_VOL} TEST glusterfs -s $H0 --volfile-id $META_VOL $META_MNT ##Mount master +EXPECT_WITHIN ${PROCESS_UP_TIMEOUT} "4" brick_count $GMV0 TEST glusterfs -s $H0 --volfile-id $GMV0 $M0 ##Mount slave +EXPECT_WITHIN ${PROCESS_UP_TIMEOUT} "4" brick_count $GSV0 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 |