7 RSYNC_PASSWORD=secret rsync $* $file rsync://$RSYNC_LOGIN@127.0.0.1:6501/$RSYNC_LOGIN/localhost/$file
12 test -z "$to" && to=$1
13 RSYNC_PASSWORD=secret rsync rsync://$RSYNC_LOGIN@127.0.0.1:6501/$RSYNC_LOGIN/localhost/$from $to
17 sudo ./remove-user.sh test@example.com
18 sudo ./remove-user.sh test2@example.com
21 RSYNC_LOGIN=`sudo ./create-user.sh test@example.com secret 500k`
22 RSYNC_LOGIN2=`sudo ./create-user.sh test2@example.com secret 100k`
29 push . --recursive --delete -v
31 if [ ! -z "$ALL" ] ; then # skip tests if false
38 touch --date='2000-01-01' bar
50 uptime > "dir-test/file with spaces"
51 push dir-test --recursive -v
53 find . type -f | xargs -i md5sum {} > /tmp/md5sum
56 push dir-test --recursive --delete -v
59 pull non-existing || true
63 # test md5 import from directory
66 # client should hardlink or copy files locally to avoid wastefull pull
67 # but we test server-side hardlink here
70 md5sum clone/* | sed -e 's! ! _import/foo/bar/baz!' > md5sum
74 # test unused md5 pool quota
90 cat << __SEND__ > .sync/send/timestamp
92 $RSYNC_LOGIN2 dir1/send
93 $RSYNC_LOGIN2 dir2/send
96 # order is important! .sync must be last!
97 push send dir1 dir2 .sync -rv
99 # test receiving of sent files
100 mkdir /tmp/test/$RSYNC_LOGIN2
101 RSYNC_PASSWORD=secret rsync -rv rsync://$RSYNC_LOGIN2@127.0.0.1:6501/$RSYNC_LOGIN2/received/ /tmp/test/$RSYNC_LOGIN2
106 pending=/tmp/pending.0610201109464117
107 grep ^MOVED $pending | cut -d\# -f2 | xargs -i sh -c "ps ax > {}"
110 mkdir -p .sync/pending
111 cp $pending .sync/pending/
119 sudo sh -xc "ls -al ~$RSYNC_LOGIN/localhost/"
127 find /test/s1/2001/ -type f | grep -v '/\.' | xargs md5sum | sort > /tmp/test/1
128 FULL=1 $base_dir/user-md5sum.pl u2001 | sort > /tmp/test/2
130 diff /tmp/test/1 /tmp/test/2 && echo "OK - md5 database consistant with filesystem"