added more personal branch tests
This commit is contained in:
parent
139c08d3a1
commit
661fefbd0e
|
@ -9,7 +9,7 @@ use Gitolite::Test;
|
|||
# personal branches
|
||||
# ----------------------------------------------------------------------
|
||||
|
||||
try "plan 39";
|
||||
try "plan 64";
|
||||
|
||||
confreset;confadd '
|
||||
@admins = admin dev1
|
||||
|
@ -49,3 +49,52 @@ try "
|
|||
gitolite access \@g1 u1 W refs/heads/p/u2/foo; !ok; /W refs/heads/p/u2/foo \@g1 u1 DENIED by fallthru/
|
||||
gitolite access t1 u1 + refs/heads/p/u2/foo; !ok; /\\+ refs/heads/p/u2/foo t1 u1 DENIED by fallthru/
|
||||
";
|
||||
|
||||
confreset; confadd '
|
||||
@staff = u1 u2 u3 u4 u5 u6
|
||||
@gfoo = foo
|
||||
repo @gfoo
|
||||
RW+ = u1 u2
|
||||
RW+ p/USER/ = u3 u4
|
||||
RW temp = u5 u6
|
||||
';
|
||||
|
||||
try "ADMIN_PUSH set1; !/FATAL/" or die text();
|
||||
|
||||
try "
|
||||
DEF OK = gitolite access foo %1 %2 refs/heads/%3; ok
|
||||
DEF NOK = gitolite access foo %1 %2 refs/heads/%3; !ok
|
||||
";
|
||||
|
||||
try "
|
||||
|
||||
# u1 and u2 can push
|
||||
OK u1 W master
|
||||
OK u2 W master
|
||||
OK u2 W p/u1/foo
|
||||
OK u1 W p/u2/foo
|
||||
OK u1 W p/u3/foo
|
||||
|
||||
# u3 cant push u1/u4 personal branches
|
||||
NOK u3 W p/u1/foo
|
||||
NOK u3 W p/u4/doo
|
||||
|
||||
# u4 can push u4 personal branch
|
||||
OK u4 W p/u4/foo
|
||||
# u5 push temp
|
||||
OK u5 W temp
|
||||
|
||||
# u1 and u2 can rewind
|
||||
OK u1 + master
|
||||
OK u2 + p/u1/foo
|
||||
OK u1 + p/u2/foo
|
||||
OK u1 + p/u3/foo
|
||||
|
||||
# u3 cant rewind u1/u4 personal branches
|
||||
NOK u3 + p/u1/foo
|
||||
NOK u3 + p/u4/foo
|
||||
# u4 can rewind u4 personal branch
|
||||
OK u4 + p/u4/foo
|
||||
# u5 cant rewind temp
|
||||
NOK u5 + temp
|
||||
";
|
||||
|
|
Loading…
Reference in a new issue