2011-01-10 17:37:39 +01:00
|
|
|
# vim: syn=sh:
|
|
|
|
cd $TESTDIR
|
|
|
|
$TESTDIR/rollback || die "rollback failed"
|
|
|
|
|
2011-10-17 03:11:40 +02:00
|
|
|
rm -rf $ADC_PATH
|
|
|
|
mkdir $ADC_PATH || die "mkdir $ADC_PATH failed"
|
|
|
|
cp ../contrib/adc/* $ADC_PATH
|
|
|
|
echo "\$GL_ADC_PATH = '$ADC_PATH';" | addrc
|
|
|
|
|
2011-01-10 17:37:39 +01:00
|
|
|
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
|
2011-01-15 16:39:56 +01:00
|
|
|
expect 100%
|
|
|
|
expect "total size is"
|
2011-01-10 17:37:39 +01:00
|
|
|
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
|
2011-01-15 16:39:56 +01:00
|
|
|
expect 100%
|
|
|
|
expect "total size is"
|
2011-01-10 17:37:39 +01:00
|
|
|
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
|
2011-10-18 04:33:05 +02:00
|
|
|
expect "W NAME/spl EXTCMD/rsync u2 DENIED by NAME/spl"
|
2011-01-10 17:37:39 +01:00
|
|
|
|
|
|
|
name "u1 rsync to spl"
|
|
|
|
cd ~/gitolite-admin
|
|
|
|
runlocal rsync -avP conf u1:spl
|
2011-01-15 16:39:56 +01:00
|
|
|
expect 100%
|
|
|
|
expect "total size is"
|
2011-01-10 17:37:39 +01:00
|
|
|
|
|
|
|
name "u2 rsync from spl"
|
|
|
|
cd ~/td
|
|
|
|
runlocal rsync -avP u2:spl splhere
|
2011-10-18 04:33:05 +02:00
|
|
|
expect "R NAME/spl EXTCMD/rsync u2 DENIED by NAME/spl"
|
2011-01-10 17:37:39 +01:00
|
|
|
|
|
|
|
name "u1 rsync from spl"
|
|
|
|
cd ~/td
|
|
|
|
runlocal rsync -avP u1:spl splhere
|
2011-01-15 16:39:56 +01:00
|
|
|
expect 100%
|
|
|
|
expect "total size is"
|
2011-01-10 17:37:39 +01:00
|
|
|
|
|
|
|
name "u3 rsync to foo"
|
|
|
|
cd ~/gitolite-admin
|
|
|
|
runlocal rsync -avP conf u3:foo/
|
2011-01-15 16:39:56 +01:00
|
|
|
expect 100%
|
|
|
|
expect "total size is"
|
2011-01-10 17:37:39 +01:00
|
|
|
|
|
|
|
name "u3 rsync to bar"
|
|
|
|
cd ~/gitolite-admin
|
|
|
|
runlocal rsync -avP conf u3:bar
|
2011-10-18 04:33:05 +02:00
|
|
|
expect "W NAME/bar EXTCMD/rsync u3 DENIED by fallthru"
|
2011-01-10 17:37:39 +01:00
|
|
|
|
|
|
|
name "INTERNAL"
|