blob: ff23f22186c5fd0d83634660cbe6b64a37084964 (
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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
|
# vim: syn=sh:
for wr in 0 1
do
for bc in 0 1
do
for ais in 0 1
do
cd $TESTDIR
$TESTDIR/rollback || die "rollback failed"
editrc GL_WILDREPOS $wr
editrc GL_BIG_CONFIG $bc
echo "\$GL_ALL_INCLUDES_SPECIAL = $ais;" | addrc
# ----------
name "INTERNAL"
echo|ugc
name "daemon access for testing repo"
runremote ls -al $TEST_BASE/testing.git/git-daemon-export-ok
[ "$ais" = "0" ] && expect "ls: cannot access $TEST_BASE/testing.git/git-daemon-export-ok: No such file or directory"
[ "$ais" = "1" ] && expect "$USER $USER .* $TEST_BASE/testing.git/git-daemon-export-ok"
name "INTERNAL"
echo "
@leads = u1 u2
@devs = u1 u2 u3 u4
@gbar = bar
repo @gbar
RW+ = @leads
RW = @devs
" | ugc
expect_push_ok "master -> master"
runremote ls -al $TEST_BASE/bar.git/git-daemon-export-ok
expect "ls: cannot access $TEST_BASE/bar.git/git-daemon-export-ok: No such file or directory"
runremote ls -al projects.list
[ "$ais" = "0" ] && expect "$USER $USER 0 .* projects.list"
[ "$ais" = "1" ] && expect "$USER $USER 12 .* projects.list"
runremote cat projects.list
[ "$ais" = "0" ] && notexpect "testing.git"
[ "$ais" = "1" ] && expect "testing.git"
name "add daemon access to bar"
echo "
R = daemon
" | ugc
runremote ls -al $TEST_BASE/bar.git/git-daemon-export-ok
expect "$USER $USER .* $TEST_BASE/bar.git/git-daemon-export-ok"
runremote ls -al projects.list
[ "$ais" = "0" ] && expect "$USER $USER 0 .* projects.list"
[ "$ais" = "1" ] && expect "$USER $USER 12 .* projects.list"
name "add foo with gitweb access"
echo "
@leads = u1 u2
@devs = u1 u2 u3 u4
@gfoo = foo
repo @gfoo
RW+ = @leads
RW = @devs
R = gitweb
" | ugc
expect_push_ok "master -> master"
runremote ls -al projects.list
[ "$ais" = "0" ] && expect "$USER $USER 8 .* projects.list"
[ "$ais" = "1" ] && expect "$USER $USER 20 .* projects.list"
runremote cat projects.list
[ "$ais" = "0" ] && notexpect "testing.git"
[ "$ais" = "1" ] && expect "testing.git"
expect "foo.git"
name "add gitweb access to bar"
echo "
repo @gbar
R = gitweb
" | ugc
expect_push_ok "master -> master"
runremote ls -al projects.list
[ "$ais" = "0" ] && expect "$USER $USER 16 .* projects.list"
[ "$ais" = "1" ] && expect "$USER $USER 28 .* projects.list"
runremote cat projects.list
[ "$ais" = "0" ] && notexpect "testing.git"
[ "$ais" = "1" ] && expect "testing.git"
expect "foo.git"
expect "bar.git"
name "add repo baz with description"
echo "
@gbaz = baz
repo @gbaz
RW = @leads
baz = \"this is repo baz\"
" | ugc
expect_push_ok "master -> master"
expect "remote: Initialized empty Git repository in $TEST_BASE_FULL/baz.git/"
runremote ls -al projects.list
[ "$ais" = "0" ] && expect "$USER $USER 24 .* projects.list"
[ "$ais" = "1" ] && expect "$USER $USER 36 .* projects.list"
runremote cat projects.list
[ "$ais" = "0" ] && notexpect "testing.git"
[ "$ais" = "1" ] && expect "testing.git"
expect "foo.git"
expect "bar.git"
expect "baz.git"
runremote ls -al $TEST_BASE/baz.git/description
expect "$USER $USER 17 .* $TEST_BASE/baz.git/description"
runremote cat $TEST_BASE/baz.git/description
expect "this is repo baz"
name "add owner to testing repo"
echo "
testing \"sitaram\" = \"this is the testing repo\"
" | ugc
expect_push_ok "master -> master"
runremote ls -al projects.list
expect "$USER $USER 36 .* projects.list"
runremote cat projects.list
expect "testing.git"
expect "foo.git"
expect "bar.git"
expect "baz.git"
runremote cat $TEST_BASE/testing.git/config
expect "\[gitweb\]"
expect "owner = sitaram"
runremote ls -al $TEST_BASE/testing.git/description
expect "$USER $USER 25 .* $TEST_BASE/testing.git/description"
runremote cat $TEST_BASE/testing.git/description
expect "this is the testing repo"
name INTERNAL
done
done
done
|