# HG changeset patch # User Olaf Wintermann # Date 1571553011 -7200 # Node ID ec8c9201a974d2684174683e5790bbc85148c4c9 # Parent d066a89d5e87e6090f9cc1caf5fa3a2a760cc002 add first tag test diff -r d066a89d5e87 -r ec8c9201a974 test/bin-test/test-dav-sync-metadata1.sh --- a/test/bin-test/test-dav-sync-metadata1.sh Sun Oct 20 08:20:06 2019 +0200 +++ b/test/bin-test/test-dav-sync-metadata1.sh Sun Oct 20 08:30:11 2019 +0200 @@ -411,5 +411,40 @@ exit 2 fi +# ---------------------------------------------------------------------------- +# test 10: add tags to files and sync +# expected result: tags synced +touch tmp-sync/test4a/file1 +echo "test10-mod1" >> tmp-sync/test4a/dir1/file2 +echo "test10-new" >> tmp-sync/test4a/file4 +$DAV_SYNC_BIN add-tag -s test4a tmp-sync/test4a/file1 test +if [ $? -ne 0 ]; then + echo "test 10: add-tag failed" + exit 2 +fi +$DAV_SYNC_BIN add-tag -s test4a tmp-sync/test4a/dir1/file2 test +$DAV_SYNC_BIN add-tag -s test4a tmp-sync/test4a/file4 test + +dav_sync_push test4a "test 10: push failed" +check_tmpout "0 conflicts" "test 10: wrong conflict counter (push)" +check_tmpout "0 errors" "test 10: wrong error counter (push)" +check_tmpout "put: /file4" "test 10: file 4 not pushed" +check_tmpout "put: /dir1/file2" "test 10: file 2 not pushed" +check_tmpout "update: /file1" "test 10: file 1 not pushed" + +dav_sync_pull test4b "test 10: pull failed" +check_tmpout "0 conflicts" "test 10: wrong conflict counter (pull)" +check_tmpout "0 errors" "test 10: wrong error counter (pull)" +check_tmpout "get: /file4" "test 10: file 4 not pulled" +check_tmpout "get: /dir1/file2" "test 10: file 2 not pulled" +check_tmpout "update: /file1" "test 10: file 1 not pulled" + +$DAV_SYNC_BIN list-tags -s test4b tmp-sync/test4b/file1 > tmp-sync/out.txt +check_tmpout "test" "test 10: file1 missing tag" +$DAV_SYNC_BIN list-tags -s test4b tmp-sync/test4b/file4 > tmp-sync/out.txt +check_tmpout "test" "test 10: file3 missing tag" +$DAV_SYNC_BIN list-tags -s test4b tmp-sync/test4b/dir1/file2 > tmp-sync/out.txt +check_tmpout "test" "test 10: file2 missing tag" +