71 # expected result: 2 uploads, no errors or conflicts |
71 # expected result: 2 uploads, no errors or conflicts |
72 |
72 |
73 cp synctest/file1 tmp-sync/test1a |
73 cp synctest/file1 tmp-sync/test1a |
74 cp synctest/file2 tmp-sync/test1a |
74 cp synctest/file2 tmp-sync/test1a |
75 |
75 |
76 OUT=`$DAV_SYNC_BIN push test1a | tail -n 1` |
76 OUT=`$DAV_SYNC_BIN push test1a | tail -1` |
77 |
77 |
78 TEST=`echo $OUT | grep Result` |
78 TEST=`echo $OUT | grep Result` |
79 if [ $? -ne 0 ]; |
79 if [ $? -ne 0 ]; |
80 then |
80 then |
81 echo "push 1 failed" |
81 echo "push 1 failed" |
108 # expected result: no uploads or updates, only status line with zeros |
108 # expected result: no uploads or updates, only status line with zeros |
109 |
109 |
110 dav_sync_push test1a "push 2 failed" |
110 dav_sync_push test1a "push 2 failed" |
111 |
111 |
112 OUT=`wc -l < tmp-sync/out.txt` |
112 OUT=`wc -l < tmp-sync/out.txt` |
113 if [ "$OUT" != "1" ]; |
113 if [ $OUT -ne 1 ]; |
114 then |
114 then |
115 echo "push 2: number of output lines not 1" |
115 echo "push 2: number of output lines not 1" |
116 exit 2 |
116 exit 2 |
117 fi |
117 fi |
118 |
118 |
131 # do nothing again, test if double mkcol happens |
131 # do nothing again, test if double mkcol happens |
132 # expected result: no mkcol |
132 # expected result: no mkcol |
133 dav_sync_push test1a "push 4 failed" |
133 dav_sync_push test1a "push 4 failed" |
134 |
134 |
135 OUT=`wc -l < tmp-sync/out.txt` |
135 OUT=`wc -l < tmp-sync/out.txt` |
136 if [ "$OUT" != "1" ]; |
136 if [ $OUT -ne 1 ]; |
137 then |
137 then |
138 echo "push 4: number of output lines not 1" |
138 echo "push 4: number of output lines not 1" |
139 exit 2 |
139 exit 2 |
140 fi |
140 fi |
141 |
141 |
188 check_tmpout "10 files pushed" "push6: wrong push counter" |
188 check_tmpout "10 files pushed" "push6: wrong push counter" |
189 check_tmpout "0 files deleted" "push6: wrong delete counter" |
189 check_tmpout "0 files deleted" "push6: wrong delete counter" |
190 check_tmpout "0 conflicts" "push6: wrong conflict counter" |
190 check_tmpout "0 conflicts" "push6: wrong conflict counter" |
191 check_tmpout "0 errors" "push6: wrong error counter" |
191 check_tmpout "0 errors" "push6: wrong error counter" |
192 OUT=`grep mkcol tmp-sync/out.txt | wc -l` |
192 OUT=`grep mkcol tmp-sync/out.txt | wc -l` |
193 if [ "$OUT" != "48" ]; |
193 if [ $OUT -ne 48 ]; |
194 then |
194 then |
195 echo "push 6: number of mkcol output lines not 48" |
195 echo "push 6: number of mkcol output lines not 48" |
196 exit 2 |
196 exit 2 |
197 fi |
197 fi |
198 |
198 |