projects
/
cloudstore.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
use md5_get instead of TokyoCabinet::HDB
[cloudstore.git]
/
test.sh
diff --git
a/test.sh
b/test.sh
index
175e9ed
..
8518ecf
100755
(executable)
--- a/
test.sh
+++ b/
test.sh
@@
-14,12
+14,14
@@
pull() {
}
}
-sudo ./remove-user.sh test@example.com
-sudo ./remove-user.sh test2@example.com
+
#
sudo ./remove-user.sh test@example.com
+
#
sudo ./remove-user.sh test2@example.com
base_dir=`pwd`
base_dir=`pwd`
-RSYNC_LOGIN=`sudo ./create-user.sh test@example.com secret 500k`
-RSYNC_LOGIN2=`sudo ./create-user.sh test2@example.com secret 100k`
+RSYNC_LOGIN=`sudo ./create-user.sh test@example.com secret 500000`
+RSYNC_LOGIN2=`sudo ./create-user.sh test2@example.com secret 100000`
+
+. ./env.sh
dir=/tmp/test
rm -Rf "$dir"
dir=/tmp/test
rm -Rf "$dir"
@@
-100,17
+102,23
@@
push send dir1 dir2 .sync -rv
mkdir /tmp/test/$RSYNC_LOGIN2
RSYNC_PASSWORD=secret rsync -rv rsync://$RSYNC_LOGIN2@127.0.0.1:6501/$RSYNC_LOGIN2/received/ /tmp/test/$RSYNC_LOGIN2
mkdir /tmp/test/$RSYNC_LOGIN2
RSYNC_PASSWORD=secret rsync -rv rsync://$RSYNC_LOGIN2@127.0.0.1:6501/$RSYNC_LOGIN2/received/ /tmp/test/$RSYNC_LOGIN2
+fi # skip tests
# test file move
# test file move
-pending=/tmp/pending.0610201109464117
-grep ^MOVED $pending | cut -d\# -f2 | xargs -i sh -c "ps ax > {}"
-push . -rv
+ps ax > Jellyfish.jpg
+push Jellyfish.jpg
mkdir -p .sync/pending
mkdir -p .sync/pending
-cp $pending .sync/pending/
+cat << __pending__ > .sync/pending/test
+MOVED#Jellyfish.jpg#Photos with space/Jellyfish cool.jpg
+DELETED#Photos with space/Jellyfish cool.jpg
+DELETED#Photos with space
+__pending__
+
push .sync -rv
push .sync -rv
+exit
ps ax > perms-test
chmod 400 perms-test
ps ax > perms-test
chmod 400 perms-test
@@
-118,13
+126,10
@@
push -va perms-test
sudo sh -xc "ls -al ~$RSYNC_LOGIN/localhost/"
sudo sh -xc "ls -al ~$RSYNC_LOGIN/localhost/"
-pull
-fi # skip tests
-
-find
/test/s1
/2001/ -type f | grep -v '/\.' | xargs md5sum | sort > /tmp/test/1
+find
$SLICE
/2001/ -type f | grep -v '/\.' | xargs md5sum | sort > /tmp/test/1
FULL=1 $base_dir/user-md5sum.pl u2001 | sort > /tmp/test/2
diff /tmp/test/1 /tmp/test/2 && echo "OK - md5 database consistant with filesystem"
FULL=1 $base_dir/user-md5sum.pl u2001 | sort > /tmp/test/2
diff /tmp/test/1 /tmp/test/2 && echo "OK - md5 database consistant with filesystem"