0f5f82e4f5
The log message format has changed. All log messages now have a common prefix (timestamp, user, IP). This is followed by $SSH_ORIGINAL_COMMAND (or, in one special case, the name of the user's login shell). Any further text appears after this (currently this only happens in the case of a successful push -- one for each ref pushed successfully)
71 lines
1.5 KiB
Plaintext
71 lines
1.5 KiB
Plaintext
# vim: syn=sh:
|
|
$TESTDIR/rollback
|
|
|
|
# ----------
|
|
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
|
|
expect "Initialized empty Git repository in /home/tester/td/u1aa/.git/"
|
|
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
|
|
expect " u1 .* + .* aa refs/heads/master refs/.\*"
|
|
|
|
# ----------
|
|
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"
|