Sun, 08 Aug 2021 14:40:26 +0200
fix error in dav add-user, if .dav dir doesn't exists
650
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
1 | #!/bin/sh |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
2 | # |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
3 | # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
4 | # |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
5 | # Copyright 2019 Olaf Wintermann. All rights reserved. |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
6 | # |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
7 | # Redistribution and use in source and binary forms, with or without |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
8 | # modification, are permitted provided that the following conditions are met: |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
9 | # |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
10 | # 1. Redistributions of source code must retain the above copyright |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
11 | # notice, this list of conditions and the following disclaimer. |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
12 | # |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
13 | # 2. Redistributions in binary form must reproduce the above copyright |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
14 | # notice, this list of conditions and the following disclaimer in the |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
15 | # documentation and/or other materials provided with the distribution. |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
16 | # |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
17 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
18 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
19 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
20 | # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
21 | # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
22 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
23 | # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
24 | # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
25 | # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
26 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
27 | # POSSIBILITY OF SUCH DAMAGE. |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
28 | # |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
29 | |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
30 | if [ -z "$DAV_BIN" ]; |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
31 | then |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
32 | echo "DAV_BIN variable not set" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
33 | exit 1 |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
34 | fi |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
35 | if [ -z "$DAV_SYNC_BIN" ]; |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
36 | then |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
37 | echo "DAV_BIN variable not set" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
38 | exit 1 |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
39 | fi |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
40 | |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
41 | # checks if tmp-sync/out.txt contains a specific text |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
42 | # arg1: pattern |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
43 | # arg2: errormsg |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
44 | check_tmpout() |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
45 | { |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
46 | TEST=`cat tmp-sync/out.txt | grep "$1"` |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
47 | if [ $? -ne 0 ]; |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
48 | then |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
49 | echo "$2" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
50 | exit 2 |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
51 | fi |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
52 | } |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
53 | |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
54 | # do dav-sync push and check return value |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
55 | # arg1: dir |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
56 | # arg2: errormsg |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
57 | dav_sync_push() |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
58 | { |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
59 | $DAV_SYNC_BIN push $1 > tmp-sync/out.txt |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
60 | if [ $? -ne 0 ]; |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
61 | then |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
62 | echo "$2" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
63 | exit 2 |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
64 | fi |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
65 | } |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
66 | # do dav-sync pull and check return value |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
67 | # arg1: dir |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
68 | # arg2: errormsg |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
69 | dav_sync_pull() |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
70 | { |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
71 | $DAV_SYNC_BIN pull $1 > tmp-sync/out.txt |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
72 | if [ $? -ne 0 ]; |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
73 | then |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
74 | echo "$2" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
75 | exit 2 |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
76 | fi |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
77 | } |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
78 | |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
79 | rm -f .dav/dav-sync-tests-test2a-db.xml |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
80 | rm -f .dav/dav-sync-tests-test2b-db.xml |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
81 | |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
82 | $DAV_BIN rm dav-test-repo/sync/test2 2> /dev/null |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
83 | |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
84 | $DAV_BIN mkcol dav-test-repo/sync/test2 2> /dev/null |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
85 | |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
86 | # tmp sync dir |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
87 | rm -Rf tmp-sync |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
88 | mkdir tmp-sync |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
89 | mkdir tmp-sync/test2a |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
90 | # don't create test2b |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
91 | |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
92 | # ---------------------------------------------------------------------------- |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
93 | # test 1: first pull with exiting files |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
94 | # expected result: no conflicts |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
95 | |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
96 | mkdir tmp-sync/test2a/dir1 |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
97 | mkdir tmp-sync/test2a/dir1/subdir1 |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
98 | |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
99 | cp synctest/file1 tmp-sync/test2a/ |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
100 | cp synctest/file2 tmp-sync/test2a/dir1/ |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
101 | cp synctest/file3 tmp-sync/test2a/dir1/subdir1 |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
102 | cp synctest/file4 tmp-sync/test2a/dir1/subdir1 |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
103 | |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
104 | cp -R tmp-sync/test2a tmp-sync/test2b |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
105 | |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
106 | dav_sync_push test2a "test 1: push failed" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
107 | check_tmpout "4 files pushed" "test 1: wrong push counter" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
108 | check_tmpout "0 conflicts" "test 1: wrong conflict counter (push)" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
109 | check_tmpout "0 errors" "test 1: wrong error counter (push)" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
110 | |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
111 | dav_sync_pull test2b "test 1: pull failed" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
112 | check_tmpout "0 files pulled" "test 1: wrong pull counter" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
113 | check_tmpout "0 conflicts" "test 1: wrong conflict counter (pull)" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
114 | check_tmpout "0 errors" "test 1: wrong error counter (pull)" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
115 | |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
116 | |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
117 | # ---------------------------------------------------------------------------- |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
118 | # test 2: first push with existing resources on the server |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
119 | # expected result: no conflicts |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
120 | |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
121 | rm -f .dav/dav-sync-tests-test2a-db.xml |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
122 | |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
123 | sleep 2 |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
124 | |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
125 | dav_sync_push test2a "test 2: push failed" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
126 | check_tmpout "0 files pushed" "test 2: wrong push counter" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
127 | check_tmpout "0 conflicts" "test 2: wrong conflict counter (push)" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
128 | check_tmpout "0 errors" "test 2: wrong error counter (push)" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
129 | |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
130 | dav_sync_pull test2b "test 2: pull failed" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
131 | check_tmpout "0 files pulled" "test 2: wrong pull counter" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
132 | check_tmpout "0 conflicts" "test 2: wrong conflict counter (pull)" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
133 | check_tmpout "0 errors" "test 2: wrong error counter (pull)" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
134 | |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
135 | |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
136 | # ---------------------------------------------------------------------------- |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
137 | # test 3: modify file1 on both sides (with same content) |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
138 | # expected result: (pull): no conflicts |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
139 | |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
140 | sleep 2 |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
141 | |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
142 | echo "test3-mod" >> tmp-sync/test2a/file1 |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
143 | echo "test3-mod" >> tmp-sync/test2b/file1 |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
144 | |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
145 | dav_sync_push test2a "test 3: push failed" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
146 | check_tmpout "1 file pushed" "test 3: wrong push counter" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
147 | check_tmpout "0 conflicts" "test 3: wrong conflict counter (push)" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
148 | check_tmpout "0 errors" "test 3: wrong error counter (push)" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
149 | |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
150 | dav_sync_pull test2b "test 3: pull failed" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
151 | check_tmpout "0 files pulled" "test 3: wrong pull counter" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
152 | check_tmpout "0 conflicts" "test 3: wrong conflict counter (pull)" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
153 | check_tmpout "0 errors" "test 3: wrong error counter (pull)" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
154 | |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
155 | |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
156 | # ---------------------------------------------------------------------------- |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
157 | # test 4: modify file2 on both sides (with same content) and push test2b |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
158 | # expected result: (push): no conflicts |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
159 | |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
160 | sleep 2 |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
161 | |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
162 | echo "test4-mod" >> tmp-sync/test2a/dir1/file2 |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
163 | echo "test4-mod" >> tmp-sync/test2b/dir1/file2 |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
164 | |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
165 | dav_sync_push test2a "test 4: push test2a failed" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
166 | check_tmpout "1 file pushed" "test 4: wrong push counter (test2a)" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
167 | check_tmpout "0 conflicts" "test 4: wrong conflict counter (test2a)" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
168 | check_tmpout "0 errors" "test 4: wrong error counter (test2a)" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
169 | |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
170 | dav_sync_push test2b "test 4: push test2b failed" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
171 | check_tmpout "0 files pushed" "test 4: wrong push counter (test2b)" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
172 | check_tmpout "0 conflicts" "test 4: wrong conflict counter (test2b)" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
173 | check_tmpout "0 errors" "test 4: wrong error counter (test2b)" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
174 | |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
175 | dav_sync_pull test2b "test 4: pull failed" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
176 | check_tmpout "0 files pulled" "test 4: wrong pull counter" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
177 | check_tmpout "0 conflicts" "test 4: wrong conflict counter (pull)" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
178 | check_tmpout "0 errors" "test 4: wrong error counter (pull)" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
179 | |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
180 | |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
181 | # ---------------------------------------------------------------------------- |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
182 | # test 5: add same new file on both sides |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
183 | # expected result: (pull): no conflicts |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
184 | |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
185 | echo "test5-newfilex1" >> tmp-sync/test2a/filex1 |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
186 | echo "test5-newfilex1" >> tmp-sync/test2b/filex1 |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
187 | |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
188 | echo "test5-newfilex2" >> tmp-sync/test2a/filex2 |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
189 | echo "test5-newfilex2" >> tmp-sync/test2b/filex2 |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
190 | |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
191 | dav_sync_push test2a "test 5: push failed" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
192 | check_tmpout "2 files pushed" "test 5: wrong push counter (push)" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
193 | check_tmpout "0 conflicts" "test 5: wrong conflict counter (push)" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
194 | check_tmpout "0 errors" "test 5: wrong error counter (push)" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
195 | |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
196 | dav_sync_pull test2b "test 5: pull failed" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
197 | check_tmpout "0 files pulled" "test 5: wrong pull counter" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
198 | check_tmpout "0 conflicts" "test 5: wrong conflict counter (pull)" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
199 | check_tmpout "0 errors" "test 5: wrong error counter (pull)" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
200 | |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
201 | |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
202 | # ---------------------------------------------------------------------------- |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
203 | # test 6: add same new file on both sides and try to push both |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
204 | # expected result: no conflicts |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
205 | |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
206 | echo "test5-newfilez1" >> tmp-sync/test2a/filez1 |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
207 | echo "test5-newfilez1" >> tmp-sync/test2b/filez1 |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
208 | |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
209 | echo "test5-newfilez2" >> tmp-sync/test2a/filez2 |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
210 | echo "test5-newfilez2" >> tmp-sync/test2b/filez2 |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
211 | |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
212 | dav_sync_push test2a "test 6: push test2a failed" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
213 | check_tmpout "2 files pushed" "test 6: wrong push counter (test2a)" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
214 | check_tmpout "0 conflicts" "test 6: wrong conflict counter (test2a)" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
215 | check_tmpout "0 errors" "test 6: wrong error counter (test2a)" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
216 | |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
217 | dav_sync_push test2b "test 6: push test2b failed" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
218 | check_tmpout "0 files pushed" "test 6: wrong push counter (test2b)" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
219 | check_tmpout "0 conflicts" "test 6: wrong conflict counter (test2b)" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
220 | check_tmpout "0 errors" "test 6: wrong error counter (test2b)" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
221 | |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
222 | |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
223 | # ---------------------------------------------------------------------------- |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
224 | # test 7: provoke real conflict, push test2a, pull test2b |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
225 | # expected result: (pull): conflict |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
226 | |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
227 | sleep 2 |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
228 | |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
229 | echo "test7-mod-a" >> tmp-sync/test2a/file1 |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
230 | echo "test7-mod-b" >> tmp-sync/test2b/file1 |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
231 | |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
232 | dav_sync_push test2a "test 7: push failed" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
233 | check_tmpout "1 file pushed" "test 7: wrong push counter (push)" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
234 | check_tmpout "0 conflicts" "test 7: wrong conflict counter (push)" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
235 | check_tmpout "0 errors" "test 7: wrong error counter (push)" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
236 | |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
237 | dav_sync_pull test2b "test 7: pull failed" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
238 | check_tmpout "1 file pulled" "test 7: wrong pull counter" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
239 | check_tmpout "1 conflict" "test 7: wrong conflict counter (pull)" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
240 | check_tmpout "0 errors" "test 7: wrong error counter (pull)" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
241 | |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
242 | $DAV_SYNC_BIN delete-conflicts test2b > /dev/null 2>&1 |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
243 | if [ $? -ne 0 ]; then |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
244 | echo "test 7: delete-conflicts failed" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
245 | exit 2 |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
246 | fi |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
247 | |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
248 | dav_sync_push test2b "test 7: push test2b failed" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
249 | check_tmpout "0 files pushed" "test 7: wrong push counter (test2b)" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
250 | check_tmpout "0 conflicts" "test 7: wrong conflict counter (test2b)" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
251 | check_tmpout "0 errors" "test 7: wrong error counter (test2b)" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
252 | |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
253 | |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
254 | # ---------------------------------------------------------------------------- |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
255 | # test 8: provoke real conflict, push both |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
256 | # expected result: (push): conflict |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
257 | |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
258 | sleep 2 |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
259 | |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
260 | echo "test8-mod-a" >> tmp-sync/test2a/dir1/file2 |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
261 | echo "test8-mod-b" >> tmp-sync/test2b/dir1/file2 |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
262 | |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
263 | dav_sync_push test2a "test 8: push test2a failed" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
264 | check_tmpout "1 file pushed" "test 8: wrong push counter (test2a)" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
265 | check_tmpout "0 conflicts" "test 8: wrong conflict counter (test2a)" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
266 | check_tmpout "0 errors" "test 8: wrong error counter (test2a)" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
267 | |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
268 | dav_sync_push test2b "test 8: push test2b failed" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
269 | check_tmpout "0 files pushed" "test 8: wrong push counter (test2b)" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
270 | check_tmpout "1 conflict" "test 8: wrong conflict counter (test2b)" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
271 | check_tmpout "0 errors" "test 8: wrong error counter (test2b)" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
272 | |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
273 | |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
274 | # ---------------------------------------------------------------------------- |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
275 | # test 9: resolve push conflict by manually syncing file2 |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
276 | # expected result: (push): no conflict |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
277 | |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
278 | cp -f tmp-sync/test2a/dir1/file2 tmp-sync/test2b/dir1/file2 |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
279 | |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
280 | dav_sync_push test2b "test 9: push test2b failed" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
281 | check_tmpout "0 files pushed" "test 9: wrong push counter (test2b)" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
282 | check_tmpout "0 conflicts" "test 9: wrong conflict counter (test2b)" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
283 | check_tmpout "0 errors" "test 9: wrong error counter (test2b)" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
284 | |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
285 | |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
286 | # ---------------------------------------------------------------------------- |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
287 | # test 10: provoke real conflict, push test2a, pull test2b |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
288 | # expected result: (pull): conflict |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
289 | |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
290 | sleep 2 |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
291 | |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
292 | echo "test10-mod-a" >> tmp-sync/test2a/dir1/file2 |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
293 | echo "test10-mod-b" >> tmp-sync/test2b/dir1/file2 |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
294 | |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
295 | dav_sync_push test2a "test 10: push test2a failed" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
296 | check_tmpout "1 file pushed" "test 10: wrong push counter (test2a)" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
297 | check_tmpout "0 conflicts" "test 10: wrong conflict counter (test2a)" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
298 | check_tmpout "0 errors" "test 10: wrong error counter (test2a)" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
299 | |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
300 | dav_sync_pull test2b "test 10: pull failed" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
301 | check_tmpout "1 file pulled" "test 10: wrong pull counter (pull)" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
302 | check_tmpout "1 conflict" "test 10: wrong conflict counter (pull)" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
303 | check_tmpout "0 errors" "test 10: wrong error counter (pull)" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
304 | |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
305 | $DAV_SYNC_BIN delete-conflicts test2b > /dev/null 2>&1 |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
306 | if [ $? -ne 0 ]; then |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
307 | echo "test 10: delete-conflicts failed" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
308 | exit 2 |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
309 | fi |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
310 | |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
311 | dav_sync_push test2b "test 10: push test2b failed" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
312 | check_tmpout "0 files pushed" "test 10: wrong push counter (test2b)" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
313 | check_tmpout "0 conflicts" "test 10: wrong conflict counter (test2b)" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
314 | check_tmpout "0 errors" "test 10: wrong error counter (test2b)" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
315 | |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
316 | |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
317 | # ---------------------------------------------------------------------------- |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
318 | # test 11: If hashes are equal and 0 files are pulled, check if |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
319 | # the db was updated. Modify a file after pull and push the new file |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
320 | # expected result: (push): no conflict, 1 file pushed |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
321 | |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
322 | sleep 2 |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
323 | |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
324 | echo "test11-mod" >> tmp-sync/test2a/file1 |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
325 | echo "test11-mod" >> tmp-sync/test2b/file1 |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
326 | |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
327 | dav_sync_push test2a "test 11: push test2a failed" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
328 | check_tmpout "1 file pushed" "test 11: wrong push counter (test2a)" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
329 | check_tmpout "0 conflicts" "test 11: wrong conflict counter (test2a)" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
330 | check_tmpout "0 errors" "test 11: wrong error counter (test2a)" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
331 | |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
332 | dav_sync_pull test2b "test 11: pull failed" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
333 | check_tmpout "0 files pulled" "test 11: wrong pull counter" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
334 | check_tmpout "0 conflicts" "test 11: wrong conflict counter (pull)" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
335 | check_tmpout "0 errors" "test 11: wrong error counter (pull)" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
336 | |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
337 | sleep 2 |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
338 | echo "test11-mod2-b" >> tmp-sync/test2b/file1 |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
339 | |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
340 | dav_sync_push test2b "test 11: push test2b failed" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
341 | check_tmpout "1 file pushed" "test 11: wrong push counter (test2b)" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
342 | check_tmpout "0 conflicts" "test 11: wrong conflict counter (test2b)" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
343 | check_tmpout "0 errors" "test 11: wrong error counter (test2b)" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
344 | |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
345 | |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
346 | # ---------------------------------------------------------------------------- |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
347 | # test 12: same as test 11 but with a new file and not an existing file |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
348 | # expected result: (push): no conflict, 1 file pushed |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
349 | |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
350 | echo "test12-new" >> tmp-sync/test2a/new-t12 |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
351 | echo "test12-new" >> tmp-sync/test2b/new-t12 |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
352 | |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
353 | dav_sync_push test2a "test 12: push test2a failed" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
354 | check_tmpout "1 file pushed" "test 12: wrong push counter (test2a)" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
355 | check_tmpout "0 conflicts" "test 12: wrong conflict counter (test2a)" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
356 | check_tmpout "0 errors" "test 12: wrong error counter (test2a)" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
357 | |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
358 | dav_sync_pull test2b "test 12: pull failed" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
359 | check_tmpout "0 files pulled" "test 12: wrong pull counter" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
360 | check_tmpout "0 conflicts" "test 12: wrong conflict counter (pull)" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
361 | check_tmpout "0 errors" "test 12: wrong error counter (pull)" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
362 | |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
363 | sleep 2 |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
364 | echo "test12-mod2-b" >> tmp-sync/test2b/new-t12 |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
365 | |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
366 | dav_sync_push test2b "test 12: push test2b failed" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
367 | check_tmpout "1 file pushed" "test 12: wrong push counter (test2b)" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
368 | check_tmpout "0 conflicts" "test 12: wrong conflict counter (test2b)" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
369 | check_tmpout "0 errors" "test 12: wrong error counter (test2b)" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
370 | |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
371 | # ---------------------------------------------------------------------------- |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
372 | # test 13: Check if push updates the db, if a modified file is already |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
373 | # updated (hashes equal). Modify file the same way on both sides, |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
374 | # push both, modify file in test2b and push again |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
375 | # expected result: (push): no conflict, 1 file pushed |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
376 | |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
377 | echo "test13-mod" >> tmp-sync/test2a/dir1/file2 |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
378 | echo "test13-mod" >> tmp-sync/test2b/dir1/file2 |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
379 | |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
380 | dav_sync_push test2a "test 13: push test2a failed" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
381 | check_tmpout "1 file pushed" "test 13: wrong push counter (test2a)" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
382 | check_tmpout "0 conflicts" "test 13: wrong conflict counter (test2a)" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
383 | check_tmpout "0 errors" "test 13: wrong error counter (test2a)" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
384 | |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
385 | dav_sync_push test2b "test 13: push test2b failed" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
386 | check_tmpout "0 files pushed" "test 13: wrong push counter (test2b)" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
387 | check_tmpout "0 conflicts" "test 13: wrong conflict counter (test2b)" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
388 | check_tmpout "0 errors" "test 13: wrong error counter (test2b)" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
389 | |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
390 | sleep 2 |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
391 | echo "test13-mod2-b" >> tmp-sync/test2b/dir1/file2 |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
392 | |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
393 | dav_sync_push test2b "test 13: push test2b (2) failed" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
394 | check_tmpout "1 file pushed" "test 13: wrong push counter (test2b 2)" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
395 | check_tmpout "0 conflicts" "test 13: wrong conflict counter (test2b 2)" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
396 | check_tmpout "0 errors" "test 13: wrong error counter (test2b 2)" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
397 | |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
398 | |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
399 | # ---------------------------------------------------------------------------- |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
400 | # test 14: same as test 13 but with a new file and not an existing file |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
401 | # expected result: (push): no conflict, 1 file pushed |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
402 | |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
403 | echo "test14-mod" >> tmp-sync/test2a/dir1/new-t14 |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
404 | echo "test14-mod" >> tmp-sync/test2b/dir1/new-t14 |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
405 | |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
406 | dav_sync_push test2a "test 14: push test2a failed" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
407 | check_tmpout "1 file pushed" "test 14: wrong push counter (test2a)" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
408 | check_tmpout "0 conflicts" "test 14: wrong conflict counter (test2a)" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
409 | check_tmpout "0 errors" "test 14: wrong error counter (test2a)" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
410 | |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
411 | dav_sync_push test2b "test 14: push test2b failed" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
412 | check_tmpout "0 files pushed" "test 14: wrong push counter (test2b)" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
413 | check_tmpout "0 conflicts" "test 14: wrong conflict counter (test2b)" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
414 | check_tmpout "0 errors" "test 14: wrong error counter (test2b)" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
415 | |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
416 | sleep 2 |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
417 | echo "test13-mod2-b" >> tmp-sync/test2b/dir1/new-t14 |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
418 | |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
419 | dav_sync_push test2b "test 14: push test2b (2) failed" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
420 | check_tmpout "1 file pushed" "test 14: wrong push counter (test2b 2)" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
421 | check_tmpout "0 conflicts" "test 14: wrong conflict counter (test2b 2)" |
14e7101d7604
fix some hash based conflict resolution bugs and add tests for it
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
422 | check_tmpout "0 errors" "test 14: wrong error counter (test2b 2)" |