summaryrefslogtreecommitdiffstats
path: root/tests/00-geo-rep
diff options
context:
space:
mode:
authorShwetha K Acharya <sacharya@redhat.com>2019-07-02 15:00:25 +0530
committerSunny Kumar <sunkumar@redhat.com>2019-07-22 06:44:49 +0000
commit74f124619a71df9bdc5ae9fbc07bc19db05bc1d2 (patch)
tree62defe3c5ccee4eccf3a83149c1c4534751aae7b /tests/00-geo-rep
parent41f72ac9453c24bea85709203948c41c5772edec (diff)
geo-rep: Test case for upgrading config file
Added test case for the patch https://review.gluster.org/#/c/glusterfs/+/22894/4 Also updated if else structure in gsyncdconfig.py to avoid repeated occurance of values in new configfile. fixes: bz#1707731 Change-Id: If97e1d37ac52dbd17d47be6cb659fc5a3ccab6d7 Signed-off-by: Shwetha K Acharya <sacharya@redhat.com>
Diffstat (limited to 'tests/00-geo-rep')
-rw-r--r--tests/00-geo-rep/georep-basic-dr-rsync.t13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/00-geo-rep/georep-basic-dr-rsync.t b/tests/00-geo-rep/georep-basic-dr-rsync.t
index a54bc62..b6fbf18 100644
--- a/tests/00-geo-rep/georep-basic-dr-rsync.t
+++ b/tests/00-geo-rep/georep-basic-dr-rsync.t
@@ -215,6 +215,19 @@ EXPECT_WITHIN $GEO_REP_TIMEOUT 0 verify_rename_with_existing_destination ${slave
#Verify arequal for whole volume
EXPECT_WITHIN $GEO_REP_TIMEOUT "x0" arequal_checksum ${master_mnt} ${slave_mnt}
+#Test config upgrade BUG: 1707731
+config_file=$GLUSTERD_WORKDIR/geo-replication/${GMV0}_${SH0}_${GSV0}/gsyncd.conf
+cat >> $config_file<<EOL
+[peers ${GMV0} ${GSV0}]
+use_tarssh = true
+timeout = 1
+EOL
+TEST $GEOREP_CLI $master $slave stop
+TEST $GEOREP_CLI $master $slave start
+#verify that the config file is updated
+EXPECT "1" echo $(grep -Fc "vars" $config_file)
+EXPECT "1" echo $(grep -Fc "sync-method = tarssh" $config_file)
+EXPECT "1" echo $(grep -Fc "slave-timeout = 1" $config_file)
#Stop Geo-rep
TEST $GEOREP_CLI $master $slave stop