2010-06-12 07:33:53 +02:00
|
|
|
# vim: syn=sh:
|
|
|
|
cd $TESTDIR
|
2010-06-18 18:13:53 +02:00
|
|
|
$TESTDIR/rollback || die "rollback failed"
|
2010-06-12 07:33:53 +02:00
|
|
|
editrc GL_BIG_CONFIG $1
|
|
|
|
|
|
|
|
name "bad repo name"
|
|
|
|
echo "
|
|
|
|
repo abc*def
|
|
|
|
RW = tester
|
|
|
|
" | ugc
|
|
|
|
expect "To gitolite:gitolite-admin"
|
|
|
|
expect "master -> master"
|
|
|
|
[[ $1 == 0 ]] && expect "ABORTING"
|
2011-10-05 18:31:49 +02:00
|
|
|
[[ $1 == 0 ]] && expect "bad reponame 'abc\*def' or you forgot to set .GL_WILDREPOS"
|
2010-06-12 07:33:53 +02:00
|
|
|
|
|
|
|
name "bad user name"
|
|
|
|
echo "
|
|
|
|
repo abc
|
|
|
|
RW = sitaram*tester
|
|
|
|
|
|
|
|
repo abcdef
|
|
|
|
RW = sitaram
|
|
|
|
" | ugc -r
|
|
|
|
expect "ABORTING"
|
2011-10-05 18:31:49 +02:00
|
|
|
expect "bad username 'sitaram\*tester'"
|
2010-06-12 07:33:53 +02:00
|
|
|
|
|
|
|
name "NAME deny"
|
|
|
|
echo "
|
|
|
|
repo abc
|
|
|
|
RW = u1
|
|
|
|
- NAME/i = u1
|
|
|
|
RW NAME/j = u1
|
|
|
|
RW NAME/u = u1
|
|
|
|
" | ugc -r
|
|
|
|
notexpect "failed to push"
|
|
|
|
|
|
|
|
cd ~/td
|
|
|
|
runlocal git clone u1:abc
|
2010-07-16 07:55:31 +02:00
|
|
|
expect "Cloning into abc..."
|
2010-06-12 07:33:53 +02:00
|
|
|
cd ~/td/abc
|
|
|
|
mdc jfile; runlocal git push origin master
|
|
|
|
expect "To u1:abc"
|
|
|
|
expect "\[new branch\] master -> master"
|
|
|
|
mdc ufile; runlocal git push origin master
|
|
|
|
expect "To u1:abc"
|
|
|
|
expect "master -> master"
|
|
|
|
mdc ifile; runlocal git push origin master
|
2011-10-18 04:33:05 +02:00
|
|
|
expect "remote: W NAME/ifile abc u1 DENIED by NAME/i"
|
2010-06-12 07:33:53 +02:00
|
|
|
|
|
|
|
name INTERNAL
|