Tue, 23 Jul 2024 14:29:33 +0200
fix request_auth not removing the trailing newline from the user name
672
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
1 | #!/bin/sh |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
2 | # |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
3 | # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
4 | # |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
5 | # Copyright 2019 Olaf Wintermann. All rights reserved. |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
6 | # |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
7 | # Redistribution and use in source and binary forms, with or without |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
8 | # modification, are permitted provided that the following conditions are met: |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
9 | # |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
10 | # 1. Redistributions of source code must retain the above copyright |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
11 | # notice, this list of conditions and the following disclaimer. |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
12 | # |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
13 | # 2. Redistributions in binary form must reproduce the above copyright |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
14 | # notice, this list of conditions and the following disclaimer in the |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
15 | # documentation and/or other materials provided with the distribution. |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
16 | # |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
17 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
18 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
19 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
20 | # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
21 | # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
22 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
23 | # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
24 | # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
25 | # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
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 |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
27 | # POSSIBILITY OF SUCH DAMAGE. |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
28 | # |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
29 | |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
30 | if [ -z "$DAV_BIN" ]; |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
31 | then |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
32 | echo "DAV_BIN variable not set" |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
33 | exit 1 |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
34 | fi |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
35 | if [ -z "$DAV_SYNC_BIN" ]; |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
36 | then |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
37 | echo "DAV_BIN variable not set" |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
38 | exit 1 |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
39 | fi |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
40 | |
770
fcb243cb9950
fix xattrtool path in metadata test scripts
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
677
diff
changeset
|
41 | XATTR=../../build/bin/xattrtool |
672
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
42 | |
772
ab26daccfb8d
fix non-standard use of stat in metadata3 test script
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
771
diff
changeset
|
43 | # stat parameter for getting unix time |
ab26daccfb8d
fix non-standard use of stat in metadata3 test script
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
771
diff
changeset
|
44 | STAT_TIME_FMT="-c %Y" |
ab26daccfb8d
fix non-standard use of stat in metadata3 test script
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
771
diff
changeset
|
45 | |
817
22257f6d06a3
fix incorrect stat flags on linux in metadata test scripts
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
812
diff
changeset
|
46 | if uname -a | grep BSD > /dev/null; |
772
ab26daccfb8d
fix non-standard use of stat in metadata3 test script
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
771
diff
changeset
|
47 | then |
ab26daccfb8d
fix non-standard use of stat in metadata3 test script
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
771
diff
changeset
|
48 | STAT_TIME_FMT="-f %m" |
ab26daccfb8d
fix non-standard use of stat in metadata3 test script
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
771
diff
changeset
|
49 | fi |
817
22257f6d06a3
fix incorrect stat flags on linux in metadata test scripts
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
812
diff
changeset
|
50 | if uname -a | grep Darwin > /dev/null; |
772
ab26daccfb8d
fix non-standard use of stat in metadata3 test script
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
771
diff
changeset
|
51 | then |
ab26daccfb8d
fix non-standard use of stat in metadata3 test script
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
771
diff
changeset
|
52 | STAT_TIME_FMT="-f %m" |
ab26daccfb8d
fix non-standard use of stat in metadata3 test script
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
771
diff
changeset
|
53 | fi |
ab26daccfb8d
fix non-standard use of stat in metadata3 test script
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
771
diff
changeset
|
54 | |
ab26daccfb8d
fix non-standard use of stat in metadata3 test script
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
771
diff
changeset
|
55 | |
672
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
56 | # checks if tmp-sync/out.txt contains a specific text |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
57 | # arg1: pattern |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
58 | # arg2: errormsg |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
59 | check_tmpout() |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
60 | { |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
61 | TEST=`cat tmp-sync/out.txt | grep "$1"` |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
62 | if [ $? -ne 0 ]; |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
63 | then |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
64 | echo "$2" |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
65 | exit 2 |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
66 | fi |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
67 | } |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
68 | |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
69 | # do dav-sync push and check return value |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
70 | # arg1: dir |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
71 | # arg2: errormsg |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
72 | dav_sync_push() |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
73 | { |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
74 | $DAV_SYNC_BIN push $1 > tmp-sync/out.txt |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
75 | if [ $? -ne 0 ]; |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
76 | then |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
77 | echo "$2" |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
78 | exit 2 |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
79 | fi |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
80 | } |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
81 | # do dav-sync pull and check return value |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
82 | # arg1: dir |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
83 | # arg2: errormsg |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
84 | dav_sync_pull() |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
85 | { |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
86 | $DAV_SYNC_BIN pull $1 > tmp-sync/out.txt |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
87 | if [ $? -ne 0 ]; |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
88 | then |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
89 | echo "$2" |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
90 | exit 2 |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
91 | fi |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
92 | } |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
93 | |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
94 | rm -f .dav/dav-sync-tests-test4a-db.xml |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
95 | rm -f .dav/dav-sync-tests-test4b-db.xml |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
96 | |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
97 | $DAV_BIN rm dav-test-repo/sync/test4 2> /dev/null |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
98 | |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
99 | $DAV_BIN mkcol dav-test-repo/sync/test4 2> /dev/null |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
100 | |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
101 | # tmp sync dir |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
102 | rm -Rf tmp-sync |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
103 | mkdir tmp-sync |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
104 | mkdir tmp-sync/test4a |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
105 | mkdir tmp-sync/test4b |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
106 | |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
107 | # ---------------------------------------------------------------------------- |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
108 | # test 1: add file with all kinds of metadata and sync |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
109 | # expected result: everything synced |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
110 | |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
111 | mkdir tmp-sync/test4a/dir1 |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
112 | |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
113 | echo "#!/bin/sh" > tmp-sync/test4a/file1 |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
114 | echo "echo file1out" >> tmp-sync/test4a/file1 |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
115 | |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
116 | cp synctest/file2 tmp-sync/test4a/ |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
117 | cp synctest/file3 tmp-sync/test4a/dir1/ |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
118 | cp synctest/file4 tmp-sync/test4a/dir1/ |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
119 | |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
120 | # add tags |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
121 | $DAV_SYNC_BIN add-tag -s test4a tmp-sync/test4a/file1 mytag |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
122 | $DAV_SYNC_BIN add-tag -s test4a tmp-sync/test4a/file1 test1 |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
123 | |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
124 | # add xattr |
771
ffa493657381
replace direct xattrtool path with $XATTR in metadata3 test script
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
770
diff
changeset
|
125 | $XATTR set tmp-sync/test4a/file1 attr1 testvalue |
672
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
126 | |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
127 | # set mtime |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
128 | touch -t 01011200 tmp-sync/test4a/file1 |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
129 | |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
130 | # +x |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
131 | chmod +x tmp-sync/test4a/file1 |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
132 | |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
133 | dav_sync_push test4a "test 1: push failed" |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
134 | check_tmpout "4 files pushed" "test 1: wrong push counter" |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
135 | check_tmpout "0 conflicts" "test 1: wrong conflict counter (push)" |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
136 | check_tmpout "0 errors" "test 1: wrong error counter (push)" |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
137 | |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
138 | dav_sync_pull test4b "test 1: pull failed" |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
139 | check_tmpout "4 files pulled" "test 1: wrong pull counter" |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
140 | check_tmpout "0 conflicts" "test 1: wrong conflict counter (pull)" |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
141 | check_tmpout "0 errors" "test 1: wrong error counter (pull)" |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
142 | |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
143 | # check metadata |
772
ab26daccfb8d
fix non-standard use of stat in metadata3 test script
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
771
diff
changeset
|
144 | MTIMEA1=`stat $STAT_TIME_FMT tmp-sync/test4a/file1` |
ab26daccfb8d
fix non-standard use of stat in metadata3 test script
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
771
diff
changeset
|
145 | MTIMEB1=`stat $STAT_TIME_FMT tmp-sync/test4b/file1` |
672
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
146 | |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
147 | if [ "$MTIMEA1" != "$MTIMEB1" ]; then |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
148 | echo "test 1: mtime not synced" |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
149 | exit 2 |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
150 | fi |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
151 | |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
152 | OUT=`tmp-sync/test4b/file1 2> /dev/null` |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
153 | if [ "$OUT" != "file1out" ]; then |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
154 | echo "test 1: not executable" |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
155 | exit 2 |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
156 | fi |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
157 | |
771
ffa493657381
replace direct xattrtool path with $XATTR in metadata3 test script
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
770
diff
changeset
|
158 | OUT=`$XATTR get tmp-sync/test4b/file1 attr1 2> /dev/null` |
672
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
159 | if [ "$OUT" != "testvalue" ]; then |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
160 | echo "test 1: xattr not synced" |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
161 | exit 2 |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
162 | fi |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
163 | |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
164 | TAGS=`$DAV_SYNC_BIN list-tags -s test4b tmp-sync/test4b/file1 > tmp-sync/out.txt 2> /dev/null` |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
165 | if [ $? -ne 0 ]; then |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
166 | echo "test 1: list-tags failed" |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
167 | exit 2 |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
168 | fi |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
169 | check_tmpout "mytag" "test 1: file1: missing tag mytag" |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
170 | check_tmpout "test1" "test 1: file1: missing tag test1" |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
171 | |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
172 | |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
173 | # ---------------------------------------------------------------------------- |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
174 | # test 2: copy file (without xattr and tags) and sync |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
175 | # expected result: WebDAV COPY, but metadata adjusted |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
176 | |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
177 | cp tmp-sync/test4a/file1 tmp-sync/test4a/copy1 |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
178 | |
677
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
179 | $XATTR remove tmp-sync/test4a/copy1 tags > /dev/null 2>&1 |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
180 | $XATTR remove tmp-sync/test4a/copy1 attr1 > /dev/null 2>&1 |
672
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
181 | |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
182 | chmod -x tmp-sync/test4a/copy1 |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
183 | |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
184 | touch tmp-sync/test4a/copy1 |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
185 | |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
186 | dav_sync_push test4a "test 2: push failed" |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
187 | check_tmpout "1 file pushed" "test 2: wrong push counter" |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
188 | check_tmpout "0 conflicts" "test 2: wrong conflict counter (push)" |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
189 | check_tmpout "0 errors" "test 2: wrong error counter (push)" |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
190 | check_tmpout "copy" "test 2: no copy (push)" |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
191 | |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
192 | dav_sync_pull test4b "test 2: pull failed" |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
193 | check_tmpout "1 file pulled" "test 2: wrong pull counter" |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
194 | check_tmpout "0 conflicts" "test 2: wrong conflict counter (pull)" |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
195 | check_tmpout "0 errors" "test 2: wrong error counter (pull)" |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
196 | |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
197 | # check metadata |
772
ab26daccfb8d
fix non-standard use of stat in metadata3 test script
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
771
diff
changeset
|
198 | MTIMEA1=`stat $STAT_TIME_FMT tmp-sync/test4a/copy1 2> /dev/null` |
ab26daccfb8d
fix non-standard use of stat in metadata3 test script
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
771
diff
changeset
|
199 | MTIMEB1=`stat $STAT_TIME_FMT tmp-sync/test4b/copy1 2> /dev/null` |
672
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
200 | |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
201 | if [ "$MTIMEA1" != "$MTIMEB1" ]; then |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
202 | echo "test 2: mtime not synced" |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
203 | exit 2 |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
204 | fi |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
205 | |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
206 | OUT=`tmp-sync/test4b/copy1 2> /dev/null` |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
207 | if [ $? -eq 0 ]; then |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
208 | echo "test 2: copy1 should be executable" |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
209 | exit 2 |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
210 | fi |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
211 | |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
212 | TAGS=`$DAV_SYNC_BIN list-tags -s test4b tmp-sync/test4b/copy1 > tmp-sync/out.txt 2> /dev/null` |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
213 | if [ $? -ne 0 ]; then |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
214 | echo "test 2: list-tags failed" |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
215 | exit 2 |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
216 | fi |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
217 | LN=`cat tmp-sync/out.txt | wc -l` |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
218 | if [ $LN -ne 0 ]; then |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
219 | echo "test 2: list-tags not empty" |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
220 | exit 2 |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
221 | fi |
4bfe452a2665
fix dav-sync copy with enabled metadata sync
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
222 | |
675
a8117c4feaad
fix sync_store_metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
672
diff
changeset
|
223 | |
a8117c4feaad
fix sync_store_metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
672
diff
changeset
|
224 | # ---------------------------------------------------------------------------- |
a8117c4feaad
fix sync_store_metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
672
diff
changeset
|
225 | # test 3: push again |
a8117c4feaad
fix sync_store_metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
672
diff
changeset
|
226 | # expected result: 0 files pushed/updated |
a8117c4feaad
fix sync_store_metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
672
diff
changeset
|
227 | |
a8117c4feaad
fix sync_store_metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
672
diff
changeset
|
228 | dav_sync_push test4a "test 3: push failed" |
a8117c4feaad
fix sync_store_metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
672
diff
changeset
|
229 | check_tmpout "0 files pushed" "test 3: wrong push counter" |
a8117c4feaad
fix sync_store_metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
672
diff
changeset
|
230 | check_tmpout "0 conflicts" "test 3: wrong conflict counter (push)" |
a8117c4feaad
fix sync_store_metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
672
diff
changeset
|
231 | check_tmpout "0 errors" "test 3: wrong error counter (push)" |
a8117c4feaad
fix sync_store_metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
672
diff
changeset
|
232 | |
a8117c4feaad
fix sync_store_metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
672
diff
changeset
|
233 | LN=`cat tmp-sync/out.txt | wc -l 2> /dev/null` |
a8117c4feaad
fix sync_store_metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
672
diff
changeset
|
234 | if [ $LN -ne 1 ]; then |
a8117c4feaad
fix sync_store_metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
672
diff
changeset
|
235 | echo "test 3: wrong line count" |
a8117c4feaad
fix sync_store_metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
672
diff
changeset
|
236 | exit 2 |
a8117c4feaad
fix sync_store_metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
672
diff
changeset
|
237 | fi |
a8117c4feaad
fix sync_store_metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
672
diff
changeset
|
238 | |
a8117c4feaad
fix sync_store_metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
672
diff
changeset
|
239 | |
a8117c4feaad
fix sync_store_metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
672
diff
changeset
|
240 | # ---------------------------------------------------------------------------- |
a8117c4feaad
fix sync_store_metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
672
diff
changeset
|
241 | # test 4: pull test4b again |
a8117c4feaad
fix sync_store_metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
672
diff
changeset
|
242 | # expected result: 0 files pushed/updated |
a8117c4feaad
fix sync_store_metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
672
diff
changeset
|
243 | |
a8117c4feaad
fix sync_store_metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
672
diff
changeset
|
244 | dav_sync_pull test4b "test 4: pull failed" |
a8117c4feaad
fix sync_store_metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
672
diff
changeset
|
245 | check_tmpout "0 files pulled" "test 4: wrong pull counter" |
a8117c4feaad
fix sync_store_metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
672
diff
changeset
|
246 | check_tmpout "0 conflicts" "test 4: wrong conflict counter (pull)" |
a8117c4feaad
fix sync_store_metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
672
diff
changeset
|
247 | check_tmpout "0 errors" "test 4: wrong error counter (pull)" |
a8117c4feaad
fix sync_store_metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
672
diff
changeset
|
248 | |
a8117c4feaad
fix sync_store_metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
672
diff
changeset
|
249 | LN=`cat tmp-sync/out.txt | wc -l 2> /dev/null` |
a8117c4feaad
fix sync_store_metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
672
diff
changeset
|
250 | if [ $LN -ne 1 ]; then |
a8117c4feaad
fix sync_store_metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
672
diff
changeset
|
251 | echo "test 4: wrong line count" |
a8117c4feaad
fix sync_store_metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
672
diff
changeset
|
252 | exit 2 |
a8117c4feaad
fix sync_store_metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
672
diff
changeset
|
253 | fi |
a8117c4feaad
fix sync_store_metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
672
diff
changeset
|
254 | |
677
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
255 | |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
256 | # ---------------------------------------------------------------------------- |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
257 | # test 5: move file1 |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
258 | # expected result: file moved, metadata unchanged |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
259 | |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
260 | mv tmp-sync/test4a/file1 tmp-sync/test4a/move1 |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
261 | |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
262 | dav_sync_push test4a "test 5: push failed" |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
263 | check_tmpout "1 file pushed" "test 5: wrong push counter" |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
264 | check_tmpout "0 conflicts" "test 5: wrong conflict counter (push)" |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
265 | check_tmpout "0 errors" "test 5: wrong error counter (push)" |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
266 | check_tmpout "move" "test 5: no move (push)" |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
267 | |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
268 | dav_sync_pull test4b "test 5: pull failed" |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
269 | check_tmpout "1 file pulled" "test 5: wrong pull counter" |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
270 | check_tmpout "0 conflicts" "test 5: wrong conflict counter (pull)" |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
271 | check_tmpout "0 errors" "test 5: wrong error counter (pull)" |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
272 | check_tmpout "move" "test 5: no move (pull)" |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
273 | |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
274 | # check metadata |
772
ab26daccfb8d
fix non-standard use of stat in metadata3 test script
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
771
diff
changeset
|
275 | MTIMEA1=`stat $STAT_TIME_FMT tmp-sync/test4a/move1 2> /dev/null` |
ab26daccfb8d
fix non-standard use of stat in metadata3 test script
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
771
diff
changeset
|
276 | MTIMEB1=`stat $STAT_TIME_FMT tmp-sync/test4b/move1 2> /dev/null` |
677
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
277 | |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
278 | if [ $MTIMEA1 -ne $MTIMEB1 ]; then |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
279 | echo "test 5: mtime not synced" |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
280 | exit 2 |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
281 | fi |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
282 | |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
283 | TAGS=`$DAV_SYNC_BIN list-tags -s test4b tmp-sync/test4b/move1 > tmp-sync/out.txt 2> /dev/null` |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
284 | if [ $? -ne 0 ]; then |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
285 | echo "test 2: list-tags failed" |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
286 | exit 2 |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
287 | fi |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
288 | check_tmpout "mytag" "test 5: tag mytag missing" |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
289 | check_tmpout "test1" "test 5: tag test1 missing" |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
290 | |
771
ffa493657381
replace direct xattrtool path with $XATTR in metadata3 test script
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
770
diff
changeset
|
291 | OUT=`$XATTR get tmp-sync/test4b/move1 attr1 2> /dev/null` |
677
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
292 | if [ "$OUT" != "testvalue" ]; then |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
293 | echo "test 5: xattr not synced" |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
294 | exit 2 |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
295 | fi |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
296 | |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
297 | |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
298 | # ---------------------------------------------------------------------------- |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
299 | # test 6: remove metadata, move file move1 and sync |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
300 | # expected result: file moved, no tags/xattr |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
301 | |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
302 | $DAV_SYNC_BIN remove-tag -s test4a tmp-sync/test4a/move1 test1 |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
303 | $DAV_SYNC_BIN remove-tag -s test4a tmp-sync/test4a/move1 mytag |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
304 | |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
305 | $XATTR remove tmp-sync/test4a/move1 attr1 |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
306 | |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
307 | mv tmp-sync/test4a/move1 tmp-sync/test4a/move_noxattr |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
308 | |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
309 | dav_sync_push test4a "test 6: push failed" |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
310 | check_tmpout "1 file pushed" "test 6: wrong push counter" |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
311 | check_tmpout "0 conflicts" "test 6: wrong conflict counter (push)" |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
312 | check_tmpout "0 errors" "test 6: wrong error counter (push)" |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
313 | check_tmpout "move" "test 6: no move (push)" |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
314 | |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
315 | dav_sync_pull test4b "test 6: pull failed" |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
316 | check_tmpout "1 file pulled" "test 6: wrong pull counter" |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
317 | check_tmpout "0 conflicts" "test 6: wrong conflict counter (pull)" |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
318 | check_tmpout "0 errors" "test 6: wrong error counter (pull)" |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
319 | check_tmpout "move" "test 6: no move (pull)" |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
320 | |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
321 | # check metadata |
772
ab26daccfb8d
fix non-standard use of stat in metadata3 test script
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
771
diff
changeset
|
322 | MTIMEA1=`stat $STAT_TIME_FMT tmp-sync/test4a/move_noxattr 2> /dev/null` |
ab26daccfb8d
fix non-standard use of stat in metadata3 test script
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
771
diff
changeset
|
323 | MTIMEB1=`stat $STAT_TIME_FMT tmp-sync/test4b/move_noxattr 2> /dev/null` |
677
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
324 | |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
325 | if [ $MTIMEA1 -ne $MTIMEB1 ]; then |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
326 | echo "test 6: mtime not synced" |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
327 | exit 2 |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
328 | fi |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
329 | |
771
ffa493657381
replace direct xattrtool path with $XATTR in metadata3 test script
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
770
diff
changeset
|
330 | OUT=`$XATTR get tmp-sync/test4b/move1 attr1 2> /dev/null` |
677
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
331 | if [ "$OUT" = "testvalue" ]; then |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
332 | echo "test 6: xattr not synced" |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
333 | exit 2 |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
334 | fi |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
335 | |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
336 | TAGS=`$DAV_SYNC_BIN list-tags -s test4b tmp-sync/test4b/move_noxattr | wc -l` |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
337 | if [ $TAGS -ne 0 ]; then |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
338 | echo "test 6: tags not removed" |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
339 | exit 2 |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
340 | fi |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
341 | |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
342 | |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
343 | # ---------------------------------------------------------------------------- |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
344 | # test 7: create dir and add xattr and tags, sync |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
345 | # expected result: dir with all metadata synced |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
346 | |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
347 | mkdir tmp-sync/test4a/newdir1 |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
348 | |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
349 | $XATTR set tmp-sync/test4a/newdir1 dirattribute1 "test7attribute" |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
350 | $XATTR set tmp-sync/test4a/newdir1 dirattribute2 "directory" |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
351 | |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
352 | $DAV_SYNC_BIN add-tag -s test4a tmp-sync/test4a/newdir1 "test7" |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
353 | |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
354 | dav_sync_push test4a "test 7: push failed" |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
355 | check_tmpout "0 conflicts" "test 7: wrong conflict counter (push)" |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
356 | check_tmpout "0 errors" "test 7: wrong error counter (push)" |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
357 | check_tmpout "mkcol" "test 7: no mkcol (push)" |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
358 | |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
359 | dav_sync_pull test4b "test 7: pull failed" |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
360 | check_tmpout "0 conflicts" "test 7: wrong conflict counter (pull)" |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
361 | check_tmpout "0 errors" "test 7: wrong error counter (pull)" |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
362 | |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
363 | # check metadata |
771
ffa493657381
replace direct xattrtool path with $XATTR in metadata3 test script
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
770
diff
changeset
|
364 | OUT=`$XATTR get tmp-sync/test4b/newdir1 dirattribute1 2> /dev/null` |
677
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
365 | if [ "$OUT" != "test7attribute" ]; then |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
366 | echo "test 7: xattr 1 not synced" |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
367 | exit 2 |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
368 | fi |
771
ffa493657381
replace direct xattrtool path with $XATTR in metadata3 test script
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
770
diff
changeset
|
369 | OUT=`$XATTR get tmp-sync/test4b/newdir1 dirattribute2 2> /dev/null` |
677
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
370 | if [ "$OUT" != "directory" ]; then |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
371 | echo "test 7: xattr 1 not synced" |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
372 | exit 2 |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
373 | fi |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
374 | |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
375 | TAGS=`$DAV_SYNC_BIN list-tags -s test4b tmp-sync/test4b/newdir1 > tmp-sync/out.txt 2> /dev/null` |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
376 | if [ $? -ne 0 ]; then |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
377 | echo "test 7: list-tags failed" |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
378 | exit 2 |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
379 | fi |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
380 | check_tmpout "test7" "test 7: tag test7 missing" |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
381 | |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
382 | |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
383 | # ---------------------------------------------------------------------------- |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
384 | # test 8: sync again |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
385 | # expected result: no update for newdir1 |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
386 | |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
387 | dav_sync_push test4a "test 8: push failed" |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
388 | check_tmpout "0 conflicts" "test 8: wrong conflict counter (push)" |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
389 | check_tmpout "0 errors" "test 8: wrong error counter (push)" |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
390 | LN=`cat tmp-sync/out.txt | wc -l 2> /dev/null` |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
391 | if [ $LN -ne 1 ]; then |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
392 | echo "test 8 wrong line count" |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
393 | exit 2 |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
394 | fi |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
395 | |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
396 | dav_sync_pull test4b "test 8: pull failed" |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
397 | check_tmpout "0 conflicts" "test 8: wrong conflict counter (pull)" |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
398 | check_tmpout "0 errors" "test 8: wrong error counter (pull)" |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
399 | LN=`cat tmp-sync/out.txt | wc -l 2> /dev/null` |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
400 | if [ $LN -ne 1 ]; then |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
401 | echo "test 8 wrong line count" |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
402 | exit 2 |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
403 | fi |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
404 | |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
405 | |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
406 | # ---------------------------------------------------------------------------- |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
407 | # test 9: change newdir1 metadata and sync |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
408 | # expected result: update |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
409 | |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
410 | $XATTR set tmp-sync/test4a/newdir1 dirattribute1 "test9attribute" |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
411 | $XATTR set tmp-sync/test4a/newdir1 new "hello" |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
412 | |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
413 | $DAV_SYNC_BIN add-tag -s test4a tmp-sync/test4a/newdir1 "test9" |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
414 | |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
415 | dav_sync_push test4a "test 9: push failed" |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
416 | check_tmpout "0 conflicts" "test 9: wrong conflict counter (push)" |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
417 | check_tmpout "0 errors" "test 9: wrong error counter (push)" |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
418 | check_tmpout "update" "test 9: no mkcol (push)" |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
419 | |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
420 | dav_sync_pull test4b "test 9: pull failed" |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
421 | check_tmpout "0 conflicts" "test 9: wrong conflict counter (pull)" |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
422 | check_tmpout "0 errors" "test 9: wrong error counter (pull)" |
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:
772
diff
changeset
|
423 | check_tmpout "update" "test 9: no mkcol (pull)" |
677
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
424 | |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
425 | # check metadata |
771
ffa493657381
replace direct xattrtool path with $XATTR in metadata3 test script
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
770
diff
changeset
|
426 | OUT=`$XATTR get tmp-sync/test4b/newdir1 dirattribute1 2> /dev/null` |
677
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
427 | if [ "$OUT" != "test9attribute" ]; then |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
428 | echo "test 9: xattr 1 not synced" |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
429 | exit 2 |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
430 | fi |
771
ffa493657381
replace direct xattrtool path with $XATTR in metadata3 test script
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
770
diff
changeset
|
431 | OUT=`$XATTR get tmp-sync/test4b/newdir1 dirattribute2 2> /dev/null` |
677
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
432 | if [ "$OUT" != "directory" ]; then |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
433 | echo "test 9: xattr 2 not synced" |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
434 | exit 2 |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
435 | fi |
771
ffa493657381
replace direct xattrtool path with $XATTR in metadata3 test script
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
770
diff
changeset
|
436 | OUT=`$XATTR get tmp-sync/test4b/newdir1 new 2> /dev/null` |
677
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
437 | if [ "$OUT" != "hello" ]; then |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
438 | echo "test 9: xattr 3 not synced" |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
439 | exit 2 |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
440 | fi |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
441 | |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
442 | TAGS=`$DAV_SYNC_BIN list-tags -s test4b tmp-sync/test4b/newdir1 > tmp-sync/out.txt 2> /dev/null` |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
443 | if [ $? -ne 0 ]; then |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
444 | echo "test 9: list-tags failed" |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
445 | exit 2 |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
446 | fi |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
447 | check_tmpout "test9" "test 9: tag test9 missing" |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
448 | |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
449 | |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
450 | # ---------------------------------------------------------------------------- |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
451 | # test 10: sync again |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
452 | # expected result: no update for newdir1 |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
453 | |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
454 | dav_sync_push test4a "test 10: push failed" |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
455 | check_tmpout "0 conflicts" "test 10: wrong conflict counter (push)" |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
456 | check_tmpout "0 errors" "test 10: wrong error counter (push)" |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
457 | LN=`cat tmp-sync/out.txt | wc -l 2> /dev/null` |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
458 | if [ $LN -ne 1 ]; then |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
459 | echo "test 10 wrong line count" |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
460 | exit 2 |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
461 | fi |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
462 | |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
463 | dav_sync_pull test4b "test 10: pull failed" |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
464 | check_tmpout "0 conflicts" "test 10: wrong conflict counter (pull)" |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
465 | check_tmpout "0 errors" "test 10: wrong error counter (pull)" |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
466 | LN=`cat tmp-sync/out.txt | wc -l 2> /dev/null` |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
467 | if [ $LN -ne 1 ]; then |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
468 | echo "test 10 wrong line count" |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
469 | exit 2 |
5a4002f8d258
add more metatests: move with metadata and directory metadata
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
675
diff
changeset
|
470 | fi |