eliminate race (loaded systems only?) that makes gl-conf look empty
[gitolite.git] / t / daemon-gitweb-via-perms.t
blob8707e191a215187be854b0c61e3a1cf4e9bf4556
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 # basic tests
10 # ----------------------------------------------------------------------
12 try "plan 24";
13 try "DEF POK = !/DENIED/; !/failed to push/";
15 confreset;confadd '
17 @leads = u1 u2
18 @devs = u1 u2 u3 u4
20 @gbar = bar/CREATOR/..*
21 repo @gbar
22 C = @leads
23 RW+ = @leads
24 RW = WRITERS @devs
25 R = READERS
28 try "ADMIN_PUSH set1; !/FATAL/" or die text();
30 my $rb = `gitolite query-rc -n GL_REPO_BASE`;
31 chdir($rb);
32 my $h = $ENV{HOME};
34 try "
35 glt ls-remote u1 file:///bar/u1/try1
36 /Initialized empty Git repository in .*/bar/u1/try1.git/
38 find . -name git-daemon-export-ok
39 /testing.git/git-daemon-export-ok/
41 cat $h/projects.list
42 /testing.git/
44 glt ls-remote u1 file:///bar/u1/try2
45 /Initialized empty Git repository in .*/bar/u1/try2.git/
47 find $h/repositories -name git-daemon-export-ok
48 /testing.git/git-daemon-export-ok/
50 cat $h/projects.list
51 /testing.git/
53 glt perms u1 bar/u1/try1 + READERS daemon
54 !/./
56 glt perms u1 bar/u1/try1 -l
57 /READERS daemon/
59 find $h/repositories -name git-daemon-export-ok
60 /repositories/testing.git/git-daemon-export-ok/
61 /repositories/bar/u1/try1.git/git-daemon-export-ok/
63 cat $h/projects.list
64 /testing.git/
66 glt perms u1 bar/u1/try2 + READERS gitweb
68 glt perms u1 bar/u1/try2 -l
69 /READERS gitweb/
71 find $h/repositories -name git-daemon-export-ok
72 /testing.git/git-daemon-export-ok/
73 /bar/u1/try1.git/git-daemon-export-ok/
75 cat $h/projects.list
76 /bar/u1/try2.git/
77 /testing.git/