test /.send/to/dir/file
authorDobrica Pavlinusic <dpavlin@rot13.org>
Thu, 8 Sep 2011 17:09:47 +0000 (17:09 +0000)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Thu, 8 Sep 2011 17:09:47 +0000 (17:09 +0000)
test.sh

diff --git a/test.sh b/test.sh
index dafa4a6..39918ce 100755 (executable)
--- a/test.sh
+++ b/test.sh
@@ -5,13 +5,13 @@ rm -Rvf $user_dir/log/* #$user_dir/blob/*
 
 push() {
        file=`shift`
-       RSYNC_PASSWORD=secret rsync $* $file rsync://test+localhost@127.0.0.1:6501/test/$file
+       RSYNC_PASSWORD=secret rsync $* $file rsync://test+localhost@127.0.0.1:6501/test/localhost/$file
 }
 pull() {
        from=$1
        to=$2
        test -z "$to" && to=$1
-       RSYNC_PASSWORD=secret rsync rsync://test+localhost@127.0.0.1:6501/test/$from $to
+       RSYNC_PASSWORD=secret rsync rsync://test+localhost@127.0.0.1:6501/test/localhost/$from $to
 }
 
 
@@ -20,6 +20,9 @@ pull() {
 ./create-user.sh test secret
 ./create-user.sh test secret localhost
 
+./remove-user.sh test2
+./create-user.sh test2 secret
+
 dir=/tmp/test
 rm -Rf "$dir"
 mkdir /tmp/test
@@ -66,6 +69,14 @@ md5sum clone/* | sed -e 's!  !  _import/foo/bar/baz!' > md5sum
 cat md5sum
 push md5sum -v
 
+# test send
+
+ps ax >> sent-to-test2
+mkdir -p .send/test2/received
+ln -s ../../../sent-to-test2 .send/test2/received/
+
+push .send -rvl
+
 tail -20 $user_dir/log/*
 
 #diff -urw $user_dir/blob $dir/