minor backward compat breakage in specifying owner/desc,
[gitolite.git] / t / refex-expr-test-3
blob47599ebe622d216d34454575d99519da0c2592c4
1 #!/bin/bash
3 # not part of the official test suite (yet); just some q&d testing
5 # to be run from ~/gitolite as ./$0
7 set -e
8 exec 3>&2
9 exec > /dev/null
10 exec 2> /dev/null
11 print2() { echo -n "$@" >&3; }
12 say2() { echo "$@" >&3; }
13 die() { echo FATAL: "$@" >&3; exit 1; }
15 export od=$PWD
16 export tmp=$(mktemp -d)
17 echo $tmp >&3
18 trap "rm -rf $tmp" 0
19 cd $tmp
21 print2 setting up...
22 ( cd $od; t/reset )
23 echo "push @{ \$RC{ENABLE} }, 'refex-expr';" >> ~/.gitolite.rc
24 cat <<EOF >> ~/.gitolite/conf/gitolite.conf
26 repo r3
27 RW+ = u1 u2 u3
29 RW+ VREF/NAME/conf/ = u3
30 - VREF/NAME/conf/ -gt 2 = u3
32 EOF
33 gitolite setup
34 say2 done
36 # ----------------------------------------------------------------------
38 git clone u3:r3
39 cd r3
41 tsh 'tc aa'
42 git push origin master
43 say2 aa pass
45 mkdir doc conf
47 tsh 'tc doc/d1 doc/d2 doc/d3 doc/d4 conf/c1'
48 git push origin master
49 say2 4 doc 1 conf pass
51 tsh 'tc conf/c2 conf/c3 conf/c4'
52 git push origin master && die 1
54 git push u2:r3 master
55 say2 3 conf u3 fail u2 pass