diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 14:17:27 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 14:17:27 +0000 |
commit | aae1a14ea756102251351d96e2567b4986d30e2b (patch) | |
tree | a1af617672e26aee4c1031a3aa83e8ff08f6a0a5 /t/refex-expr-test-1 | |
parent | Initial commit. (diff) | |
download | gitolite3-upstream.tar.xz gitolite3-upstream.zip |
Adding upstream version 3.6.12.upstream/3.6.12upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rwxr-xr-x | t/refex-expr-test-1 | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/t/refex-expr-test-1 b/t/refex-expr-test-1 new file mode 100755 index 0000000..1372a1e --- /dev/null +++ b/t/refex-expr-test-1 @@ -0,0 +1,62 @@ +#!/bin/bash + +# not part of the official test suite (yet); just some q&d testing + +# to be run from ~/gitolite as ./$0 + +set -e +exec 3>&2 +exec > /dev/null +exec 2> /dev/null +print2() { echo -n "$@" >&3; } +say2() { echo "$@" >&3; } +die() { echo FATAL: "$@" >&3; exit 1; } + +export od=$PWD +export tmp=$(mktemp -d) +echo $tmp >&3 +trap "rm -rf $tmp" 0 +cd $tmp + +print2 setting up... +( cd $od; t/reset ) +echo "push @{ \$RC{ENABLE} }, 'refex-expr';" >> ~/.gitolite.rc +cat <<EOF >> ~/.gitolite/conf/gitolite.conf + +repo r1 + RW+ = u1 u2 # line 1 + + RW+ master = u3 u4 # line 2 + RW+ = u3 u4 # line 3 + RW+ VREF/NAME/Makefile = u3 u4 # line 4 + - master and VREF/NAME/Makefile = u3 u4 # line 5 + +EOF +gitolite setup +say2 done + +# ---------------------------------------------------------------------- + +rm -rf u1 +git clone u1:r1 u1 +cd u1 +tsh 'tc f1' +git push u1:r1 master +tsh 'tc f2' +git push u2:r1 master +tsh 'tc f3' +git push u3:r1 master +tsh 'tc f4' +git push u4:r1 master +say2 everyone master no Makefile + +tsh 'tc f5 Makefile' +git push u1:r1 master +tsh 'tc f5 Makefile' +git push u1:r1 master:m1 +say2 u1 Makefile master + +tsh 'tc f5 Makefile' +git push u3:r1 master && die u3 r1 master should have failed +git push u3:r1 master:m2 +say2 u3 Makefile master fail m2 pass |