3 # Copyright (C) 2001 by Martin Pool <mbp@samba.org>
5 # This program is distributable under the terms of the GNU GPL (see
8 # This test starts up an rsync daemon on a high-numbered port using a
9 # configuration file from the test directory. I can't think of a good
10 # way to choose it dynamically at the moment, so we just use 2612. If
11 # that's in use then you lose.
13 # Having started the server we try some basic operations against it:
15 # getting a list of module
16 # listing files in a module
18 # uploading to a module
19 # checking the log file
20 # password authentication
22 # TODO: Put the common framework in a common file, so that we can have
23 # subtests fail and keep going.
25 source "$suitedir/rsync.fns"
27 # Build an appropriate configuration file
28 conf="$scratchdir/test-rsyncd.conf"
29 echo "building configuration $conf"
32 pidfile="$scratchdir/rsyncd.pid"
33 logfile="$scratchdir/rsyncd.log"
36 # rsyncd configuration file autogenerated by $0
40 hosts allow = localhost, 127.0.0.1
43 [test-from] = $scratchdir/daemon-from/
46 [test-to] = $scratchdir/daemon-to/
54 $rsync_bin --daemon --port $port --config $conf
57 echo rsyncd running as process $pid
60 # We need to make sure that we always kill rsync, even if there's an
61 # error. Otherwise it might hang around, and be insecure or at any
62 # rate keep the port bound and prevent the tests running in the
65 trap "echo killing off process $pid; kill $pid" EXIT