#!/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`
push . --recursive --delete -v
-if false ; then # skip tests if false
+if true ; then # skip tests if false
ps ax > foo
push foo -v
rm tmp
push . -r --delete -v
-fi # skip tests
-
# test send
ps ax >> 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