2012-03-14 11:00:05 +01:00
|
|
|
#!/usr/bin/perl
|
|
|
|
use strict;
|
|
|
|
use warnings;
|
|
|
|
|
|
|
|
# this is hardcoded; change it if needed
|
2012-04-06 16:59:05 +02:00
|
|
|
use lib "src/lib";
|
2012-03-14 11:00:05 +01:00
|
|
|
use Gitolite::Test;
|
|
|
|
|
2012-03-19 11:33:59 +01:00
|
|
|
# the info command
|
|
|
|
# ----------------------------------------------------------------------
|
|
|
|
|
2012-03-29 03:34:46 +02:00
|
|
|
try 'plan 78';
|
2012-03-14 11:00:05 +01:00
|
|
|
|
|
|
|
try "## info";
|
|
|
|
|
|
|
|
confreset;confadd '
|
2012-03-15 01:37:41 +01:00
|
|
|
@t1 = t1
|
|
|
|
repo @t1
|
2012-03-14 11:00:05 +01:00
|
|
|
RW = u1
|
|
|
|
R = u2
|
|
|
|
repo t2
|
|
|
|
RW = u2
|
|
|
|
R = u1
|
|
|
|
repo t3
|
2012-03-29 03:34:46 +02:00
|
|
|
RW = u3
|
|
|
|
R = u4
|
|
|
|
|
|
|
|
repo foo/..*
|
|
|
|
C = u1
|
|
|
|
RW = CREATOR u3
|
2012-03-14 11:00:05 +01:00
|
|
|
';
|
|
|
|
|
|
|
|
try "ADMIN_PUSH info; !/FATAL/" or die text();
|
|
|
|
try "
|
|
|
|
/Initialized.*empty.*t1.git/
|
|
|
|
/Initialized.*empty.*t2.git/
|
|
|
|
/Initialized.*empty.*t3.git/
|
|
|
|
";
|
2012-03-19 16:31:08 +01:00
|
|
|
|
|
|
|
# GS == greeting string
|
2012-03-27 18:48:20 +02:00
|
|
|
try "DEF GS = /hello %1, this is $ENV{USER}\\@.* running gitolite/";
|
2012-03-19 16:31:08 +01:00
|
|
|
|
|
|
|
try "
|
|
|
|
glt info u1; ok; GS u1
|
2012-03-29 03:34:46 +02:00
|
|
|
/C\tfoo/\\.\\.\\*/
|
2012-03-20 03:13:20 +01:00
|
|
|
/R W *\tt1/
|
|
|
|
/R *\tt2/
|
|
|
|
/R W *\ttesting/
|
|
|
|
!/R W *\tt3/
|
2012-03-29 03:34:46 +02:00
|
|
|
glt info u2; ok; GS u2
|
|
|
|
!/C\tfoo/
|
2012-03-20 03:13:20 +01:00
|
|
|
/R *\tt1/
|
|
|
|
/R W *\tt2/
|
|
|
|
/R W *\ttesting/
|
|
|
|
!/R W *\tt3/
|
2012-03-29 03:34:46 +02:00
|
|
|
glt info u3; ok; GS u3
|
2012-03-20 03:13:20 +01:00
|
|
|
/R W *\tt3/
|
|
|
|
/R W *\ttesting/
|
|
|
|
!/R *\tt1/
|
|
|
|
!/R W *\tt2/
|
2012-03-29 03:34:46 +02:00
|
|
|
glt info u4; ok; GS u4
|
2012-03-20 03:13:20 +01:00
|
|
|
/R *\tt3/
|
|
|
|
/R W *\ttesting/
|
|
|
|
!/R *\tt1/
|
|
|
|
!/R W *\tt2/
|
2012-03-29 03:34:46 +02:00
|
|
|
glt info u5; ok; GS u5
|
2012-03-20 03:13:20 +01:00
|
|
|
/R W *\ttesting/
|
|
|
|
!/R *\tt1/
|
|
|
|
!/R W *\tt2/
|
|
|
|
!/R W *\tt3/
|
2012-03-29 03:34:46 +02:00
|
|
|
glt info u6; ok; GS u6
|
2012-03-20 03:13:20 +01:00
|
|
|
/R W *\ttesting/
|
|
|
|
!/R *\tt1/
|
|
|
|
!/R W *\tt2/
|
|
|
|
!/R W *\tt3/
|
2012-03-19 16:31:08 +01:00
|
|
|
";
|
2012-03-29 03:34:46 +02:00
|
|
|
|
|
|
|
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
|
|
|
|
put
|
|
|
|
/C\tfoo/\\.\\.\\*/
|
|
|
|
!/C\tfoo.*u1/
|
|
|
|
/R W *\tfoo/one\tu1/
|
|
|
|
glt info u2 -lc; ok; GS u2
|
|
|
|
put
|
|
|
|
!/C\tfoo/
|
|
|
|
!/R W *\tfoo/one/
|
|
|
|
glt info u3 -lc; ok; GS u3
|
|
|
|
put
|
|
|
|
!/C\tfoo/
|
|
|
|
/R W *\tfoo/one\tu1/
|
|
|
|
";
|