gitolite/t/t65-rsync
Sitaram Chamarty 85da5572b2 some nice ADC changes... (warning: minor backward compat breakage)
- support for ADCs with unchecked arguments
  - rsync, htpasswd, and svnserve gone from core; turned into ADCs

Backward compat breakage and fix: Please see documentation for details,
but if you're using gitolite to control rsync you will now need to setup
ADCs (admin defined commands), and install at least the new "rsync" ADC.

----

Thanks to Joey Hess (see commit prior to this) for forcing me to stop
being lazy and get this out of my long term todo list.
2011-10-17 18:42:57 +05:30

89 lines
1.9 KiB
Plaintext

# vim: syn=sh:
cd $TESTDIR
$TESTDIR/rollback || die "rollback failed"
rm -rf $ADC_PATH
mkdir $ADC_PATH || die "mkdir $ADC_PATH failed"
cp ../contrib/adc/* $ADC_PATH
echo "\$GL_ADC_PATH = '$ADC_PATH';" | addrc
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 100%
expect "total size is"
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 100%
expect "total size is"
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 100%
expect "total size is"
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 100%
expect "total size is"
name "u3 rsync to foo"
cd ~/gitolite-admin
runlocal rsync -avP conf u3:foo/
expect 100%
expect "total size is"
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"