new .sync/send/timestamp
[cloudstore.git] / test.sh
diff --git a/test.sh b/test.sh
index c6b2e04..8677ce6 100755 (executable)
--- a/test.sh
+++ b/test.sh
@@ -28,9 +28,10 @@ rm -Rf "$dir"
 mkdir /tmp/test
 cd $dir
 
-if true ; then # skip tests if false
-
 push . --recursive --delete -v
+
+if false ; then # skip tests if false
+
 ps ax > foo
 push foo -v
 push foo -v
@@ -72,8 +73,6 @@ md5sum clone/* | sed -e 's!  !  _import/foo/bar/baz!' > md5sum
 cat md5sum
 push md5sum -v
 
-fi # skip tests
-
 # test unused md5 pool quota
 
 ps ax > tmp
@@ -81,14 +80,23 @@ push tmp -v
 rm tmp
 push . -r --delete -v
 
-exit
+fi # skip tests
 
 # test send
 
-ps ax >> sent-to-$RSYNC_LOGIN2
-push sent-to-$RSYNC_LOGIN2 # must be done before first send
+ps ax >> send
+mkdir dir1
+ps ax >> dir1/send
+mkdir dir2
+ps ax >> dir2/send
+
+mkdir -p .sync/send
+cat << __SEND__ > .sync/send/timestamp
+$RSYNC_LOGIN2 send
+$RSYNC_LOGIN2 dir1/send
+$RSYNC_LOGIN2 dir2/send
+__SEND__
 
-mkdir -p .send/$RSYNC_LOGIN2/received
-ln -s ../../../sent-to-$RSYNC_LOGIN2 .send/$RSYNC_LOGIN2/received/new-name
+# order is important! .sync must be last!
+push send dir1 dir2 .sync -rv
 
-push .send -rvl