eliminate race (loaded systems only?) that makes gl-conf look empty
[gitolite.git] / t / deny-rules.t
blobc0e7cbbe0213c072ce7f5001e394e6235220cfaa
1 #!/usr/bin/perl
2 use strict;
3 use warnings;
5 # this is hardcoded; change it if needed
6 use lib "src/lib";
7 use Gitolite::Test;
9 # deny rules
10 # ----------------------------------------------------------------------
12 try "plan 11";
14 confreset;confadd '
15 # start with...
17 repo gitolite-admin
18 - = gitweb daemon
19 option deny-rules = 1
21 # main ruleset goes here
23 @ga = a
24 @gb = b
25 @gc = c
27 # and end with
29 repo @ga
30 RW = u1
31 - = @all
32 option deny-rules = 1
34 repo @gb
35 RW = u2
36 - = daemon
37 option deny-rules = 1
39 repo @gc
40 RW = u3
42 repo @all
43 R = @all
47 try "ADMIN_PUSH set1; !/FATAL/" or die text();
49 my $rb = `gitolite query-rc -n GL_REPO_BASE`;
50 try "
51 cat $ENV{HOME}/projects.list; ok
53 cmp 'b.git
54 c.git
55 testing.git
58 try "
59 cd ..
60 cd ..
61 echo $rb
62 find $rb -name git-daemon-export-ok | sort
63 perl s,$rb/,,g
65 cmp 'c.git/git-daemon-export-ok
66 testing.git/git-daemon-export-ok