test suite: catch internal errors better
...so you don't have to look at all the output for any strangeness (also make rollback a little quieter)
This commit is contained in:
parent
a430cc57c7
commit
3c5bd4a131
|
@ -7,5 +7,5 @@ rm -rf gitolite-admin td
|
||||||
tar xf rollback.tar
|
tar xf rollback.tar
|
||||||
mkdir td
|
mkdir td
|
||||||
|
|
||||||
scp $TESTDIR/rollback.server gitolite-test@localhost:rollback
|
scp -q $TESTDIR/rollback.server gitolite-test@localhost:rollback || { echo scp failed; exit 1; }
|
||||||
ssh gitolite-test@localhost ./rollback
|
ssh gitolite-test@localhost ./rollback
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# vim: syn=sh:
|
# vim: syn=sh:
|
||||||
cd $TESTDIR
|
cd $TESTDIR
|
||||||
$TESTDIR/rollback
|
$TESTDIR/rollback || die "rollback failed"
|
||||||
editrc GL_BIG_CONFIG 1
|
editrc GL_BIG_CONFIG 1
|
||||||
editrc GL_NO_DAEMON_NO_GITWEB 1
|
editrc GL_NO_DAEMON_NO_GITWEB 1
|
||||||
catrc
|
catrc
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# vim: syn=sh:
|
# vim: syn=sh:
|
||||||
$TESTDIR/rollback
|
$TESTDIR/rollback || die "rollback failed"
|
||||||
|
|
||||||
# ----------
|
# ----------
|
||||||
name "basic push admin repo"
|
name "basic push admin repo"
|
||||||
|
@ -68,3 +68,5 @@ runlocal git reset --hard HEAD^
|
||||||
mdc
|
mdc
|
||||||
runlocal git push -f origin HEAD
|
runlocal git push -f origin HEAD
|
||||||
expect "remote: + refs/heads/master aa u2 DENIED by fallthru"
|
expect "remote: + refs/heads/master aa u2 DENIED by fallthru"
|
||||||
|
|
||||||
|
name INTERNAL
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# vim: syn=sh:
|
# vim: syn=sh:
|
||||||
# ----------
|
# ----------
|
||||||
$TESTDIR/rollback
|
$TESTDIR/rollback || die "rollback failed"
|
||||||
editrc GL_BIG_CONFIG 0
|
editrc GL_BIG_CONFIG 0
|
||||||
|
|
||||||
name "base output with no groups"
|
name "base output with no groups"
|
||||||
|
@ -14,7 +14,7 @@ catconf
|
||||||
expect_filesame $TESTDIR/out/t01-repo-groups.1
|
expect_filesame $TESTDIR/out/t01-repo-groups.1
|
||||||
|
|
||||||
# ----------
|
# ----------
|
||||||
$TESTDIR/rollback
|
$TESTDIR/rollback || die "rollback failed"
|
||||||
editrc GL_BIG_CONFIG 0
|
editrc GL_BIG_CONFIG 0
|
||||||
|
|
||||||
name "output with eqvt repo groups"
|
name "output with eqvt repo groups"
|
||||||
|
@ -29,7 +29,7 @@ catconf
|
||||||
expect_filesame $TESTDIR/out/t01-repo-groups.1
|
expect_filesame $TESTDIR/out/t01-repo-groups.1
|
||||||
|
|
||||||
# ----------
|
# ----------
|
||||||
$TESTDIR/rollback
|
$TESTDIR/rollback || die "rollback failed"
|
||||||
editrc GL_BIG_CONFIG 1
|
editrc GL_BIG_CONFIG 1
|
||||||
|
|
||||||
name "base output with no groups but GL_BIG_CONFIG on"
|
name "base output with no groups but GL_BIG_CONFIG on"
|
||||||
|
@ -43,7 +43,7 @@ catconf
|
||||||
expect_filesame $TESTDIR/out/t01-repo-groups.1
|
expect_filesame $TESTDIR/out/t01-repo-groups.1
|
||||||
|
|
||||||
# ----------
|
# ----------
|
||||||
$TESTDIR/rollback
|
$TESTDIR/rollback || die "rollback failed"
|
||||||
editrc GL_BIG_CONFIG 1
|
editrc GL_BIG_CONFIG 1
|
||||||
|
|
||||||
name "repo groups with GL_BIG_CONFIG on"
|
name "repo groups with GL_BIG_CONFIG on"
|
||||||
|
@ -56,3 +56,5 @@ echo "
|
||||||
|
|
||||||
catconf
|
catconf
|
||||||
expect_filesame $TESTDIR/out/t01-repo-groups.2
|
expect_filesame $TESTDIR/out/t01-repo-groups.2
|
||||||
|
|
||||||
|
name INTERNAL
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# vim: syn=sh:
|
# vim: syn=sh:
|
||||||
# ----------
|
# ----------
|
||||||
$TESTDIR/rollback
|
$TESTDIR/rollback || die "rollback failed"
|
||||||
editrc GL_BIG_CONFIG 0
|
editrc GL_BIG_CONFIG 0
|
||||||
|
|
||||||
name "base output with no groups"
|
name "base output with no groups"
|
||||||
|
@ -14,7 +14,7 @@ catconf
|
||||||
expect_filesame $TESTDIR/out/t02-user-groups.1
|
expect_filesame $TESTDIR/out/t02-user-groups.1
|
||||||
|
|
||||||
# ----------
|
# ----------
|
||||||
$TESTDIR/rollback
|
$TESTDIR/rollback || die "rollback failed"
|
||||||
editrc GL_BIG_CONFIG 0
|
editrc GL_BIG_CONFIG 0
|
||||||
|
|
||||||
name "output with eqvt user groups"
|
name "output with eqvt user groups"
|
||||||
|
@ -32,7 +32,7 @@ catconf
|
||||||
expect_filesame $TESTDIR/out/t02-user-groups.1
|
expect_filesame $TESTDIR/out/t02-user-groups.1
|
||||||
|
|
||||||
# ----------
|
# ----------
|
||||||
$TESTDIR/rollback
|
$TESTDIR/rollback || die "rollback failed"
|
||||||
editrc GL_BIG_CONFIG 1
|
editrc GL_BIG_CONFIG 1
|
||||||
|
|
||||||
name "base output with no groups but GL_BIG_CONFIG on"
|
name "base output with no groups but GL_BIG_CONFIG on"
|
||||||
|
@ -46,7 +46,7 @@ catconf
|
||||||
expect_filesame $TESTDIR/out/t02-user-groups.1
|
expect_filesame $TESTDIR/out/t02-user-groups.1
|
||||||
|
|
||||||
# ----------
|
# ----------
|
||||||
$TESTDIR/rollback
|
$TESTDIR/rollback || die "rollback failed"
|
||||||
editrc GL_BIG_CONFIG 1
|
editrc GL_BIG_CONFIG 1
|
||||||
|
|
||||||
name "user groups with GL_BIG_CONFIG on"
|
name "user groups with GL_BIG_CONFIG on"
|
||||||
|
@ -62,3 +62,5 @@ echo "
|
||||||
|
|
||||||
catconf
|
catconf
|
||||||
expect_filesame $TESTDIR/out/t02-user-groups.2
|
expect_filesame $TESTDIR/out/t02-user-groups.2
|
||||||
|
|
||||||
|
name INTERNAL
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# vim: syn=sh:
|
# vim: syn=sh:
|
||||||
# ----------
|
# ----------
|
||||||
$TESTDIR/rollback
|
$TESTDIR/rollback || die "rollback failed"
|
||||||
editrc GL_BIG_CONFIG 0
|
editrc GL_BIG_CONFIG 0
|
||||||
|
|
||||||
echo ===== testing with GL_BIG_CONFIG set to 0 =====
|
echo ===== testing with GL_BIG_CONFIG set to 0 =====
|
||||||
|
@ -10,7 +10,7 @@ cd $TESTDIR
|
||||||
cd $TESTDIR
|
cd $TESTDIR
|
||||||
|
|
||||||
# ----------
|
# ----------
|
||||||
$TESTDIR/rollback
|
$TESTDIR/rollback || die "rollback failed"
|
||||||
editrc GL_BIG_CONFIG 1
|
editrc GL_BIG_CONFIG 1
|
||||||
|
|
||||||
echo ===== testing with GL_BIG_CONFIG set to 1 =====
|
echo ===== testing with GL_BIG_CONFIG set to 1 =====
|
||||||
|
@ -18,3 +18,5 @@ echo ===== testing with GL_BIG_CONFIG set to 1 =====
|
||||||
cd $TESTDIR
|
cd $TESTDIR
|
||||||
. ./t03a-branch-permissions
|
. ./t03a-branch-permissions
|
||||||
cd $TESTDIR
|
cd $TESTDIR
|
||||||
|
|
||||||
|
name INTERNAL
|
||||||
|
|
|
@ -8,7 +8,7 @@ do
|
||||||
hl t04-wild with GL_WILDREPOS $i, C=@$j
|
hl t04-wild with GL_WILDREPOS $i, C=@$j
|
||||||
|
|
||||||
cd $TESTDIR
|
cd $TESTDIR
|
||||||
$TESTDIR/rollback
|
$TESTDIR/rollback || die "rollback failed"
|
||||||
editrc GL_BIG_CONFIG $i
|
editrc GL_BIG_CONFIG $i
|
||||||
editrc GL_WILDREPOS 1
|
editrc GL_WILDREPOS 1
|
||||||
. ./t04a-wild-$j
|
. ./t04a-wild-$j
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# vim: syn=sh:
|
# vim: syn=sh:
|
||||||
cd $TESTDIR
|
cd $TESTDIR
|
||||||
$TESTDIR/rollback
|
$TESTDIR/rollback || die "rollback failed"
|
||||||
editrc GL_BIG_CONFIG $1
|
editrc GL_BIG_CONFIG $1
|
||||||
# ----------
|
# ----------
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# vim: syn=sh:
|
# vim: syn=sh:
|
||||||
cd $TESTDIR
|
cd $TESTDIR
|
||||||
$TESTDIR/rollback
|
$TESTDIR/rollback || die "rollback failed"
|
||||||
editrc GL_BIG_CONFIG $1
|
editrc GL_BIG_CONFIG $1
|
||||||
|
|
||||||
name "bad repo name"
|
name "bad repo name"
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
for bc in 0 1
|
for bc in 0 1
|
||||||
do
|
do
|
||||||
cd $TESTDIR
|
cd $TESTDIR
|
||||||
$TESTDIR/rollback
|
$TESTDIR/rollback || die "rollback failed"
|
||||||
editrc GL_WILDREPOS 1
|
editrc GL_WILDREPOS 1
|
||||||
editrc GL_BIG_CONFIG $bc
|
editrc GL_BIG_CONFIG $bc
|
||||||
|
|
||||||
|
@ -48,7 +48,7 @@ do
|
||||||
name "INTERNAL"
|
name "INTERNAL"
|
||||||
|
|
||||||
cd $TESTDIR
|
cd $TESTDIR
|
||||||
$TESTDIR/rollback
|
$TESTDIR/rollback || die "rollback failed"
|
||||||
editrc GL_WILDREPOS 1
|
editrc GL_WILDREPOS 1
|
||||||
editrc GL_BIG_CONFIG $bc
|
editrc GL_BIG_CONFIG $bc
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ do
|
||||||
for bc in 0 1
|
for bc in 0 1
|
||||||
do
|
do
|
||||||
cd $TESTDIR
|
cd $TESTDIR
|
||||||
$TESTDIR/rollback
|
$TESTDIR/rollback || die "rollback failed"
|
||||||
editrc GL_WILDREPOS $wr
|
editrc GL_WILDREPOS $wr
|
||||||
editrc GL_BIG_CONFIG $bc
|
editrc GL_BIG_CONFIG $bc
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
for bc in 0 1
|
for bc in 0 1
|
||||||
do
|
do
|
||||||
cd $TESTDIR
|
cd $TESTDIR
|
||||||
$TESTDIR/rollback
|
$TESTDIR/rollback || die "rollback failed"
|
||||||
editrc GL_BIG_CONFIG $bc
|
editrc GL_BIG_CONFIG $bc
|
||||||
|
|
||||||
# ----------
|
# ----------
|
||||||
|
|
|
@ -4,7 +4,7 @@ do
|
||||||
for bc in 0 1
|
for bc in 0 1
|
||||||
do
|
do
|
||||||
cd $TESTDIR
|
cd $TESTDIR
|
||||||
$TESTDIR/rollback
|
$TESTDIR/rollback || die "rollback failed"
|
||||||
editrc GL_WILDREPOS $wr
|
editrc GL_WILDREPOS $wr
|
||||||
editrc GL_BIG_CONFIG $bc
|
editrc GL_BIG_CONFIG $bc
|
||||||
|
|
||||||
|
|
|
@ -152,9 +152,8 @@ arg1=$1; shift
|
||||||
for testfile in ${arg1:-t??-}*
|
for testfile in ${arg1:-t??-}*
|
||||||
do
|
do
|
||||||
hl $testfile
|
hl $testfile
|
||||||
. $testfile "$@"
|
. $testfile "$@" || die "$testfile failed"
|
||||||
cd $TESTDIR
|
cd $TESTDIR
|
||||||
hl $testfile DONE
|
|
||||||
done
|
done
|
||||||
|
|
||||||
print_summary
|
print_summary
|
||||||
|
|
Loading…
Reference in a new issue