dump user md5sum file and use it for test
[cloudstore.git] / test.sh
diff --git a/test.sh b/test.sh
index 829c9a6..9781631 100755 (executable)
--- a/test.sh
+++ b/test.sh
@@ -16,6 +16,7 @@ pull() {
 
 sudo ./remove-user.sh test@example.com
 sudo ./remove-user.sh test2@example.com
+base_dir=`pwd`
 
 RSYNC_LOGIN=`sudo ./create-user.sh test@example.com secret 500k`
 RSYNC_LOGIN2=`sudo ./create-user.sh test2@example.com secret 20k`
@@ -111,8 +112,6 @@ cp $pending .sync/pending/
 push .sync -rv
 
 
-fi # skip tests
-
 ps ax > perms-test
 chmod 400 perms-test
 push -va perms-test
@@ -120,3 +119,13 @@ push -va perms-test
 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
+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"
+