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

Sun, 24 Nov 2019 12:40:28 +0100

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Sun, 24 Nov 2019 12:40:28 +0100
changeset 686
ab159748055c
parent 671
5256d7eb69e7
permissions
-rwxr-xr-x

add more symlink tests

622
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
1 #!/bin/sh
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
2 #
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
4 #
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
5 # Copyright 2019 Olaf Wintermann. All rights reserved.
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
6 #
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
7 # Redistribution and use in source and binary forms, with or without
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
8 # modification, are permitted provided that the following conditions are met:
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
9 #
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
10 # 1. Redistributions of source code must retain the above copyright
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
11 # notice, this list of conditions and the following disclaimer.
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
12 #
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
13 # 2. Redistributions in binary form must reproduce the above copyright
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
14 # notice, this list of conditions and the following disclaimer in the
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
15 # documentation and/or other materials provided with the distribution.
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
16 #
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
17 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
18 # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
19 # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
20 # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
21 # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
22 # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
23 # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
24 # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
25 # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
6524f45f304e add some dav-sync pull tests
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
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
27 # POSSIBILITY OF SUCH DAMAGE.
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
28 #
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
29
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
30 if [ -z "$DAV_BIN" ];
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
31 then
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
32 echo "DAV_BIN variable not set"
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
33 exit 1
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
34 fi
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
35 if [ -z "$DAV_SYNC_BIN" ];
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
36 then
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
37 echo "DAV_BIN variable not set"
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
38 exit 1
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
39 fi
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
40
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
41 # checks if tmp-sync/out.txt contains a specific text
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
42 # arg1: pattern
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
43 # arg2: errormsg
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
44 check_tmpout()
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
45 {
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
46 TEST=`cat tmp-sync/out.txt | grep "$1"`
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
47 if [ $? -ne 0 ];
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
48 then
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
49 echo "$2"
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
50 exit 2
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
51 fi
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
52 }
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
53
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
54 # do dav-sync push and check return value
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
55 # arg1: dir
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
56 # arg2: errormsg
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
57 dav_sync_push()
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
58 {
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
59 $DAV_SYNC_BIN push $1 > tmp-sync/out.txt
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
60 if [ $? -ne 0 ];
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
61 then
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
62 echo "$2"
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
63 exit 2
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
64 fi
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
65 }
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
66 # do dav-sync pull and check return value
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
67 # arg1: dir
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
68 # arg2: errormsg
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
69 dav_sync_pull()
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
70 {
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
71 $DAV_SYNC_BIN pull $1 > tmp-sync/out.txt
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
72 if [ $? -ne 0 ];
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
73 then
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
74 echo "$2"
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
75 exit 2
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
76 fi
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
77 }
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
78
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
79 $DAV_BIN mkcol dav-test-repo/sync/test1 2> /dev/null
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
80 $DAV_BIN mkcol dav-test-repo/sync/test2 2> /dev/null
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
81
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
82 # ----------------------------------------------------------------------------
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
83 # 1. test: pull empty collection
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
84 # expected result: 0 files pulled, 0 errors
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
85 dav_sync_pull test1b "test1: pull failed"
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
86
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
87 check_tmpout "0 files pulled" "pull1: wrong pull counter"
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
88 check_tmpout "0 errors" "pull1: wrong error counter"
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
89 check_tmpout "0 conflicts" "pull1: wrong conflicts counter"
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
90
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
91 # ----------------------------------------------------------------------------
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
92 # 2. test: add 2 files to test1a and push it and pull test1b
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
93 # expected result: 2 files pushed, 2 files pulled
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
94
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
95 rm -f .dav/dav-sync-tests-test1a-db.xml
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
96
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
97 cp synctest/file1 tmp-sync/test1a
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
98 cp synctest/file2 tmp-sync/test1a
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
99
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
100 dav_sync_push test1a "test2: push failed"
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
101 check_tmpout "2 files pushed" "test2: wrong push counter"
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
102
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
103 dav_sync_pull test1b "test2: pull failed"
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
104 check_tmpout "2 files pulled" "test2: wrong pull counter"
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
105 check_tmpout "0 errors" "test2: wrong error counter"
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
106 check_tmpout "0 conflicts" "test2: wrong conflicts counter"
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
107
625
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
108 cat tmp-sync/test1b/file1 > /dev/null 2>&1
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
109 if [ $? -ne 0 ]; then
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
110 echo "test2: missing file1"
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
111 fi
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
112 cat tmp-sync/test1b/file2 > /dev/null 2>&1
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
113 if [ $? -ne 0 ]; then
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
114 echo "test2: missing file2"
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
115 fi
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
116
622
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
117 # ----------------------------------------------------------------------------
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
118 # 3. test: pull empty directory
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
119 # expected result: empty directory created
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
120
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
121 mkdir tmp-sync/test1a/emptydir
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
122 dav_sync_push test1a "test3: push failed"
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
123 check_tmpout "mkcol" "test3: mkcol missing"
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
124
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
125
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
126
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
127 dav_sync_pull test1b "test3: pull failed"
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
128 ls tmp-sync/test1b/emptydir > /dev/null 2>&1
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
129 if [ $? -ne 0 ]; then
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
130 echo "emptydir not created"
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
131 exit 2
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
132 fi
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
133
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
134 # check if file1 or file2 are pulled
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
135 TEST=`cat tmp-sync/out.txt | grep "get: /file1"`
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
136 if [ $? -eq 0 ]; then
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
137 echo "test3: file1 must not be pulled"
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
138 exit 2
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
139 fi
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
140 TEST=`cat tmp-sync/out.txt | grep "get: /file2"`
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
141 if [ $? -eq 0 ]; then
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
142 echo "test3: file2 must not be pulled"
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
143 exit 2
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
144 fi
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
145
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
146 # ----------------------------------------------------------------------------
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
147 # 4. test: do nothing, test if double mkdir happens
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
148 # expected result: no files pulled, no mkdir
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
149
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
150 dav_sync_pull test1b "test4: pull failed"
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
151
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
152 check_tmpout "0 files pulled" "test4: wrong pull counter"
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
153 check_tmpout "0 errors" "test4: wrong error counter"
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
154 check_tmpout "0 conflicts" "test4: wrong conflicts counter"
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
155
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
156 OUT=`cat tmp-sync/out.txt | wc -l`
671
5256d7eb69e7 fix test system on solaris
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 627
diff changeset
157 if [ $OUT -ne 1 ]; then
622
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
158 echo "test4: wrong line count"
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
159 exit 2
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
160 fi
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
161
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
162 # ----------------------------------------------------------------------------
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
163 # 5. test: pull changed files
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
164 # expected result: 1 file pulled
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
165
625
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
166 echo testx5 > tmp-sync/test1a/file1
622
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
167 dav_sync_push test1a "test5: push failed"
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
168 check_tmpout "1 file pushed" "test5: wrong push counter"
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
169
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
170 dav_sync_pull test1b "test5: pull failed"
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
171 check_tmpout "0 errors" "test5: wrong error counter"
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
172 check_tmpout "0 conflicts" "test5: wrong conflicts counter"
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
173
625
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
174 TEST=`cat tmp-sync/test1b/file1`
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
175 if [ $TEST != "testx5" ]; then
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
176 echo "test5: wrong content"
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
177 exit 2
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
178 fi
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
179
622
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
180 # ----------------------------------------------------------------------------
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
181 # 6. test: pull new dir and files
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
182 # expected result: mkdir and some files pulled
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
183
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
184 mkdir tmp-sync/test1a/subdir
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
185 cp testdir/subdir/sub1 tmp-sync/test1a/subdir/
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
186 cp testdir/subdir/sub2 tmp-sync/test1a/subdir/
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
187 dav_sync_push test1a "test6: push failed"
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
188
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
189 dav_sync_pull test1b "test6: pull failed"
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
190 check_tmpout "get: /subdir/sub1" "test6: sub1 not pulled"
6524f45f304e add some dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
191 check_tmpout "get: /subdir/sub2" "test6: sub2 not pulled"
625
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
192
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
193
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
194 # ----------------------------------------------------------------------------
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
195 # 7. test: pull deep dir hierarchy with some files
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
196 # expected result: mkdir in correct order (see push1 test 6)
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
197
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
198 mkdir -p tmp-sync/test1a/dir_a/1/2/3/4/5/6/7/8
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
199 mkdir -p tmp-sync/test1a/dir_a/1/2/3/a/b/c/d
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
200 mkdir -p tmp-sync/test1a/dir_a/i/j/k
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
201 mkdir -p tmp-sync/test1a/dir_b/1/2/3/4/5/6/7/8
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
202 mkdir -p tmp-sync/test1a/dir_b/1/2/3/a/b/c/d
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
203 mkdir -p tmp-sync/test1a/dir_b/i/j/k
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
204 mkdir -p tmp-sync/test1a/dir_c/sub1/sub2/sub3/sub4
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
205 mkdir -p tmp-sync/test1a/dir_c/sub1/sub2/1
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
206 mkdir -p tmp-sync/test1a/dir_c/sub1/sub2/2
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
207 mkdir -p tmp-sync/test1a/dir_c/sub1/sub2/3
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
208 mkdir -p tmp-sync/test1a/dir_c/sub1/sub2/4
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
209 mkdir -p tmp-sync/test1a/dir_c/sub1/sub2/5
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
210 mkdir -p tmp-sync/test1a/dir_c/sub_a/x
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
211 mkdir -p tmp-sync/test1a/dir_c/sub_a/y/d1/d2/d3
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
212 touch tmp-sync/test1a/dir_a/1/2/3/4/5/6/7/8/file1
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
213 touch tmp-sync/test1a/dir_a/1/2/3/4/5/6/7/file1
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
214 touch tmp-sync/test1a/dir_a/1/2/3/4/5/6/file1
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
215 touch tmp-sync/test1a/dir_a/1/2/3/a/b/c/d/d_file1
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
216 touch tmp-sync/test1a/dir_a/1/2/3/a/b/b_file1
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
217 touch tmp-sync/test1a/dir_a/a_file
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
218
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
219 echo "test6-file-1" > tmp-sync/test1a/dir_b/1/2/3/4/5/6/7/8/t6f1-8
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
220 echo "test6-file-2" > tmp-sync/test1a/dir_b/i/t6f2-i
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
221 echo "test6-file-3" > tmp-sync/test1a/dir_c/sub1/sub2/sub3/sub4/t6f3-s4
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
222 echo "test6-file-4" > tmp-sync/test1a/dir_c/sub1/sub2/3/t6f4-3
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
223
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
224 dav_sync_push test1a "test7: push failed"
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
225 check_tmpout "10 files pushed" "test7: wrong push counter"
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
226
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
227 dav_sync_pull test1b "test7: pull failed"
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
228 check_tmpout "0 errors" "test7: wrong error counter"
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
229 check_tmpout "0 conflicts" "test7: wrong conflicts counter"
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
230
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
231 # check if all files are pulled
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
232 cat tmp-sync/test1b/dir_a/1/2/3/4/5/6/7/8/file1 > /dev/null 2>&1
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
233 if [ $? -ne 0 ]; then
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
234 echo "test 7: missing file: 1"
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
235 exit 2
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
236 fi
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
237 cat tmp-sync/test1b/dir_a/1/2/3/4/5/6/7/file1 > /dev/null 2>&1
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
238 if [ $? -ne 0 ]; then
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
239 echo "test 7: missing file: 2"
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
240 exit 2
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
241 fi
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
242 cat tmp-sync/test1b/dir_a/1/2/3/4/5/6/file1 > /dev/null 2>&1
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
243 if [ $? -ne 0 ]; then
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
244 echo "test 7: missing file: 3"
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
245 exit 2
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
246 fi
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
247 cat tmp-sync/test1b/dir_a/1/2/3/a/b/c/d/d_file1 > /dev/null 2>&1
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
248 if [ $? -ne 0 ]; then
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
249 echo "test 7: missing file: 4"
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
250 exit 1
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
251 fi
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
252 cat tmp-sync/test1b/dir_a/1/2/3/a/b/b_file1 > /dev/null 2>&1
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
253 if [ $? -ne 0 ]; then
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
254 echo "test 7: missing file: 5"
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
255 exit 2
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
256 fi
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
257 cat tmp-sync/test1b/dir_a/a_file > /dev/null 2>&1
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
258 if [ $? -ne 0 ]; then
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
259 echo "test 7: missing file: 6"
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
260 exit 2
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
261 fi
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
262
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
263 cat tmp-sync/test1b/dir_b/1/2/3/4/5/6/7/8/t6f1-8 > /dev/null 2>&1
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
264 if [ $? -ne 0 ]; then
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
265 echo "test 7: missing file: 7"
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
266 exit 2
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
267 fi
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
268 cat tmp-sync/test1b/dir_b/i/t6f2-i > /dev/null 2>&1
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
269 if [ $? -ne 0 ]; then
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
270 echo "test 7: missing file: 8"
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
271 exit 2
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
272 fi
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
273 cat tmp-sync/test1b/dir_c/sub1/sub2/sub3/sub4/t6f3-s4 > /dev/null 2>&1
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
274 if [ $? -ne 0 ]; then
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
275 echo "test 7: missing file: 9"
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
276 exit 2
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
277 fi
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
278 cat tmp-sync/test1b/dir_c/sub1/sub2/3/t6f4-3 > /dev/null 2>&1
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
279 if [ $? -ne 0 ]; then
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
280 echo "test 7: missing file: 10"
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
281 exit 2
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
282 fi
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
283
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
284 # ----------------------------------------------------------------------------
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
285 # 8. test: delete file
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
286 # expected result: 1 file deleted
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
287
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
288 rm tmp-sync/test1a/file1
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
289
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
290 dav_sync_push test1a
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
291 check_tmpout "1 file deleted" "test8: wrong delete counter"
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
292
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
293 dav_sync_pull test1b
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
294 check_tmpout "1 file deleted" "test8: wrong delete counter"
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
295
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
296 TEST=`cat tmp-sync/out.txt | grep "delete: /file1"`
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
297 if [ $? -ne 0 ]; then
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
298 echo "test8: file1 not deleted (log)"
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
299 exit 2
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
300 fi
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
301
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
302 cat tmp-sync/test1b/file1 > /dev/null 2>&1 # should fail
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
303 if [ $? -eq 0 ]; then
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
304 echo "test8: file1 not deleted"
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
305 exit 2
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
306 fi
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
307
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
308 # ----------------------------------------------------------------------------
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
309 # 9. test: delete multiple files
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
310 # expected result: multiple files deleted
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
311
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
312 rm tmp-sync/test1a/file2
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
313 rm tmp-sync/test1a/subdir/sub1
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
314 rm tmp-sync/test1a/subdir/sub2
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
315
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
316 dav_sync_push test1a
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
317 check_tmpout "3 files deleted" "test9: wrong delete counter"
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
318
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
319 dav_sync_pull test1b
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
320 check_tmpout "3 files deleted" "test9: wrong delete counter"
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
321 check_tmpout "0 errors" "test9: wrong error counter"
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
322 check_tmpout "0 conflicts" "test9: wrong conflicts counter"
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
323
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
324 TEST=`cat tmp-sync/out.txt | grep "delete: /subdir/sub1"`
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
325 if [ $? -ne 0 ]; then
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
326 echo "test9: sub1 not deleted (log)"
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
327 exit 2
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
328 fi
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
329 TEST=`cat tmp-sync/out.txt | grep "delete: /subdir/sub2"`
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
330 if [ $? -ne 0 ]; then
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
331 echo "test9: sub2 not deleted (log)"
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
332 exit 2
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
333 fi
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
334
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
335 cat tmp-sync/test1b/file2 > /dev/null 2>&1 # should fail
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
336 if [ $? -eq 0 ]; then
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
337 echo "test9: file2 not deleted"
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
338 exit 2
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
339 fi
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
340 cat tmp-sync/test1b/subdir/sub1 > /dev/null 2>&1 # should fail
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
341 if [ $? -eq 0 ]; then
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
342 echo "test9: sub1 not deleted"
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
343 exit 2
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
344 fi
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
345 cat tmp-sync/test1b/subdir/sub2 > /dev/null 2>&1 # should fail
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
346 if [ $? -eq 0 ]; then
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
347 echo "test9: sub2 not deleted"
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
348 exit 2
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
349 fi
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
350
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
351 OUT=`ls tmp-sync/test1b/subdir/ | wc -l`
671
5256d7eb69e7 fix test system on solaris
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 627
diff changeset
352 if [ $OUT -ne 0 ];
625
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
353 then
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
354 echo "test9: test1b/subdir not empty"
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
355 exit 2
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
356 fi
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
357
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
358 # ----------------------------------------------------------------------------
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
359 # 10. test: delete empty dir
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
360 # expected result: pull deletes local empty dir
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
361
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
362 rm -Rf tmp-sync/test1a/subdir/
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
363
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
364 dav_sync_push test1a
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
365
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
366 dav_sync_pull test1b
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
367 check_tmpout "0 errors" "test10: wrong error counter"
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
368 check_tmpout "0 conflicts" "test10: wrong conflicts counter"
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
369
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
370 TEST=`ls tmp-sync/test1b/ | grep subdir`
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
371 if [ $? -eq 0 ]; then
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
372 echo "test10: subdir not deleted"
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
373 fi
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
374
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
375 # ----------------------------------------------------------------------------
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
376 # 11. test: delete deep dir hierarchy
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
377 # expected result: 0 errors, everything deleted
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
378
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
379 rm -Rf tmp-sync/test1a/dir_a
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
380
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
381 dav_sync_push test1a
627
81e066c9ff87 finish basic pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 625
diff changeset
382
625
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
383 dav_sync_pull test1b
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
384 check_tmpout "0 errors" "test10: wrong error counter"
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
385 check_tmpout "0 conflicts" "test10: wrong conflicts counter"
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
386
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
387 TEST=`ls tmp-sync/test1b/ | grep dir_a`
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
388 if [ $? -eq 0 ]; then
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
389 echo "test10: dir_a not deleted"
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
390 fi
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
391
627
81e066c9ff87 finish basic pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 625
diff changeset
392 # ----------------------------------------------------------------------------
81e066c9ff87 finish basic pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 625
diff changeset
393 # 11. test: delete all
81e066c9ff87 finish basic pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 625
diff changeset
394 # expected result: empty dir (except .trash)
625
e1a85fbf68f9 add more dav-sync pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 622
diff changeset
395
627
81e066c9ff87 finish basic pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 625
diff changeset
396 rm -Rf tmp-sync/test1a/*
81e066c9ff87 finish basic pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 625
diff changeset
397
81e066c9ff87 finish basic pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 625
diff changeset
398 dav_sync_push test1a
81e066c9ff87 finish basic pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 625
diff changeset
399
81e066c9ff87 finish basic pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 625
diff changeset
400 dav_sync_pull test1b
81e066c9ff87 finish basic pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 625
diff changeset
401 check_tmpout "0 errors" "test10: wrong error counter"
81e066c9ff87 finish basic pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 625
diff changeset
402 check_tmpout "0 conflicts" "test10: wrong conflicts counter"
81e066c9ff87 finish basic pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 625
diff changeset
403
81e066c9ff87 finish basic pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 625
diff changeset
404 OUT=`ls tmp-sync/test1b/ | wc -l`
671
5256d7eb69e7 fix test system on solaris
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 627
diff changeset
405 if [ $OUT -ne 0 ]; then
627
81e066c9ff87 finish basic pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 625
diff changeset
406 echo "test1b not empty"
81e066c9ff87 finish basic pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 625
diff changeset
407 exit 2
81e066c9ff87 finish basic pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 625
diff changeset
408 fi
81e066c9ff87 finish basic pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 625
diff changeset
409
81e066c9ff87 finish basic pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 625
diff changeset
410
81e066c9ff87 finish basic pull tests
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 625
diff changeset
411

mercurial