test/bin-test/test-dav-sync-metadata1.sh

changeset 665
ec8c9201a974
parent 663
888aa263c0f1
child 667
6cdcd3e4e368
equal deleted inserted replaced
664:d066a89d5e87 665:ec8c9201a974
409 if [ "$LN" != "1" ]; then 409 if [ "$LN" != "1" ]; then
410 echo "test 9: wrong output (pull)" 410 echo "test 9: wrong output (pull)"
411 exit 2 411 exit 2
412 fi 412 fi
413 413
414 414 # ----------------------------------------------------------------------------
415 415 # test 10: add tags to files and sync
416 # expected result: tags synced
417
418 touch tmp-sync/test4a/file1
419 echo "test10-mod1" >> tmp-sync/test4a/dir1/file2
420 echo "test10-new" >> tmp-sync/test4a/file4
421
422 $DAV_SYNC_BIN add-tag -s test4a tmp-sync/test4a/file1 test
423 if [ $? -ne 0 ]; then
424 echo "test 10: add-tag failed"
425 exit 2
426 fi
427 $DAV_SYNC_BIN add-tag -s test4a tmp-sync/test4a/dir1/file2 test
428 $DAV_SYNC_BIN add-tag -s test4a tmp-sync/test4a/file4 test
429
430 dav_sync_push test4a "test 10: push failed"
431 check_tmpout "0 conflicts" "test 10: wrong conflict counter (push)"
432 check_tmpout "0 errors" "test 10: wrong error counter (push)"
433 check_tmpout "put: /file4" "test 10: file 4 not pushed"
434 check_tmpout "put: /dir1/file2" "test 10: file 2 not pushed"
435 check_tmpout "update: /file1" "test 10: file 1 not pushed"
436
437 dav_sync_pull test4b "test 10: pull failed"
438 check_tmpout "0 conflicts" "test 10: wrong conflict counter (pull)"
439 check_tmpout "0 errors" "test 10: wrong error counter (pull)"
440 check_tmpout "get: /file4" "test 10: file 4 not pulled"
441 check_tmpout "get: /dir1/file2" "test 10: file 2 not pulled"
442 check_tmpout "update: /file1" "test 10: file 1 not pulled"
443
444 $DAV_SYNC_BIN list-tags -s test4b tmp-sync/test4b/file1 > tmp-sync/out.txt
445 check_tmpout "test" "test 10: file1 missing tag"
446 $DAV_SYNC_BIN list-tags -s test4b tmp-sync/test4b/file4 > tmp-sync/out.txt
447 check_tmpout "test" "test 10: file3 missing tag"
448 $DAV_SYNC_BIN list-tags -s test4b tmp-sync/test4b/dir1/file2 > tmp-sync/out.txt
449 check_tmpout "test" "test 10: file2 missing tag"
450

mercurial