aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorSitaram Chamarty <sitaram@atc.tcs.com>2013-03-20 21:42:16 +0530
committerSitaram Chamarty <sitaram@atc.tcs.com>2013-03-21 09:47:50 +0530
commit0419d9958809a840a813df05547b67618b4150c5 (patch)
tree20512741b7f884122855967b491305ddd2381ef2 /t
parentnew command 'owns' (thanks to Kevin Pulo) (diff)
downloadgitolite-gentoo-0419d9958809a840a813df05547b67618b4150c5.tar.gz
gitolite-gentoo-0419d9958809a840a813df05547b67618b4150c5.tar.bz2
gitolite-gentoo-0419d9958809a840a813df05547b67618b4150c5.zip
DEFAULT_ROLE_PERMS replaced by per repo 'default.roles' option
Diffstat (limited to 't')
-rwxr-xr-xt/fork.t24
1 files changed, 20 insertions, 4 deletions
diff --git a/t/fork.t b/t/fork.t
index 99d4a41..2a7a7b7 100755
--- a/t/fork.t
+++ b/t/fork.t
@@ -5,11 +5,12 @@ use warnings;
# this is hardcoded; change it if needed
use lib "src/lib";
use Gitolite::Test;
+my $h = $ENV{HOME};
# fork command
# ----------------------------------------------------------------------
-try "plan 30";
+try "plan 38";
my $rb = `gitolite query-rc -n GL_REPO_BASE`;
@@ -34,7 +35,23 @@ try "
# allow fork as a valid command
$ENV{G3T_RC} = "$ENV{HOME}/g3trc";
-put "$ENV{G3T_RC}", "\$rc{COMMANDS}{fork} = 1;\n\$rc{DEFAULT_ROLE_PERMS} = 'READERS \@all';\n";
+put "$ENV{G3T_RC}", "\$rc{COMMANDS}{fork} = 1;\n";
+
+# enable set-default-roles feature, add options, push
+try "
+ cat $h/.gitolite.rc
+ perl s/# 'set-default-roles'/'set-default-roles'/
+ put $h/.gitolite.rc
+";
+try "cd gitolite-admin";
+confadd '
+ repo foo/CREATOR/..*
+ C = u1 u2
+ RW+ = CREATOR
+ option default.roles-1 = READERS @all
+';
+try "ADMIN_PUSH set1; !/FATAL/" or die text();
+try "cd ..";
try "
# now the fork succeeds
@@ -61,8 +78,7 @@ try "
my $t;
try "cd $rb; find . -name gl-perms"; $t = md5sum(sort (lines())); cmp $t,
-'d41d8cd98f00b204e9800998ecf8427e ./foo/u1/u1a.git/gl-perms
-59b3a74b4d33c7631f08e75e7b60c7ce ./foo/u1/u1a2.git/gl-perms
+'59b3a74b4d33c7631f08e75e7b60c7ce ./foo/u1/u1a2.git/gl-perms
59b3a74b4d33c7631f08e75e7b60c7ce ./foo/u1/u1e.git/gl-perms
';