summaryrefslogtreecommitdiffstats
path: root/tests/00-geo-rep
diff options
context:
space:
mode:
authorKotresh HR <khiremat@redhat.com>2018-06-27 08:26:44 -0400
committerNigel Babu <nigelb@redhat.com>2018-07-02 06:09:10 +0000
commit957e2963cfd960caa49edc0e6aba738167b33ec5 (patch)
treee47ce2db4ced72ba271722363ec468d4feaab905 /tests/00-geo-rep
parentb3c2116d99a5c049e4ee0f88f35440258b49496e (diff)
tests/geo-rep: Add symlink rename test case
Added a test case of symlink rename and directory creation with the name same as original symlink file. Also fixed few other issues in geo-rep.rc fixes: bz#1595726 Change-Id: I8e6acd3e742f3a0104cd37b87d1c0e0c902679b5 Signed-off-by: Kotresh HR <khiremat@redhat.com>
Diffstat (limited to 'tests/00-geo-rep')
-rw-r--r--tests/00-geo-rep/georep-basic-dr-rsync.t20
-rw-r--r--tests/00-geo-rep/georep-basic-dr-tarssh.t19
2 files changed, 38 insertions, 1 deletions
diff --git a/tests/00-geo-rep/georep-basic-dr-rsync.t b/tests/00-geo-rep/georep-basic-dr-rsync.t
index 6835066..661e734 100644
--- a/tests/00-geo-rep/georep-basic-dr-rsync.t
+++ b/tests/00-geo-rep/georep-basic-dr-rsync.t
@@ -3,7 +3,6 @@
. $(dirname $0)/../include.rc
. $(dirname $0)/../volume.rc
. $(dirname $0)/../geo-rep.rc
-. $(dirname $0)/../env.rc
AREQUAL_PATH=$(dirname $0)/../utils
test "`uname -s`" != "Linux" && {
@@ -157,6 +156,25 @@ EXPECT_WITHIN $GEO_REP_TIMEOUT 0 hardlink_rename_ok ${slave_mnt}/hardlink_rename
#Stop Geo-rep
TEST $GEOREP_CLI $master $slave stop
+#Symlink testcase: Rename symlink and create dir with same name
+TEST mkdir ${master_mnt}/symlink_test1
+TEST touch ${master_mnt}/symlink_test1/file1
+TEST ln -s "./file1" ${master_mnt}/symlink_test1/sym_link
+TEST mv ${master_mnt}/symlink_test1/sym_link ${master_mnt}/symlink_test1/rn_sym_link
+TEST mkdir ${master_mnt}/symlink_test1/sym_link
+
+#Start Geo-rep
+TEST $GEOREP_CLI $master $slave start
+
+#Check for hardlink rename case. It should not create src file again on
+# changelog reprocessing. Refer BUG1296174
+EXPECT_WITHIN $GEO_REP_TIMEOUT 0 hardlink_rename_ok ${slave_mnt}/hardlink_rename_test_file
+#symlink rename mkdir
+EXPECT_WITHIN $GEO_REP_TIMEOUT 0 symlink_rename_mkdir_ok ${slave_mnt}/symlink_test1
+
+#Stop Geo-rep
+TEST $GEOREP_CLI $master $slave stop
+
#Delete Geo-rep
TEST $GEOREP_CLI $master $slave delete
diff --git a/tests/00-geo-rep/georep-basic-dr-tarssh.t b/tests/00-geo-rep/georep-basic-dr-tarssh.t
index 81b2a0b..4a6e910 100644
--- a/tests/00-geo-rep/georep-basic-dr-tarssh.t
+++ b/tests/00-geo-rep/georep-basic-dr-tarssh.t
@@ -159,6 +159,25 @@ EXPECT_WITHIN $GEO_REP_TIMEOUT 0 hardlink_rename_ok ${slave_mnt}/hardlink_rename
#Stop Geo-rep
TEST $GEOREP_CLI $master $slave stop
+#Symlink testcase: Rename symlink and create dir with same name
+TEST mkdir ${master_mnt}/symlink_test1
+TEST touch ${master_mnt}/symlink_test1/file1
+TEST ln -s "./file1" ${master_mnt}/symlink_test1/sym_link
+TEST mv ${master_mnt}/symlink_test1/sym_link ${master_mnt}/symlink_test1/rn_sym_link
+TEST mkdir ${master_mnt}/symlink_test1/sym_link
+
+#Start Geo-rep
+TEST $GEOREP_CLI $master $slave start
+
+#Check for hardlink rename case. It should not create src file again on
+# changelog reprocessing. Refer BUG1296174
+EXPECT_WITHIN $GEO_REP_TIMEOUT 0 hardlink_rename_ok ${slave_mnt}/hardlink_rename_test_file
+#symlink rename mkdir
+EXPECT_WITHIN $GEO_REP_TIMEOUT 0 symlink_rename_mkdir_ok ${slave_mnt}/symlink_test1
+
+#Stop Geo-rep
+TEST $GEOREP_CLI $master $slave stop
+
#Delete Geo-rep
TEST $GEOREP_CLI $master $slave delete