diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 09:55:51 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 09:55:51 +0000 |
commit | 7685305e1f82212323ec32a321b1f5c623751b6c (patch) | |
tree | a1af617672e26aee4c1031a3aa83e8ff08f6a0a5 /t/refex-expr-test-2 | |
parent | Initial commit. (diff) | |
download | gitolite3-7685305e1f82212323ec32a321b1f5c623751b6c.tar.xz gitolite3-7685305e1f82212323ec32a321b1f5c623751b6c.zip |
Adding upstream version 3.6.12.upstream/3.6.12upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 't/refex-expr-test-2')
-rwxr-xr-x | t/refex-expr-test-2 | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/t/refex-expr-test-2 b/t/refex-expr-test-2 new file mode 100755 index 0000000..773e42c --- /dev/null +++ b/t/refex-expr-test-2 @@ -0,0 +1,60 @@ +#!/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 r2 + RW+ = @all + + RW+ VREF/NAME/doc/ = u2 + RW+ VREF/NAME/src/ = u2 + - VREF/NAME/doc/ and VREF/NAME/src/ = u2 + +EOF +gitolite setup +say2 done + +# ---------------------------------------------------------------------- + +git clone u2:r2 +cd r2 + +tsh 'tc aa' +git push origin master +say2 aa pass + +mkdir doc src + +tsh 'tc doc/d1' +git push origin master +say2 doc pass + +tsh 'tc src/s1' +tsh 'tc src/s2' +git push origin master +say2 src src pass + +tsh 'tc doc/d2 src/s3' +git push origin master && die 1 +git push u1:r2 master +say2 doc src u2 fail u1 pass |