add additional dav-sync push test to check if deleting all files will result in an empty collection

Sun, 11 Aug 2019 08:58:58 +0200

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Sun, 11 Aug 2019 08:58:58 +0200
changeset 620
a93374f1849a
parent 619
1d20a6cab2e5
child 621
06f9fddc82a1

add additional dav-sync push test to check if deleting all files will result in an empty collection

test/bin-test/test-dav-sync-push1.sh file | annotate | diff | comparison | revisions
--- a/test/bin-test/test-dav-sync-push1.sh	Sun Aug 11 08:24:10 2019 +0200
+++ b/test/bin-test/test-dav-sync-push1.sh	Sun Aug 11 08:58:58 2019 +0200
@@ -234,24 +234,26 @@
 check_tmpout "0 conflicts" "push8: wrong conflict counter"
 check_tmpout "0 errors" "push8: wrong error counter"
 
-OUT=`grep "delete: /dir_a/" tmp-sync/out.txt`
-if [ $? -ne 0 ];
-then
-	echo "missing: delete /dir_a/"
+check_tmpout "delete: /dir_a/" "missing: delete /dir_a/"
+check_tmpout "delete: /dir_b/i/t6f2-i" "missing: delete: /dir_b/i/t6f2-i"
+check_tmpout "delete: /dir_b/1/2/3/4/5/6/7/8/t6f1-8" "missing: delete: /dir_b/1/2/3/4/5/6/7/8/t6f1-8"
+
+# 10. test
+# delete everything
+# collection is empty
+rm -Rf tmp-sync/test1a/*
+dav_sync_push test1a "push 10 failed"
+
+check_tmpout "0 conflicts" "push10: wrong conflict counter"
+check_tmpout "0 errors" "push10: wrong error counter"
+
+OUT=`dav list dav-test-repo/sync/test1/ | wc -l`
+if [ $? -ne 0 ]; then
+	echo "push 10: dav list failed"
 	exit 2
 fi
-OUT=`grep "delete: /dir_b/i/t6f2-i" tmp-sync/out.txt`
-if [ $? -ne 0 ];
-then
-	echo "missing: delete: /dir_b/i/t6f2-i"
+if [ "$OUT" != "0" ];
+then	
+	echo "push 10: dav-test-repo/sync/test1/ not empty"
 	exit 2
 fi
-OUT=`grep "delete: /dir_b/1/2/3/4/5/6/7/8/t6f1-8" tmp-sync/out.txt`
-if [ $? -ne 0 ];
-then
-	echo "missing: delete: /dir_b/1/2/3/4/5/6/7/8/t6f1-8"
-	exit 2
-fi
-
-
-

mercurial