diff options
author | Sitaram Chamarty <sitaram@atc.tcs.com> | 2012-03-14 15:30:05 +0530 |
---|---|---|
committer | Sitaram Chamarty <sitaram@atc.tcs.com> | 2012-03-24 10:30:42 +0530 |
commit | 141b2ce8970cab434e562b4017ca82beb7438bc5 (patch) | |
tree | 221164babc50e3ad9519cf0cd9919b14b18611bf /t/include-subconf.t | |
parent | Test.pm learned confreset() and confadd() (diff) | |
download | gitolite-gentoo-141b2ce8970cab434e562b4017ca82beb7438bc5.tar.gz gitolite-gentoo-141b2ce8970cab434e562b4017ca82beb7438bc5.tar.bz2 gitolite-gentoo-141b2ce8970cab434e562b4017ca82beb7438bc5.zip |
more tests
Diffstat (limited to 't/include-subconf.t')
-rwxr-xr-x | t/include-subconf.t | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/t/include-subconf.t b/t/include-subconf.t new file mode 100755 index 0000000..7bb5b04 --- /dev/null +++ b/t/include-subconf.t @@ -0,0 +1,79 @@ +#!/usr/bin/perl +use strict; +use warnings; + +# this is hardcoded; change it if needed +use lib "src"; +use Gitolite::Test; + +try 'plan 37'; + +confreset; confadd ' + include "i1.conf" + @i2 = b1 + subconf "i2.conf" + include "i1.conf" +'; +confadd 'i1.conf', ' + @g1 = a1 a2 + repo foo + RW = u1 + + include "j1.conf" +'; +confadd 'i2.conf', ' + @g2 = b1 b2 + repo bar b1 b2 i1 i2 @i1 @i2 @g2 + RW = u2 +'; +confadd 'j1.conf', ' + @h2 = c1 c2 + repo baz + RW = u3 +'; + +try "ADMIN_PUSH set2; !/FATAL/" or die text(); + +try " + /i1.conf already included/ + /i2.conf attempting to set access for \@i1, b2, bar, i1, locally modified \@g2/ + !/attempting to set access.*i2/ + /Initialized.*empty.*baz.git/ + /Initialized.*empty.*foo.git/ + /Initialized.*empty.*b1.git/ + /Initialized.*empty.*i2.git/ + !/Initialized.*empty.*b2.git/ + !/Initialized.*empty.*i1.git/ + !/Initialized.*empty.*bar.git/ +"; + +confreset;confadd ' + @g2 = i1 i2 i3 + subconf "g2.conf" +'; +confadd 'g2.conf', ' + @g2 = g2 h2 i2 + repo @g2 + RW = u1 +'; + +try "ADMIN_PUSH set3; !/FATAL/" or die text(); +try " + /g2.conf attempting to set access for locally modified \@g2/ + !/Initialized.*empty/ +"; + +confreset;confadd ' + @g2 = i1 i2 i3 + subconf "g2.conf" +'; +confadd 'g2.conf', ' + subconf master + @g2 = g2 h2 i2 + repo @g2 + RW = u1 +'; + +try " + ADMIN_PUSH set3; ok; /FATAL: subconf g2 attempting to run 'subconf'/ +"; |