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 500000`
22 RSYNC_LOGIN2=`sudo ./create-user.sh test2@example.com secret 100000`
31 push . --recursive --delete -v
33 if [ ! -z "$ALL" ] ; then # skip tests if false
40 touch --date='2000-01-01' bar
52 uptime > "dir-test/file with spaces"
53 push dir-test --recursive -v
55 find . type -f | xargs -i md5sum {} > /tmp/md5sum
58 push dir-test --recursive --delete -v
61 pull non-existing || true
65 # test md5 import from directory
68 # client should hardlink or copy files locally to avoid wastefull pull
69 # but we test server-side hardlink here
72 md5sum clone/* | sed -e 's! ! _import/foo/bar/baz!' > md5sum
76 # test unused md5 pool quota
92 cat << __SEND__ > .sync/send/timestamp
94 $RSYNC_LOGIN2 dir1/send
95 $RSYNC_LOGIN2 dir2/send
98 # order is important! .sync must be last!
99 push send dir1 dir2 .sync -rv
101 # test receiving of sent files
102 mkdir /tmp/test/$RSYNC_LOGIN2
103 RSYNC_PASSWORD=secret rsync -rv rsync://$RSYNC_LOGIN2@127.0.0.1:6501/$RSYNC_LOGIN2/received/ /tmp/test/$RSYNC_LOGIN2
109 ps ax > Jellyfish.jpg
112 mkdir -p .sync/pending
113 cat << __pending__ > .sync/pending/test
114 MOVED#Jellyfish.jpg#Photos with space/Jellyfish cool.jpg
115 DELETED#Photos with space/Jellyfish cool.jpg
116 DELETED#Photos with space
127 sudo sh -xc "ls -al ~$RSYNC_LOGIN/localhost/"
132 find $SLICE/2001/ -type f | grep -v '/\.' | xargs md5sum | sort > /tmp/test/1
133 FULL=1 $base_dir/user-md5sum.pl u2001 | sort > /tmp/test/2
135 diff /tmp/test/1 /tmp/test/2 && echo "OK - md5 database consistant with filesystem"