implement and test mv from pending log
[cloudstore.git] / test.sh
diff --git a/test.sh b/test.sh
index 8677ce6..200af6b 100755 (executable)
--- a/test.sh
+++ b/test.sh
@@ -1,9 +1,6 @@
 #!/bin/sh -xe
 
-user_dir=/srv/cloudstore/users/test/
-rm -Rvf $user_dir/log/* #$user_dir/blob/*
-
-RSYNC_LOGIN=u2000
+RSYNC_LOGIN=fake
 
 push() {
        file=`shift`
@@ -80,8 +77,6 @@ push tmp -v
 rm tmp
 push . -r --delete -v
 
-fi # skip tests
-
 # test send
 
 ps ax >> send
@@ -100,3 +95,15 @@ __SEND__
 # order is important! .sync must be last!
 push send dir1 dir2 .sync -rv
 
+
+fi # skip tests
+
+# test file move
+
+pending=/tmp/pending.0610201109464117
+grep ^MOVED $pending | cut -d\# -f2 | xargs -i sh -c "ps ax > {}"
+push . -rv
+
+mkdir -p .sync/pending
+cp $pending .sync/pending/
+push .sync -rv