2010-07-19 11:15:43 +02:00
|
|
|
# vim: syn=sh:
|
|
|
|
for wr in 0 1
|
|
|
|
do
|
|
|
|
for bc in 0 1
|
|
|
|
do
|
2010-08-24 13:47:41 +02:00
|
|
|
for ais in 0 1
|
|
|
|
do
|
|
|
|
cd $TESTDIR
|
|
|
|
$TESTDIR/rollback || die "rollback failed"
|
|
|
|
editrc GL_WILDREPOS $wr
|
|
|
|
editrc GL_BIG_CONFIG $bc
|
|
|
|
echo "\$GL_ALL_INCLUDES_SPECIAL = $ais;" | addrc
|
2010-07-19 11:15:43 +02:00
|
|
|
|
2010-08-24 13:47:41 +02:00
|
|
|
# ----------
|
|
|
|
name "INTERNAL"
|
|
|
|
echo|ugc
|
|
|
|
name "daemon access for testing repo"
|
|
|
|
runremote ls -al repositories/testing.git/git-daemon-export-ok
|
|
|
|
[ "$ais" = "0" ] && expect "ls: cannot access repositories/testing.git/git-daemon-export-ok: No such file or directory"
|
|
|
|
[ "$ais" = "1" ] && expect "gitolite-test gitolite-test .* repositories/testing.git/git-daemon-export-ok"
|
2010-07-19 11:15:43 +02:00
|
|
|
|
2010-08-24 13:47:41 +02:00
|
|
|
name "INTERNAL"
|
|
|
|
echo "
|
|
|
|
@leads = u1 u2
|
|
|
|
@devs = u1 u2 u3 u4
|
2010-07-19 11:15:43 +02:00
|
|
|
|
2010-08-24 13:47:41 +02:00
|
|
|
@gbar = bar
|
|
|
|
repo @gbar
|
|
|
|
RW+ = @leads
|
|
|
|
RW = @devs
|
|
|
|
" | ugc
|
|
|
|
expect_push_ok "master -> master"
|
|
|
|
runremote ls -al repositories/bar.git/git-daemon-export-ok
|
|
|
|
expect "ls: cannot access repositories/bar.git/git-daemon-export-ok: No such file or directory"
|
|
|
|
runremote ls -al projects.list
|
|
|
|
[ "$ais" = "0" ] && expect "gitolite-test gitolite-test 0 .* projects.list"
|
|
|
|
[ "$ais" = "1" ] && expect "gitolite-test gitolite-test 12 .* projects.list"
|
|
|
|
runremote cat projects.list
|
|
|
|
[ "$ais" = "0" ] && notexpect "testing.git"
|
|
|
|
[ "$ais" = "1" ] && expect "testing.git"
|
2010-07-19 11:15:43 +02:00
|
|
|
|
2010-08-24 13:47:41 +02:00
|
|
|
name "add daemon access to bar"
|
|
|
|
echo "
|
|
|
|
R = daemon
|
|
|
|
" | ugc
|
|
|
|
runremote ls -al repositories/bar.git/git-daemon-export-ok
|
|
|
|
expect "gitolite-test gitolite-test .* repositories/bar.git/git-daemon-export-ok"
|
|
|
|
runremote ls -al projects.list
|
|
|
|
[ "$ais" = "0" ] && expect "gitolite-test gitolite-test 0 .* projects.list"
|
|
|
|
[ "$ais" = "1" ] && expect "gitolite-test gitolite-test 12 .* projects.list"
|
2010-07-19 11:15:43 +02:00
|
|
|
|
2010-08-24 13:47:41 +02:00
|
|
|
name "add foo with gitweb access"
|
|
|
|
echo "
|
|
|
|
@leads = u1 u2
|
|
|
|
@devs = u1 u2 u3 u4
|
2010-07-19 11:15:43 +02:00
|
|
|
|
2010-08-24 13:47:41 +02:00
|
|
|
@gfoo = foo
|
|
|
|
repo @gfoo
|
|
|
|
RW+ = @leads
|
|
|
|
RW = @devs
|
|
|
|
R = gitweb
|
|
|
|
" | ugc
|
|
|
|
expect_push_ok "master -> master"
|
|
|
|
runremote ls -al projects.list
|
|
|
|
[ "$ais" = "0" ] && expect "gitolite-test gitolite-test 8 .* projects.list"
|
|
|
|
[ "$ais" = "1" ] && expect "gitolite-test gitolite-test 20 .* projects.list"
|
|
|
|
runremote cat projects.list
|
|
|
|
[ "$ais" = "0" ] && notexpect "testing.git"
|
|
|
|
[ "$ais" = "1" ] && expect "testing.git"
|
|
|
|
expect "foo.git"
|
2010-07-19 11:15:43 +02:00
|
|
|
|
2010-08-24 13:47:41 +02:00
|
|
|
name "add gitweb access to bar"
|
|
|
|
echo "
|
|
|
|
repo @gbar
|
|
|
|
R = gitweb
|
|
|
|
" | ugc
|
|
|
|
expect_push_ok "master -> master"
|
|
|
|
runremote ls -al projects.list
|
|
|
|
[ "$ais" = "0" ] && expect "gitolite-test gitolite-test 16 .* projects.list"
|
|
|
|
[ "$ais" = "1" ] && expect "gitolite-test gitolite-test 28 .* projects.list"
|
|
|
|
runremote cat projects.list
|
|
|
|
[ "$ais" = "0" ] && notexpect "testing.git"
|
|
|
|
[ "$ais" = "1" ] && expect "testing.git"
|
|
|
|
expect "foo.git"
|
|
|
|
expect "bar.git"
|
2010-07-19 11:15:43 +02:00
|
|
|
|
2010-08-24 13:47:41 +02:00
|
|
|
name "add repo baz with description"
|
|
|
|
echo "
|
|
|
|
@gbaz = baz
|
|
|
|
repo @gbaz
|
|
|
|
RW = @leads
|
2010-07-19 11:15:43 +02:00
|
|
|
|
2010-08-24 13:47:41 +02:00
|
|
|
baz = \"this is repo baz\"
|
|
|
|
" | ugc
|
|
|
|
expect_push_ok "master -> master"
|
|
|
|
expect "remote: Initialized empty Git repository in /home/gitolite-test/repositories/baz.git/"
|
|
|
|
runremote ls -al projects.list
|
|
|
|
[ "$ais" = "0" ] && expect "gitolite-test gitolite-test 24 .* projects.list"
|
|
|
|
[ "$ais" = "1" ] && expect "gitolite-test gitolite-test 36 .* projects.list"
|
|
|
|
runremote cat projects.list
|
|
|
|
[ "$ais" = "0" ] && notexpect "testing.git"
|
|
|
|
[ "$ais" = "1" ] && expect "testing.git"
|
|
|
|
expect "foo.git"
|
|
|
|
expect "bar.git"
|
|
|
|
expect "baz.git"
|
|
|
|
runremote ls -al repositories/baz.git/description
|
|
|
|
expect "gitolite-test gitolite-test 17 .* repositories/baz.git/description"
|
|
|
|
runremote cat repositories/baz.git/description
|
|
|
|
expect "this is repo baz"
|
2010-07-19 11:15:43 +02:00
|
|
|
|
2010-08-24 13:47:41 +02:00
|
|
|
name "add owner to testing repo"
|
|
|
|
echo "
|
|
|
|
testing \"sitaram\" = \"this is the testing repo\"
|
|
|
|
" | ugc
|
|
|
|
expect_push_ok "master -> master"
|
|
|
|
runremote ls -al projects.list
|
|
|
|
expect "gitolite-test gitolite-test 36 .* projects.list"
|
|
|
|
runremote cat projects.list
|
|
|
|
expect "testing.git"
|
|
|
|
expect "foo.git"
|
|
|
|
expect "bar.git"
|
|
|
|
expect "baz.git"
|
|
|
|
runremote cat repositories/testing.git/config
|
|
|
|
expect "\[gitweb\]"
|
|
|
|
expect "owner = sitaram"
|
|
|
|
runremote ls -al repositories/testing.git/description
|
|
|
|
expect "gitolite-test gitolite-test 25 .* repositories/testing.git/description"
|
|
|
|
runremote cat repositories/testing.git/description
|
|
|
|
expect "this is the testing repo"
|
2010-07-19 11:15:43 +02:00
|
|
|
|
2010-08-24 13:47:41 +02:00
|
|
|
name INTERNAL
|
|
|
|
done
|
2010-07-19 11:15:43 +02:00
|
|
|
done
|
|
|
|
done
|