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

changeset 771
ffa493657381
parent 770
fcb243cb9950
child 772
ab26daccfb8d
equal deleted inserted replaced
770:fcb243cb9950 771:ffa493657381
107 # add tags 107 # add tags
108 $DAV_SYNC_BIN add-tag -s test4a tmp-sync/test4a/file1 mytag 108 $DAV_SYNC_BIN add-tag -s test4a tmp-sync/test4a/file1 mytag
109 $DAV_SYNC_BIN add-tag -s test4a tmp-sync/test4a/file1 test1 109 $DAV_SYNC_BIN add-tag -s test4a tmp-sync/test4a/file1 test1
110 110
111 # add xattr 111 # add xattr
112 ../../build/xattrtool set tmp-sync/test4a/file1 attr1 testvalue 112 $XATTR set tmp-sync/test4a/file1 attr1 testvalue
113 113
114 # set mtime 114 # set mtime
115 touch -t 01011200 tmp-sync/test4a/file1 115 touch -t 01011200 tmp-sync/test4a/file1
116 116
117 # +x 117 # +x
140 if [ "$OUT" != "file1out" ]; then 140 if [ "$OUT" != "file1out" ]; then
141 echo "test 1: not executable" 141 echo "test 1: not executable"
142 exit 2 142 exit 2
143 fi 143 fi
144 144
145 OUT=`../../build/xattrtool get tmp-sync/test4b/file1 attr1 2> /dev/null` 145 OUT=`$XATTR get tmp-sync/test4b/file1 attr1 2> /dev/null`
146 if [ "$OUT" != "testvalue" ]; then 146 if [ "$OUT" != "testvalue" ]; then
147 echo "test 1: xattr not synced" 147 echo "test 1: xattr not synced"
148 exit 2 148 exit 2
149 fi 149 fi
150 150
273 exit 2 273 exit 2
274 fi 274 fi
275 check_tmpout "mytag" "test 5: tag mytag missing" 275 check_tmpout "mytag" "test 5: tag mytag missing"
276 check_tmpout "test1" "test 5: tag test1 missing" 276 check_tmpout "test1" "test 5: tag test1 missing"
277 277
278 OUT=`../../build/xattrtool get tmp-sync/test4b/move1 attr1 2> /dev/null` 278 OUT=`$XATTR get tmp-sync/test4b/move1 attr1 2> /dev/null`
279 if [ "$OUT" != "testvalue" ]; then 279 if [ "$OUT" != "testvalue" ]; then
280 echo "test 5: xattr not synced" 280 echo "test 5: xattr not synced"
281 exit 2 281 exit 2
282 fi 282 fi
283 283
312 if [ $MTIMEA1 -ne $MTIMEB1 ]; then 312 if [ $MTIMEA1 -ne $MTIMEB1 ]; then
313 echo "test 6: mtime not synced" 313 echo "test 6: mtime not synced"
314 exit 2 314 exit 2
315 fi 315 fi
316 316
317 OUT=`../../build/xattrtool get tmp-sync/test4b/move1 attr1 2> /dev/null` 317 OUT=`$XATTR get tmp-sync/test4b/move1 attr1 2> /dev/null`
318 if [ "$OUT" = "testvalue" ]; then 318 if [ "$OUT" = "testvalue" ]; then
319 echo "test 6: xattr not synced" 319 echo "test 6: xattr not synced"
320 exit 2 320 exit 2
321 fi 321 fi
322 322
346 dav_sync_pull test4b "test 7: pull failed" 346 dav_sync_pull test4b "test 7: pull failed"
347 check_tmpout "0 conflicts" "test 7: wrong conflict counter (pull)" 347 check_tmpout "0 conflicts" "test 7: wrong conflict counter (pull)"
348 check_tmpout "0 errors" "test 7: wrong error counter (pull)" 348 check_tmpout "0 errors" "test 7: wrong error counter (pull)"
349 349
350 # check metadata 350 # check metadata
351 OUT=`../../build/xattrtool get tmp-sync/test4b/newdir1 dirattribute1 2> /dev/null` 351 OUT=`$XATTR get tmp-sync/test4b/newdir1 dirattribute1 2> /dev/null`
352 if [ "$OUT" != "test7attribute" ]; then 352 if [ "$OUT" != "test7attribute" ]; then
353 echo "test 7: xattr 1 not synced" 353 echo "test 7: xattr 1 not synced"
354 exit 2 354 exit 2
355 fi 355 fi
356 OUT=`../../build/xattrtool get tmp-sync/test4b/newdir1 dirattribute2 2> /dev/null` 356 OUT=`$XATTR get tmp-sync/test4b/newdir1 dirattribute2 2> /dev/null`
357 if [ "$OUT" != "directory" ]; then 357 if [ "$OUT" != "directory" ]; then
358 echo "test 7: xattr 1 not synced" 358 echo "test 7: xattr 1 not synced"
359 exit 2 359 exit 2
360 fi 360 fi
361 361
408 check_tmpout "0 conflicts" "test 9: wrong conflict counter (pull)" 408 check_tmpout "0 conflicts" "test 9: wrong conflict counter (pull)"
409 check_tmpout "0 errors" "test 9: wrong error counter (pull)" 409 check_tmpout "0 errors" "test 9: wrong error counter (pull)"
410 check_tmpout "update" "test 9: no mkcol (oull)" 410 check_tmpout "update" "test 9: no mkcol (oull)"
411 411
412 # check metadata 412 # check metadata
413 OUT=`../../build/xattrtool get tmp-sync/test4b/newdir1 dirattribute1 2> /dev/null` 413 OUT=`$XATTR get tmp-sync/test4b/newdir1 dirattribute1 2> /dev/null`
414 if [ "$OUT" != "test9attribute" ]; then 414 if [ "$OUT" != "test9attribute" ]; then
415 echo "test 9: xattr 1 not synced" 415 echo "test 9: xattr 1 not synced"
416 exit 2 416 exit 2
417 fi 417 fi
418 OUT=`../../build/xattrtool get tmp-sync/test4b/newdir1 dirattribute2 2> /dev/null` 418 OUT=`$XATTR get tmp-sync/test4b/newdir1 dirattribute2 2> /dev/null`
419 if [ "$OUT" != "directory" ]; then 419 if [ "$OUT" != "directory" ]; then
420 echo "test 9: xattr 2 not synced" 420 echo "test 9: xattr 2 not synced"
421 exit 2 421 exit 2
422 fi 422 fi
423 OUT=`../../build/xattrtool get tmp-sync/test4b/newdir1 new 2> /dev/null` 423 OUT=`$XATTR get tmp-sync/test4b/newdir1 new 2> /dev/null`
424 if [ "$OUT" != "hello" ]; then 424 if [ "$OUT" != "hello" ]; then
425 echo "test 9: xattr 3 not synced" 425 echo "test 9: xattr 3 not synced"
426 exit 2 426 exit 2
427 fi 427 fi
428 428

mercurial