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

Thu, 28 Nov 2024 17:18:43 +0100

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Thu, 28 Nov 2024 17:18:43 +0100
changeset 848
b71598a22e11
parent 817
22257f6d06a3
permissions
-rwxr-xr-x

fix property set/remove list size checks

661
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
1 #!/bin/sh
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
2 #
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
4 #
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
5 # Copyright 2019 Olaf Wintermann. All rights reserved.
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
6 #
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
7 # Redistribution and use in source and binary forms, with or without
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
8 # modification, are permitted provided that the following conditions are met:
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
9 #
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
10 # 1. Redistributions of source code must retain the above copyright
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
11 # notice, this list of conditions and the following disclaimer.
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
12 #
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
13 # 2. Redistributions in binary form must reproduce the above copyright
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
14 # notice, this list of conditions and the following disclaimer in the
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
15 # documentation and/or other materials provided with the distribution.
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
16 #
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
17 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
18 # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
19 # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
20 # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
21 # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
22 # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
23 # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
24 # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
25 # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
1baec7ff8931 add first metadata sync test
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
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
27 # POSSIBILITY OF SUCH DAMAGE.
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
28 #
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
29
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
30 if [ -z "$DAV_BIN" ];
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
31 then
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
32 echo "DAV_BIN variable not set"
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
33 exit 1
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
34 fi
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
35 if [ -z "$DAV_SYNC_BIN" ];
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
36 then
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
37 echo "DAV_BIN variable not set"
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
38 exit 1
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
39 fi
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
40
817
22257f6d06a3 fix incorrect stat flags on linux in metadata test scripts
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 812
diff changeset
41 # stat parameter for getting unix time
22257f6d06a3 fix incorrect stat flags on linux in metadata test scripts
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 812
diff changeset
42 STAT_TIME_FMT="-c %Y"
22257f6d06a3 fix incorrect stat flags on linux in metadata test scripts
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 812
diff changeset
43
22257f6d06a3 fix incorrect stat flags on linux in metadata test scripts
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 812
diff changeset
44 if uname -a | grep BSD > /dev/null;
736
40be8db6fe45 fix dav-sync push creating finfo elements without using the mempool, which could lead to crashes
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 671
diff changeset
45 then
817
22257f6d06a3 fix incorrect stat flags on linux in metadata test scripts
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 812
diff changeset
46 STAT_TIME_FMT="-f %m"
22257f6d06a3 fix incorrect stat flags on linux in metadata test scripts
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 812
diff changeset
47 fi
22257f6d06a3 fix incorrect stat flags on linux in metadata test scripts
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 812
diff changeset
48 if uname -a | grep Darwin > /dev/null;
22257f6d06a3 fix incorrect stat flags on linux in metadata test scripts
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 812
diff changeset
49 then
22257f6d06a3 fix incorrect stat flags on linux in metadata test scripts
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 812
diff changeset
50 STAT_TIME_FMT="-f %m"
736
40be8db6fe45 fix dav-sync push creating finfo elements without using the mempool, which could lead to crashes
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 671
diff changeset
51 fi
40be8db6fe45 fix dav-sync push creating finfo elements without using the mempool, which could lead to crashes
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 671
diff changeset
52
763
fc24d1d1d695 fix dav-sync pull not storing finfo metadata correctly in the database
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 736
diff changeset
53 XATTR=../../build/bin/xattrtool
663
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
54
661
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
55 # checks if tmp-sync/out.txt contains a specific text
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
56 # arg1: pattern
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
57 # arg2: errormsg
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
58 check_tmpout()
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
59 {
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
60 TEST=`cat tmp-sync/out.txt | grep "$1"`
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
61 if [ $? -ne 0 ];
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
62 then
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
63 echo "$2"
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
64 exit 2
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
65 fi
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
66 }
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
67
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
68 # do dav-sync push and check return value
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
69 # arg1: dir
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
70 # arg2: errormsg
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
71 dav_sync_push()
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
72 {
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
73 $DAV_SYNC_BIN push $1 > tmp-sync/out.txt
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
74 if [ $? -ne 0 ];
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
75 then
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
76 echo "$2"
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
77 exit 2
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
78 fi
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
79 }
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
80 # do dav-sync pull and check return value
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
81 # arg1: dir
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
82 # arg2: errormsg
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
83 dav_sync_pull()
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
84 {
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
85 $DAV_SYNC_BIN pull $1 > tmp-sync/out.txt
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
86 if [ $? -ne 0 ];
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
87 then
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
88 echo "$2"
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
89 exit 2
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
90 fi
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
91 }
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
92
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
93 rm -f .dav/dav-sync-tests-test4a-db.xml
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
94 rm -f .dav/dav-sync-tests-test4b-db.xml
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
95
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
96 $DAV_BIN rm dav-test-repo/sync/test4 2> /dev/null
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
97
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
98 $DAV_BIN mkcol dav-test-repo/sync/test4 2> /dev/null
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
99
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
100 # tmp sync dir
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
101 rm -Rf tmp-sync
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
102 mkdir tmp-sync
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
103 mkdir tmp-sync/test4a
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
104 mkdir tmp-sync/test4b
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
105
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
106 # ----------------------------------------------------------------------------
662
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
107 # test 1: sync executable file and check if it can be executed
661
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
108 # expected result: exec works
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
109
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
110 echo "#!/bin/sh" > tmp-sync/test4a/script.sh
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
111 echo "echo itworks" >> tmp-sync/test4a/script.sh
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
112
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
113 chmod +x tmp-sync/test4a/script.sh
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
114
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
115 dav_sync_push test4a "test 1: push failed"
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
116 check_tmpout "1 file pushed" "test 1: wrong push counter"
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
117 check_tmpout "0 conflicts" "test 1: wrong conflict counter (push)"
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
118 check_tmpout "0 errors" "test 1: wrong error counter (push)"
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
119
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
120 dav_sync_pull test4b "test 1: pull failed"
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
121 check_tmpout "1 file pulled" "test 1: wrong pull counter"
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
122 check_tmpout "0 conflicts" "test 1: wrong conflict counter (pull)"
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
123 check_tmpout "0 errors" "test 1: wrong error counter (pull)"
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
124
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
125 # test if script in test4a works, if not, shell scripts are unsupported
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
126 # on this platform
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
127 ./tmp-sync/test4a/script.sh > /dev/null 2>&1
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
128 if [ $? -eq 0 ]; then
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
129 # shell scripts work
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
130
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
131 # test synced script
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
132 ./tmp-sync/test4b/script.sh > /dev/null 2>&1
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
133 if [ $? -ne 0 ]; then
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
134 echo "script not executable"
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
135 exit 2
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
136 fi
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
137 OUT=`./tmp-sync/test4b/script.sh 2> /dev/null`
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
138 if [ $OUT != "itworks" ]; then
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
139 echo "script.sh has wrong output"
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
140 exit 2
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
141 fi
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
142 fi
1baec7ff8931 add first metadata sync test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
143
662
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
144 # ----------------------------------------------------------------------------
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
145 # test 2: set mtime to specific date and sync the file
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
146 # expected result: mtime the same on both sides
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
147
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
148 mkdir tmp-sync/test4a/dir1
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
149
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
150 cp synctest/file1 tmp-sync/test4a/
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
151 cp synctest/file2 tmp-sync/test4a/dir1/
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
152
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
153 touch -t 01011200 tmp-sync/test4a/file1
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
154 touch -t 02021200 tmp-sync/test4a/dir1/file2
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
155
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
156 dav_sync_push test4a "test 2: push failed"
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
157 check_tmpout "2 files pushed" "test 2: wrong push counter"
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
158 check_tmpout "0 conflicts" "test 2: wrong conflict counter (push)"
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
159 check_tmpout "0 errors" "test 2: wrong error counter (push)"
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
160
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
161 dav_sync_pull test4b "test 2: pull failed"
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
162 check_tmpout "2 files pulled" "test 2: wrong pull counter"
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
163 check_tmpout "0 conflicts" "test 2: wrong conflict counter (pull)"
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
164 check_tmpout "0 errors" "test 2: wrong error counter (pull)"
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
165
817
22257f6d06a3 fix incorrect stat flags on linux in metadata test scripts
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 812
diff changeset
166 MTIMEA1=`stat $STAT_TIME_FMT tmp-sync/test4a/file1`
22257f6d06a3 fix incorrect stat flags on linux in metadata test scripts
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 812
diff changeset
167 MTIMEB1=`stat $STAT_TIME_FMT tmp-sync/test4b/file1`
662
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
168
817
22257f6d06a3 fix incorrect stat flags on linux in metadata test scripts
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 812
diff changeset
169 MTIMEA2=`stat $STAT_TIME_FMT tmp-sync/test4a/dir1/file2`
22257f6d06a3 fix incorrect stat flags on linux in metadata test scripts
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 812
diff changeset
170 MTIMEB2=`stat $STAT_TIME_FMT tmp-sync/test4b/dir1/file2`
662
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
171
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
172 if [ $MTIMEA1 != $MTIMEB1 ]; then
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
173 echo "file1: mtime not synced"
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
174 exit 2
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
175 fi
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
176 if [ $MTIMEA2 != $MTIMEB2 ]; then
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
177 echo "file2: mtime not synced"
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
178 exit 2
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
179 fi
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
180
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
181 # ----------------------------------------------------------------------------
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
182 # test 3: modify file1 and push/pull
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
183 # expected result: file content synced, mtime also synced
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
184
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
185 echo "test3-mod1" >> tmp-sync/test4a/file1
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
186
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
187 dav_sync_push test4a "test 3: push failed"
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
188 check_tmpout "1 file pushed" "test 3: wrong push counter"
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
189 check_tmpout "0 conflicts" "test 3: wrong conflict counter (push)"
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
190 check_tmpout "0 errors" "test 3: wrong error counter (push)"
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
191
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
192 dav_sync_pull test4b "test 3: pull failed"
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
193 check_tmpout "1 file pulled" "test 3: wrong pull counter"
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
194 check_tmpout "0 conflicts" "test 3: wrong conflict counter (pull)"
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
195 check_tmpout "0 errors" "test 3: wrong error counter (pull)"
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
196
817
22257f6d06a3 fix incorrect stat flags on linux in metadata test scripts
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 812
diff changeset
197 MTIMEA1=`stat $STAT_TIME_FMT tmp-sync/test4a/file1`
22257f6d06a3 fix incorrect stat flags on linux in metadata test scripts
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 812
diff changeset
198 MTIMEB1=`stat $STAT_TIME_FMT tmp-sync/test4b/file1`
662
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
199
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
200 if [ $MTIMEA1 != $MTIMEB1 ]; then
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
201 echo "file1: mtime not synced"
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
202 exit 2
ab34fc9ecf1d fix mtime sync bug
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 661
diff changeset
203 fi
663
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
204
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
205 # ----------------------------------------------------------------------------
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
206 # test 4: add xattr to files, push/pull
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
207 # expected result: xattr synced
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
208
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
209 # test if xattr are supported
763
fc24d1d1d695 fix dav-sync pull not storing finfo metadata correctly in the database
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 736
diff changeset
210 $XATTR set tmp-sync/test4a/file1 attr1 testv 2> /dev/null
fc24d1d1d695 fix dav-sync pull not storing finfo metadata correctly in the database
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 736
diff changeset
211 ATTR_TEST=`../../build/bin/xattrtool get tmp-sync/test4a/file1 attr1 2> /dev/null`
663
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
212 if [ $ATTR_TEST != "testv" ]; then
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
213 echo "xattr unsupported, skip"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
214 exit 2
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
215 fi
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
216
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
217 sleep 2
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
218
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
219 # add xattr to file without content modification
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
220 $XATTR set tmp-sync/test4a/file1 attr2 value2
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
221 $XATTR set tmp-sync/test4a/file1 attr3 hello
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
222 $XATTR set tmp-sync/test4a/file1 attr4 hello
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
223 touch tmp-sync/test4a/file1
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
224
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
225 # modify file and add xattr
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
226 echo "test4-mod1" >> tmp-sync/test4a/dir1/file2
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
227 $XATTR set tmp-sync/test4a/dir1/file2 msg helloworld
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
228
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
229 # create new file with extended attributes
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
230 echo "newfile" > tmp-sync/test4a/file3
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
231 $XATTR set tmp-sync/test4a/file3 msg helloworld
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
232
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
233 dav_sync_push test4a "test 4: push failed"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
234 check_tmpout "0 conflicts" "test 4: wrong conflict counter (push)"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
235 check_tmpout "0 errors" "test 4: wrong error counter (push)"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
236 check_tmpout "put: /file3" "test 4: file 3 not pushed"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
237 check_tmpout "put: /dir1/file2" "test 4: file 2 not pushed"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
238 check_tmpout "update: /file1" "test 4: file 1 not pushed"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
239
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
240 dav_sync_pull test4b "test 4: pull failed"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
241 check_tmpout "0 conflicts" "test 4: wrong conflict counter (pull)"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
242 check_tmpout "0 errors" "test 4: wrong error counter (pull)"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
243 check_tmpout "get: /file3" "test 4: file 3 not pulled"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
244 check_tmpout "get: /dir1/file2" "test 4: file 2 not pulled"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
245 check_tmpout "update: /file1" "test 4: file 1 not pulled"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
246
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
247 FILE1_ATTR2=`$XATTR get tmp-sync/test4b/file1 attr2 2> /dev/null`
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
248 FILE1_ATTR3=`$XATTR get tmp-sync/test4b/file1 attr3 2> /dev/null`
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
249 FILE1_ATTR4=`$XATTR get tmp-sync/test4b/file1 attr4 2> /dev/null`
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
250
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
251 FILE2_ATTR0=`$XATTR get tmp-sync/test4b/dir1/file2 msg 2> /dev/null`
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
252
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
253 FILE3_ATTR0=`$XATTR get tmp-sync/test4b/file3 msg 2> /dev/null`
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
254
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
255
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
256 if [ "$FILE1_ATTR2" != "value2" ]; then
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
257 echo "file1 attr2 has wrong value: $FILE1_ATTR2"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
258 exit 2
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
259 fi
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
260 if [ "$FILE1_ATTR3" != "hello" ]; then
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
261 echo "file1 attr3 has wrong value: $FILE1_ATTR3"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
262 exit 2
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
263 fi
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
264 if [ "$FILE1_ATTR4" != "hello" ]; then
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
265 echo "file1 attr4 has wrong value: $FILE1_ATTR4"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
266 exit 2
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
267 fi
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
268
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
269 if [ "$FILE2_ATTR0" != "helloworld" ]; then
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
270 echo "file2 attr has wrong value: $FILE2_ATTR0"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
271 exit 2
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
272 fi
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
273
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
274 if [ "$FILE3_ATTR0" != "helloworld" ]; then
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
275 echo "file3 attr has wrong value: $FILE3_ATTR0"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
276 exit 2
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
277 fi
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
278
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
279 # ----------------------------------------------------------------------------
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
280 # test 5: do nothing, push/pull
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
281 # expected result: no update, no files pushed/pulled
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
282
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
283 sleep 2
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
284
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
285 dav_sync_push test4a "test 5: push failed"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
286 check_tmpout "0 files pushed" "test 5: wrong push counter"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
287 check_tmpout "0 conflicts" "test 5: wrong conflict counter (push)"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
288 check_tmpout "0 errors" "test 5: wrong error counter (push)"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
289 LN=`cat tmp-sync/out.txt | wc -l`
671
5256d7eb69e7 fix test system on solaris
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 667
diff changeset
290 if [ $LN -ne 1 ]; then
663
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
291 echo "test 5: wrong output (push)"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
292 exit 2
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
293 fi
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
294
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
295 dav_sync_pull test4b "test 5: pull failed"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
296 check_tmpout "0 files pulled" "test 5: wrong pull counter"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
297 check_tmpout "0 conflicts" "test 5: wrong conflict counter (pull)"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
298 check_tmpout "0 errors" "test 5: wrong error counter (pull)"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
299 LN=`cat tmp-sync/out.txt | wc -l`
812
5fe4453fc025 make sure a LocalResource path has never a trailing path separator, fixes multiple dav-sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 763
diff changeset
300
671
5256d7eb69e7 fix test system on solaris
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 667
diff changeset
301 if [ $LN -ne 1 ]; then
663
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
302 echo "test 5: wrong output (pull)"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
303 exit 2
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
304 fi
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
305
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
306 # ----------------------------------------------------------------------------
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
307 # test 6: add additional xattr to files, push/pull
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
308 # expected result: xattr synced
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
309
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
310 sleep 2
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
311
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
312 $XATTR set tmp-sync/test4a/file1 test5 f1value5
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
313
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
314 echo "test6-mod1" >> tmp-sync/test4a/file3
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
315 $XATTR set tmp-sync/test4a/file3 test5 f3value5
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
316
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
317 dav_sync_push test4a "test 6: push failed"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
318 check_tmpout "0 conflicts" "test 6: wrong conflict counter (push)"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
319 check_tmpout "0 errors" "test 6: wrong error counter (push)"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
320 check_tmpout "put: /file3" "test 6: file 3 not pushed"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
321 check_tmpout "update: /file1" "test 6: file 1 not pushed"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
322
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
323 dav_sync_pull test4b "test 6: pull failed"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
324 check_tmpout "0 conflicts" "test 6: wrong conflict counter (pull)"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
325 check_tmpout "0 errors" "test 6: wrong error counter (pull)"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
326 check_tmpout "get: /file3" "test 6: file 3 not pulled"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
327 check_tmpout "update: /file1" "test 6: file 1 not pulled"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
328
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
329 TEST5=`$XATTR get tmp-sync/test4b/file1 test5 2> /dev/null`
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
330 if [ "$TEST5" != "f1value5" ]; then
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
331 echo "test 6: file1 attr has wrong value"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
332 exit 2
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
333 fi
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
334 TEST5=`$XATTR get tmp-sync/test4b/file3 test5 2> /dev/null`
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
335 if [ "$TEST5" != "f3value5" ]; then
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
336 echo "test 6: file3 attr has wrong value"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
337 exit 2
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
338 fi
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
339
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
340
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
341 # ----------------------------------------------------------------------------
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
342 # test 7: do nothing, push/pull
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
343 # expected result: no update, no files pushed/pulled
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
344
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
345 sleep 2
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
346
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
347 dav_sync_push test4a "test 7: push failed"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
348 check_tmpout "0 files pushed" "test 7: wrong push counter"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
349 check_tmpout "0 conflicts" "test 7: wrong conflict counter (push)"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
350 check_tmpout "0 errors" "test 7: wrong error counter (push)"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
351 LN=`cat tmp-sync/out.txt | wc -l`
671
5256d7eb69e7 fix test system on solaris
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 667
diff changeset
352 if [ $LN -ne 1 ]; then
663
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
353 echo "test 7: wrong output (push)"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
354 exit 2
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
355 fi
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
356
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
357 dav_sync_pull test4b "test 7: pull failed"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
358 check_tmpout "0 files pulled" "test 7: wrong pull counter"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
359 check_tmpout "0 conflicts" "test 7: wrong conflict counter (pull)"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
360 check_tmpout "0 errors" "test 7: wrong error counter (pull)"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
361 LN=`cat tmp-sync/out.txt | wc -l`
671
5256d7eb69e7 fix test system on solaris
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 667
diff changeset
362 if [ $LN -ne 1 ]; then
663
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
363 echo "test 7: wrong output (pull)"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
364 exit 2
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
365 fi
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
366
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
367
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
368 # ----------------------------------------------------------------------------
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
369 # test 8: remove xattr
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
370 # expected result: xattr removed in test4b
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
371
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
372 $XATTR remove tmp-sync/test4a/dir1/file2 msg
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
373 if [ $? -ne 0 ]; then
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
374 echo "test 8: xattrtool remove failed"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
375 exit 2
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
376 fi
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
377
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
378 touch tmp-sync/test4a/dir1/file2
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
379
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
380 dav_sync_push test4a "test 8: push failed"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
381 check_tmpout "0 conflicts" "test 8: wrong conflict counter (push)"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
382 check_tmpout "0 errors" "test 8: wrong error counter (push)"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
383 check_tmpout "update: /dir1/file2" "test 8: file 1 not pushed"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
384
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
385 dav_sync_pull test4b "test 8: pull failed"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
386 check_tmpout "0 conflicts" "test 8: wrong conflict counter (pull)"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
387 check_tmpout "0 errors" "test 8: wrong error counter (pull)"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
388 check_tmpout "update: /dir1/file2" "test 8: file 1 not pulled"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
389
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
390 TEST6=`$XATTR get tmp-sync/test4b/dir1/file2 msg 2> /dev/null`
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
391 if [ "$TEST6" != "" ]; then
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
392 echo "test 8: xattr msg not removed"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
393 exit 2
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
394 fi
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
395
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
396
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
397 # ----------------------------------------------------------------------------
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
398 # test 9: do nothing, push/pull
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
399 # expected result: no update, no files pushed/pulled
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
400
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
401 sleep 2
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
402
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
403 dav_sync_push test4a "test 9: push failed"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
404 check_tmpout "0 files pushed" "test 9: wrong push counter"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
405 check_tmpout "0 conflicts" "test 9: wrong conflict counter (push)"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
406 check_tmpout "0 errors" "test 9: wrong error counter (push)"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
407 LN=`cat tmp-sync/out.txt | wc -l`
671
5256d7eb69e7 fix test system on solaris
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 667
diff changeset
408 if [ $LN -ne 1 ]; then
667
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
409 echo "test 9: wrong output (push)"
663
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
410 exit 2
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
411 fi
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
412
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
413 dav_sync_pull test4b "test 9: pull failed"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
414 check_tmpout "0 files pulled" "test 9: wrong pull counter"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
415 check_tmpout "0 conflicts" "test 9: wrong conflict counter (pull)"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
416 check_tmpout "0 errors" "test 9: wrong error counter (pull)"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
417 LN=`cat tmp-sync/out.txt | wc -l`
671
5256d7eb69e7 fix test system on solaris
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 667
diff changeset
418 if [ $LN -ne 1 ]; then
663
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
419 echo "test 9: wrong output (pull)"
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
420 exit 2
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
421 fi
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
422
667
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
423
665
ec8c9201a974 add first tag test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 663
diff changeset
424 # ----------------------------------------------------------------------------
ec8c9201a974 add first tag test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 663
diff changeset
425 # test 10: add tags to files and sync
ec8c9201a974 add first tag test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 663
diff changeset
426 # expected result: tags synced
663
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
427
665
ec8c9201a974 add first tag test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 663
diff changeset
428 touch tmp-sync/test4a/file1
ec8c9201a974 add first tag test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 663
diff changeset
429 echo "test10-mod1" >> tmp-sync/test4a/dir1/file2
ec8c9201a974 add first tag test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 663
diff changeset
430 echo "test10-new" >> tmp-sync/test4a/file4
663
888aa263c0f1 fix some xattr sync bugs
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 662
diff changeset
431
665
ec8c9201a974 add first tag test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 663
diff changeset
432 $DAV_SYNC_BIN add-tag -s test4a tmp-sync/test4a/file1 test
ec8c9201a974 add first tag test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 663
diff changeset
433 if [ $? -ne 0 ]; then
ec8c9201a974 add first tag test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 663
diff changeset
434 echo "test 10: add-tag failed"
ec8c9201a974 add first tag test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 663
diff changeset
435 exit 2
ec8c9201a974 add first tag test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 663
diff changeset
436 fi
ec8c9201a974 add first tag test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 663
diff changeset
437 $DAV_SYNC_BIN add-tag -s test4a tmp-sync/test4a/dir1/file2 test
ec8c9201a974 add first tag test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 663
diff changeset
438 $DAV_SYNC_BIN add-tag -s test4a tmp-sync/test4a/file4 test
ec8c9201a974 add first tag test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 663
diff changeset
439
ec8c9201a974 add first tag test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 663
diff changeset
440 dav_sync_push test4a "test 10: push failed"
ec8c9201a974 add first tag test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 663
diff changeset
441 check_tmpout "0 conflicts" "test 10: wrong conflict counter (push)"
ec8c9201a974 add first tag test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 663
diff changeset
442 check_tmpout "0 errors" "test 10: wrong error counter (push)"
ec8c9201a974 add first tag test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 663
diff changeset
443 check_tmpout "put: /file4" "test 10: file 4 not pushed"
ec8c9201a974 add first tag test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 663
diff changeset
444 check_tmpout "put: /dir1/file2" "test 10: file 2 not pushed"
ec8c9201a974 add first tag test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 663
diff changeset
445 check_tmpout "update: /file1" "test 10: file 1 not pushed"
ec8c9201a974 add first tag test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 663
diff changeset
446
ec8c9201a974 add first tag test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 663
diff changeset
447 dav_sync_pull test4b "test 10: pull failed"
ec8c9201a974 add first tag test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 663
diff changeset
448 check_tmpout "0 conflicts" "test 10: wrong conflict counter (pull)"
ec8c9201a974 add first tag test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 663
diff changeset
449 check_tmpout "0 errors" "test 10: wrong error counter (pull)"
ec8c9201a974 add first tag test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 663
diff changeset
450 check_tmpout "get: /file4" "test 10: file 4 not pulled"
ec8c9201a974 add first tag test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 663
diff changeset
451 check_tmpout "get: /dir1/file2" "test 10: file 2 not pulled"
ec8c9201a974 add first tag test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 663
diff changeset
452 check_tmpout "update: /file1" "test 10: file 1 not pulled"
ec8c9201a974 add first tag test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 663
diff changeset
453
ec8c9201a974 add first tag test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 663
diff changeset
454 $DAV_SYNC_BIN list-tags -s test4b tmp-sync/test4b/file1 > tmp-sync/out.txt
ec8c9201a974 add first tag test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 663
diff changeset
455 check_tmpout "test" "test 10: file1 missing tag"
ec8c9201a974 add first tag test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 663
diff changeset
456 $DAV_SYNC_BIN list-tags -s test4b tmp-sync/test4b/file4 > tmp-sync/out.txt
ec8c9201a974 add first tag test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 663
diff changeset
457 check_tmpout "test" "test 10: file3 missing tag"
ec8c9201a974 add first tag test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 663
diff changeset
458 $DAV_SYNC_BIN list-tags -s test4b tmp-sync/test4b/dir1/file2 > tmp-sync/out.txt
ec8c9201a974 add first tag test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 663
diff changeset
459 check_tmpout "test" "test 10: file2 missing tag"
ec8c9201a974 add first tag test
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 663
diff changeset
460
667
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
461
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
462 # ----------------------------------------------------------------------------
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
463 # test 11: check if double update happens
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
464 # expected result: nothing happens
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
465
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
466 dav_sync_push test4a "test 11: push failed"
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
467 check_tmpout "0 files pushed" "test 11: wrong push counter"
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
468 check_tmpout "0 conflicts" "test 11: wrong conflict counter (push)"
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
469 check_tmpout "0 errors" "test 11: wrong error counter (push)"
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
470 LN=`cat tmp-sync/out.txt | wc -l`
671
5256d7eb69e7 fix test system on solaris
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 667
diff changeset
471 if [ $LN -ne 1 ]; then
667
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
472 echo "test 11: wrong output (push)"
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
473 exit 2
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
474 fi
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
475
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
476 dav_sync_pull test4b "test 11: pull failed"
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
477 check_tmpout "0 files pulled" "test 11: wrong pull counter"
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
478 check_tmpout "0 conflicts" "test 11: wrong conflict counter (pull)"
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
479 check_tmpout "0 errors" "test 11: wrong error counter (pull)"
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
480 LN=`cat tmp-sync/out.txt | wc -l`
671
5256d7eb69e7 fix test system on solaris
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 667
diff changeset
481 if [ $LN -ne 1 ]; then
667
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
482 echo "test 11: wrong output (pull)"
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
483 exit 2
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
484 fi
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
485
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
486
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
487 # ----------------------------------------------------------------------------
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
488 # test 12: add tag, push test4a and pull test4a
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
489 # expected result: tags pushed, nothing pulled
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
490
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
491 $DAV_SYNC_BIN add-tag -s test4a tmp-sync/test4a/file1 work
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
492 touch -t 03011100 tmp-sync/test4a/file1
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
493
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
494 dav_sync_push test4a "test 12: push failed"
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
495 check_tmpout "0 conflicts" "test 12: wrong conflict counter (push)"
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
496 check_tmpout "0 errors" "test 12: wrong error counter (push)"
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
497 check_tmpout "update: /file1" "test 12: file 1 not pushed"
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
498
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
499 dav_sync_pull test4a "test 12: pull failed"
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
500 check_tmpout "0 files pulled" "test 12: wrong pull counter"
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
501 check_tmpout "0 conflicts" "test 12: wrong conflict counter (pull)"
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
502 check_tmpout "0 errors" "test 12: wrong error counter (pull)"
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
503 LN=`cat tmp-sync/out.txt | wc -l`
812
5fe4453fc025 make sure a LocalResource path has never a trailing path separator, fixes multiple dav-sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 763
diff changeset
504
671
5256d7eb69e7 fix test system on solaris
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 667
diff changeset
505 if [ $LN -ne 1 ]; then
667
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
506 echo "test 12: wrong output (pull)"
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
507 exit 2
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
508 fi
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
509
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
510
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
511 # ----------------------------------------------------------------------------
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
512 # test 13: pull test4b
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
513 # expected result: update file1, sync tags
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
514
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
515 dav_sync_pull test4b "test 13: pull failed"
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
516 check_tmpout "0 conflicts" "test 13: wrong conflict counter (pull)"
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
517 check_tmpout "0 errors" "test 13: wrong error counter (pull)"
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
518 check_tmpout "update: /file1" "test 13: file 1 not pulled"
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
519
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
520 $DAV_SYNC_BIN list-tags -s test4b tmp-sync/test4b/file1 > tmp-sync/out.txt
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
521 check_tmpout "test" "test 13: file1 missing tag 'test'"
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
522 check_tmpout "work" "test 13: file1 missing tag 'work'"
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
523
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
524
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
525 # ----------------------------------------------------------------------------
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
526 # test 14: remove tags from file4 and sync
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
527 # expected result: tags removed
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
528
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
529 $DAV_SYNC_BIN remove-tag -s test4a tmp-sync/test4a/file4 test
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
530 touch -t 04011100 tmp-sync/test4a/file4
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
531
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
532 dav_sync_push test4a "test 14: push failed"
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
533 check_tmpout "0 conflicts" "test 14: wrong conflict counter (push)"
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
534 check_tmpout "0 errors" "test 14: wrong error counter (push)"
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
535 check_tmpout "update: /file4" "test 14: file 4 not pushed"
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
536
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
537 dav_sync_pull test4b "test 14: pull failed"
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
538 check_tmpout "0 conflicts" "test 14: wrong conflict counter (pull)"
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
539 check_tmpout "0 errors" "test 14: wrong error counter (pull)"
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
540 check_tmpout "update: /file4" "test 14: file 4 not pulled"
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
541
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
542 LN=`$DAV_SYNC_BIN list-tags -s test4b tmp-sync/test4b/file4 | wc -l`
671
5256d7eb69e7 fix test system on solaris
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 667
diff changeset
543 if [ $LN -ne 0 ]; then
667
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
544 echo "test 14: wrong tag count"
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
545 exit 2
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
546 fi
6cdcd3e4e368 finish basic metadata sync tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 665
diff changeset
547

mercurial