summaryrefslogtreecommitdiffstats
path: root/t/info.t
blob: 22b5b947c2d63379df034ba6542ab5375da4f5cf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
#!/usr/bin/perl
use strict;
use warnings;

# this is hardcoded; change it if needed
use lib "src/lib";
use Gitolite::Test;

# the info command
# ----------------------------------------------------------------------

try 'plan 78';

try "## info";

confreset;confadd '
    @t1 = t1
    repo    @t1
        RW              =   u1
        R               =   u2
    repo    t2
        RW  =               u2
        R   =               u1
    repo    t3
        RW  =   u3
        R   =   u4

    repo foo/..*
        C   =   u1
        RW  =   CREATOR u3
';

try "ADMIN_PUSH info; !/FATAL/" or die text();
try "
                                        /Initialized.*empty.*t1.git/
                                        /Initialized.*empty.*t2.git/
                                        /Initialized.*empty.*t3.git/
";

# GS == greeting string
try "DEF GS = /hello %1, this is $ENV{USER}\\@.* running gitolite/";

try "
    glt info u1; ok; GS u1
        /C\tfoo/\\.\\.\\*/
        /R W *\tt1/
        /R   *\tt2/
        /R W *\ttesting/
        !/R W *\tt3/
    glt info u2; ok; GS u2
        !/C\tfoo/
        /R   *\tt1/
        /R W *\tt2/
        /R W *\ttesting/
        !/R W *\tt3/
    glt info u3; ok; GS u3
        /R W *\tt3/
        /R W *\ttesting/
        !/R   *\tt1/
        !/R W *\tt2/
    glt info u4; ok; GS u4
        /R   *\tt3/
        /R W *\ttesting/
        !/R   *\tt1/
        !/R W *\tt2/
    glt info u5; ok; GS u5
        /R W *\ttesting/
        !/R   *\tt1/
        !/R W *\tt2/
        !/R W *\tt3/
    glt info u6; ok; GS u6
        /R W *\ttesting/
        !/R   *\tt1/
        !/R W *\tt2/
        !/R W *\tt3/
";

try "
    glt ls-remote u1 file:///foo/one;   ok
    glt info u1; ok; GS u1
        /C\tfoo/\\.\\.\\*/
        /R W *\tfoo/one/
        !/R W *\tfoo/one\tu1/
    glt info u2; ok; GS u2
        !/C\tfoo/
        !/R W *\tfoo/one/
    glt info u3; ok; GS u3
        !/C\tfoo/
        /R W *\tfoo/one/
        !/R W *\tfoo/one\tu1/
";

try "
    glt ls-remote u1 file:///foo/one;   ok
    glt info u1 -lc; ok; GS u1
        /C\tfoo/\\.\\.\\*/
        !/C\tfoo.*u1/
        /R W *\tfoo/one\tu1/
    glt info u2 -lc; ok; GS u2
        !/C\tfoo/
        !/R W *\tfoo/one/
    glt info u3 -lc; ok; GS u3
        !/C\tfoo/
        /R W *\tfoo/one\tu1/
";