# HG changeset patch # User Olaf Wintermann # Date 1565506738 -7200 # Node ID a93374f1849aaec286a8ea216b382fdb02b5cf55 # Parent 1d20a6cab2e5839b208e66d0f1ca0723d78218ba add additional dav-sync push test to check if deleting all files will result in an empty collection diff -r 1d20a6cab2e5 -r a93374f1849a test/bin-test/test-dav-sync-push1.sh --- 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 - - -