diff --git a/t/t53-check-info-expand-output b/t/t53-check-info-expand-output index 1d3bc28..7ab8f9e 100644 --- a/t/t53-check-info-expand-output +++ b/t/t53-check-info-expand-output @@ -48,6 +48,22 @@ do [ "$wr" = "1" ] && expect " R W .(u1).foo/u1/bar" [ "$wr" = "1" ] && expect "@R_ @W_..gitolite..testing" + name "gitolite info u1" + runlocal ssh gitolite info . u1 + expect "hello u1, the gitolite version here is" + expect " @R_ @W_.testing" + [ "$wr" = "1" ] && [ "$bc" = "0" ] && expect " C R W .foo/u1/\\.\\+" + [ "$wr" = "1" ] && [ "$bc" = "1" ] && notexpect " C R W .foo/u1/\\.\\+" + [ "$wr" = "1" ] && [ "$bc" = "1" ] && expect " C .@gfoo" + + name "gitolite expand u1" + runlocal ssh gitolite expand . u1 + [ "$wr" = "0" ] && expect "wildrepos disabled, sorry" + # XXX TODO -- expand currently does not allow superuser to query for others + # [ "$wr" = "1" ] && expect "hello u1, the gitolite version here is" + # [ "$wr" = "1" ] && expect " R W .(u1).foo/u1/bar" + # [ "$wr" = "1" ] && expect "@R_ @W_..gitolite..testing" + name INTERNAL done done diff --git a/t/t65-rsync b/t/t65-rsync new file mode 100644 index 0000000..aed4f30 --- /dev/null +++ b/t/t65-rsync @@ -0,0 +1,83 @@ +# vim: syn=sh: +cd $TESTDIR +$TESTDIR/rollback || die "rollback failed" + +runremote rm -rf /tmp/rsyncbase +runremote mkdir /tmp/rsyncbase +editrc REPO_UMASK 0022 +echo "\$RSYNC_BASE = '/tmp/rsyncbase';" | addrc + +# ---------- + +name "INTERNAL" +echo " + @leads = u1 u2 + @devs = u1 u2 u3 u4 + + repo EXTCMD/rsync + RW NAME/ = u1 + - NAME/spl = @all + RW NAME/ = u2 + RW NAME/foo/ = u3 +" | ugc +expect_push_ok "master -> master" + +name "u1 rsync to frob" +cd ~/gitolite-admin +runlocal rsync -avP conf u1:frob +expect conf/gitolite.conf +expect 386.*100% +expect "total size is 386" +runlocal find /tmp/rsyncbase -type f +expect /tmp/rsyncbase/frob/conf/gitolite.conf + +name "u1 rsync from frob to local" +cd ~/td +rm -rf frobhere +runlocal rsync -avP u1:frob frobhere +runlocal find frobhere -type f +expect frobhere/frob/conf/gitolite.conf + +name "u2 rsync to nitz" +cd ~/gitolite-admin +runlocal rsync -avP conf u2:nitz +expect conf/gitolite.conf +expect 386.*100% +expect "total size is 386" +runlocal find /tmp/rsyncbase -type f +expect /tmp/rsyncbase/nitz/conf/gitolite.conf + +name "u2 rsync to spl" +cd ~/gitolite-admin +runlocal rsync -avP conf u2:spl +expect "W NAME/spl u2 DENIED by NAME/spl" + +name "u1 rsync to spl" +cd ~/gitolite-admin +runlocal rsync -avP conf u1:spl +expect 386.*100% +expect "total size is 386" + +name "u2 rsync from spl" +cd ~/td +runlocal rsync -avP u2:spl splhere +expect "R NAME/spl u2 DENIED by NAME/spl" + +name "u1 rsync from spl" +cd ~/td +runlocal rsync -avP u1:spl splhere +expect 386.*100% +expect "total size is 386" + +name "u3 rsync to foo" +cd ~/gitolite-admin +runlocal rsync -avP conf u3:foo/ +expect 386.*100% +expect "total size is 386" + +name "u3 rsync to bar" +cd ~/gitolite-admin +runlocal rsync -avP conf u3:bar +expect "W NAME/bar EXTCMD/rsync u3 DENIED by fallthru" + +name "INTERNAL"