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

changeset 812
5fe4453fc025
parent 763
fc24d1d1d695
equal deleted inserted replaced
811:9385330bdd38 812:5fe4453fc025
172 if [ $MTIMEA2 != $MTIMEB2 ]; then 172 if [ $MTIMEA2 != $MTIMEB2 ]; then
173 echo "file2: mtime not synced" 173 echo "file2: mtime not synced"
174 exit 2 174 exit 2
175 fi 175 fi
176 176
177
178 # ---------------------------------------------------------------------------- 177 # ----------------------------------------------------------------------------
179 # test 3: modify file1 and push/pull 178 # test 3: modify file1 and push/pull
180 # expected result: file content synced, mtime also synced 179 # expected result: file content synced, mtime also synced
181 180
182 echo "test3-mod1" >> tmp-sync/test4a/file1 181 echo "test3-mod1" >> tmp-sync/test4a/file1
196 195
197 if [ $MTIMEA1 != $MTIMEB1 ]; then 196 if [ $MTIMEA1 != $MTIMEB1 ]; then
198 echo "file1: mtime not synced" 197 echo "file1: mtime not synced"
199 exit 2 198 exit 2
200 fi 199 fi
201
202 200
203 # ---------------------------------------------------------------------------- 201 # ----------------------------------------------------------------------------
204 # test 4: add xattr to files, push/pull 202 # test 4: add xattr to files, push/pull
205 # expected result: xattr synced 203 # expected result: xattr synced
206 204
272 if [ "$FILE3_ATTR0" != "helloworld" ]; then 270 if [ "$FILE3_ATTR0" != "helloworld" ]; then
273 echo "file3 attr has wrong value: $FILE3_ATTR0" 271 echo "file3 attr has wrong value: $FILE3_ATTR0"
274 exit 2 272 exit 2
275 fi 273 fi
276 274
277
278 # ---------------------------------------------------------------------------- 275 # ----------------------------------------------------------------------------
279 # test 5: do nothing, push/pull 276 # test 5: do nothing, push/pull
280 # expected result: no update, no files pushed/pulled 277 # expected result: no update, no files pushed/pulled
281 278
282 sleep 2 279 sleep 2
294 dav_sync_pull test4b "test 5: pull failed" 291 dav_sync_pull test4b "test 5: pull failed"
295 check_tmpout "0 files pulled" "test 5: wrong pull counter" 292 check_tmpout "0 files pulled" "test 5: wrong pull counter"
296 check_tmpout "0 conflicts" "test 5: wrong conflict counter (pull)" 293 check_tmpout "0 conflicts" "test 5: wrong conflict counter (pull)"
297 check_tmpout "0 errors" "test 5: wrong error counter (pull)" 294 check_tmpout "0 errors" "test 5: wrong error counter (pull)"
298 LN=`cat tmp-sync/out.txt | wc -l` 295 LN=`cat tmp-sync/out.txt | wc -l`
296
299 if [ $LN -ne 1 ]; then 297 if [ $LN -ne 1 ]; then
300 echo "test 5: wrong output (pull)" 298 echo "test 5: wrong output (pull)"
301 exit 2 299 exit 2
302 fi 300 fi
303
304 301
305 # ---------------------------------------------------------------------------- 302 # ----------------------------------------------------------------------------
306 # test 6: add additional xattr to files, push/pull 303 # test 6: add additional xattr to files, push/pull
307 # expected result: xattr synced 304 # expected result: xattr synced
308 305
498 dav_sync_pull test4a "test 12: pull failed" 495 dav_sync_pull test4a "test 12: pull failed"
499 check_tmpout "0 files pulled" "test 12: wrong pull counter" 496 check_tmpout "0 files pulled" "test 12: wrong pull counter"
500 check_tmpout "0 conflicts" "test 12: wrong conflict counter (pull)" 497 check_tmpout "0 conflicts" "test 12: wrong conflict counter (pull)"
501 check_tmpout "0 errors" "test 12: wrong error counter (pull)" 498 check_tmpout "0 errors" "test 12: wrong error counter (pull)"
502 LN=`cat tmp-sync/out.txt | wc -l` 499 LN=`cat tmp-sync/out.txt | wc -l`
500
503 if [ $LN -ne 1 ]; then 501 if [ $LN -ne 1 ]; then
504 echo "test 12: wrong output (pull)" 502 echo "test 12: wrong output (pull)"
505 exit 2 503 exit 2
506 fi 504 fi
507 505

mercurial