2010-06-12 07:33:53 +02:00
|
|
|
# vim: syn=sh:
|
2010-06-18 18:13:53 +02:00
|
|
|
$TESTDIR/rollback || die "rollback failed"
|
2010-06-12 07:33:53 +02:00
|
|
|
|
|
|
|
# ----------
|
|
|
|
name "basic push admin repo"
|
|
|
|
echo "
|
|
|
|
repo aa
|
|
|
|
RW+ = u1
|
|
|
|
RW = u2 u3
|
|
|
|
" | ugc
|
|
|
|
|
|
|
|
expect "To gitolite:gitolite-admin"
|
|
|
|
expect "master -> master"
|
|
|
|
|
|
|
|
name "basic create repo"
|
|
|
|
expect "remote: Initialized empty Git repository in /home/gitolite-test/repositories/aa.git/"
|
|
|
|
|
|
|
|
# ----------
|
|
|
|
name "basic clone"
|
|
|
|
cd ~/td
|
|
|
|
runlocal git clone u1:aa u1aa
|
2010-07-16 07:55:31 +02:00
|
|
|
expect "Cloning into u1aa..."
|
2010-06-12 07:33:53 +02:00
|
|
|
expect "warning: You appear to have cloned an empty repository"
|
|
|
|
runlocal ls -ald u1aa
|
|
|
|
expect "drwxr-xr-x 3 $USER $USER 4096 201.-..-.. ..:.. u1aa"
|
|
|
|
|
|
|
|
# ----------
|
|
|
|
name "basic clone deny"
|
|
|
|
cd ~/td
|
|
|
|
runlocal git clone u4:aa u4aa
|
|
|
|
expect "R access for aa DENIED to u4"
|
|
|
|
runlocal ls -ald u4aa
|
|
|
|
expect "ls: cannot access u4aa: No such file or directory"
|
|
|
|
|
|
|
|
# ----------
|
|
|
|
name "basic push"
|
|
|
|
cd ~/td/u1aa
|
|
|
|
mdc
|
|
|
|
runlocal git push origin HEAD
|
|
|
|
expect "To u1:aa"
|
|
|
|
expect "\[new branch\] *HEAD -> master"
|
|
|
|
|
|
|
|
# ----------
|
|
|
|
name "basic rewind"
|
|
|
|
cd ~/td/u1aa
|
|
|
|
mdc
|
|
|
|
mdc
|
|
|
|
mdc
|
|
|
|
runlocal git push origin HEAD
|
|
|
|
runlocal git reset --hard HEAD^
|
|
|
|
mdc
|
|
|
|
runlocal git push -f origin HEAD
|
|
|
|
expect "+ .* HEAD -> master (forced update)"
|
|
|
|
name "basic rewind log"
|
|
|
|
taillog
|
2010-06-16 03:50:12 +02:00
|
|
|
expect " u1 .* + .* aa refs/heads/master refs/.\*"
|
2010-06-12 07:33:53 +02:00
|
|
|
|
|
|
|
# ----------
|
|
|
|
name "basic rewind deny"
|
|
|
|
cd ~/td
|
|
|
|
runlocal git clone u2:aa u2aa
|
|
|
|
cd ~/td/u2aa
|
|
|
|
mdc
|
|
|
|
mdc
|
|
|
|
mdc
|
|
|
|
runlocal git push origin HEAD
|
|
|
|
runlocal git reset --hard HEAD^
|
|
|
|
mdc
|
|
|
|
runlocal git push -f origin HEAD
|
|
|
|
expect "remote: + refs/heads/master aa u2 DENIED by fallthru"
|
2010-06-18 18:13:53 +02:00
|
|
|
|
|
|
|
name INTERNAL
|