summaryrefslogtreecommitdiffstats
path: root/t/all-yall.t
blob: 901b1c2ef26dd9a1248694fd7222344fd9f4c757 (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
#!/usr/bin/perl
use strict;
use warnings;

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

# could anything be clearer than "all y'all"?
# ----------------------------------------------------------------------

try "plan 26";

confreset;confadd '
    repo @all
        R   =   @all
    repo foo
        RW+ =   u1
    repo bar
        RW+ =   u2
    repo dev/..*
        C   =   u3 u4
        RW+ =   CREATOR
';

try "
    rm $ENV{HOME}/projects.list
";
try "ADMIN_PUSH set1; !/FATAL/" or die text();

try "
    glt ls-remote u1 file:///dev/wild1
                /FATAL: R any dev/wild1 u1 DENIED by fallthru/

    glt clone u3 file:///dev/wild1
                /Cloning into 'wild1'.../
                /Initialized empty Git repository in .*/dev/wild1.git//
                /warning: You appear to have cloned an empty repository./

    cd wild1
    tc n-855 n-856
    glt push u3 origin master:wild1
                /To file:///dev/wild1/
                /\\* \\[new branch\\]      master -> wild1/
    glt push u1 file:///foo master:br-foo
                /To file:///foo/
                /\\* \\[new branch\\]      master -> br-foo/
    glt push u2 file:///bar master:br-bar
                /To file:///bar/
                /\\* \\[new branch\\]      master -> br-bar/

    glt ls-remote u6 file:///foo
                /refs/heads/br-foo/

    glt ls-remote u6 file:///bar
                /refs/heads/br-bar/

    glt ls-remote u6 file:///dev/wild1
                /refs/heads/wild1/
";

try "
    gitolite ../triggers/post-compile/update-git-daemon-access-list;    ok
    gitolite ../triggers/post-compile/update-gitweb-access-list;        ok
    cat $ENV{HOME}/projects.list;                           ok
";
cmp 'bar.git
dev/wild1.git
foo.git
gitolite-admin.git
testing.git
';

my $rb = `gitolite query-rc -n GL_REPO_BASE`;

try "
    cd ..
    cd ..
    echo $rb
    find $rb -name git-daemon-export-ok | sort
    perl s,$rb/,,g
";

cmp 'bar.git/git-daemon-export-ok
dev/wild1.git/git-daemon-export-ok
foo.git/git-daemon-export-ok
gitolite-admin.git/git-daemon-export-ok
testing.git/git-daemon-export-ok
';