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

changeset 622
6524f45f304e
parent 620
a93374f1849a
child 625
e1a85fbf68f9
equal deleted inserted replaced
621:06f9fddc82a1 622:6524f45f304e
57 dav_sync_push() 57 dav_sync_push()
58 { 58 {
59 $DAV_SYNC_BIN push $1 > tmp-sync/out.txt 59 $DAV_SYNC_BIN push $1 > tmp-sync/out.txt
60 if [ $? -ne 0 ]; 60 if [ $? -ne 0 ];
61 then 61 then
62 echo "$errormsg" 62 echo "$2"
63 exit 2 63 exit 2
64 fi 64 fi
65 } 65 }
66 66
67 $DAV_BIN mkcol dav-test-repo/sync/test1 67 $DAV_BIN mkcol dav-test-repo/sync/test1 2> /dev/null
68 68
69 # 1. test 69 # 1. test
70 # copy files to the test1a dir and run push 70 # copy files to the test1a dir and run push
71 # expected result: 2 uploads, no errors or conflicts 71 # expected result: 2 uploads, no errors or conflicts
72 72
255 if [ "$OUT" != "0" ]; 255 if [ "$OUT" != "0" ];
256 then 256 then
257 echo "push 10: dav-test-repo/sync/test1/ not empty" 257 echo "push 10: dav-test-repo/sync/test1/ not empty"
258 exit 2 258 exit 2
259 fi 259 fi
260
261 # cleanup
262 $DAV_BIN rm dav-test-repo/sync/test1 2> /dev/null
263 if [ $? -ne 0 ]; then
264 echo "cleanup failed"
265 exit 2
266 fi

mercurial