embedding test code in gitolite.conf

12 views
Skip to first unread message

Sitaram Chamarty

unread,
Jul 2, 2017, 10:33:50 AM7/2/17
to gitolite, gitolite...@googlegroups.com
Hi everyone,

I just pushed 3.6.7. I'm not sure if I've announced minor
releases before, but if not, in this case I'm making an
exception, to talk about a feature that you might otherwise not
hear of -- embedding test code in the conf file.

This could be useful for people who have complex rulesets and
are worried about making changes that accidentally break
existing rules, and would like to test them before pushing the
conf to the server.

Full details, including preparation and caveats, are in
`contrib/utils/testconf`[1], but here's a teaser example:

repo foo
RW+ = u1
RW = u2

=begin testconf
gitolite access -q foo u1 + any || echo FAILED
gitolite access -q foo u2 + any && echo FAILED
gitolite access -q foo u2 W any || echo FAILED
=end

[1]: https://github.com/sitaramc/gitolite/blob/master/contrib/utils/testconf

--
sitaram
Reply all
Reply to author
Forward
0 new messages