diff -r 27985062cd2c -r e1a85fbf68f9 test/bin-test/test-dav-sync-push1.sh --- a/test/bin-test/test-dav-sync-push1.sh Tue Aug 13 20:23:23 2019 +0200 +++ b/test/bin-test/test-dav-sync-push1.sh Wed Aug 14 21:13:28 2019 +0200 @@ -239,22 +239,41 @@ 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 empty dir +# expected result: empty dir deleted on server + +rm -Rf tmp-sync/test1a/dir1 + +dav_sync_push test1a + +check_tmpout "0 conflicts" "push10: wrong conflict counter" +check_tmpout "0 errors" "push10: wrong error counter" + +dav info dav-test-repo/sync/test1a/dir1 > /dev/null 2>&1 +if [ $? -eq 0 ]; then + echo "push 10: collection not deleted" + exit 2 +fi + +# 11. test # delete everything # collection is empty + rm -Rf tmp-sync/test1a/* -dav_sync_push test1a "push 10 failed" + +dav_sync_push test1a "push 11 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" + echo "push 11: dav list failed" exit 2 fi if [ "$OUT" != "0" ]; then - echo "push 10: dav-test-repo/sync/test1/ not empty" + echo "push 11: dav-test-repo/sync/test1/ not empty" exit 2 fi