10a30c961d
Fedora's config has over 11,000 repositories and the compiled config file is over 20 MB in size. Although negligible on a server class machine, on my laptop just parsing this file takes a good 2.5 seconds. Even if you use GL_ALL_READ_ALL (see a couple of commits before this one) to remove the overhead for 'read's, that's still a pretty big overhead for writes. And GL_ALL_READ_ALL is not really a solution for most people anyway. With this commit, using GL_BIG_CONFIG adds another optimisation; see doc/big-config.mkd for details (look for the word "split config" to find the section that talks about it). ---- Implementation notes: - the check for GL_NO_CREATE_REPOS has moved *into* the loop (which it completely bypassed earlier) so that write_1_compiled_conf can be called on each item |
||
---|---|---|
.. | ||
keys | ||
out | ||
basic.conf | ||
cleanout-gitolite | ||
install-gitolite | ||
README.mkd | ||
rollback | ||
rollback.server | ||
t-fedora-big-config | ||
t00-initial | ||
t01-repo-groups | ||
t02-user-groups | ||
t03-branch-permissions | ||
t03a-branch-permissions | ||
t04-wild | ||
t04a-wild-all | ||
t04a-wild-students | ||
t05-delegation | ||
t05a-delegation | ||
t05b-delegation-wild | ||
t09-oldtests | ||
t09a-oldtests | ||
t50-sequence-test | ||
t51-personal-branches | ||
t52-deny-create-ref | ||
t53-check-info-expand-output | ||
t54-repo-configs | ||
t55-repo-configs-wild-without-CREATOR | ||
t56-repo-configs-wild-with-CREATOR | ||
t57-daemon-gitweb | ||
t58-daemon-gitweb-wild | ||
t59-repo-not-on-disk | ||
t60-daemon-gitweb-via-setperms | ||
t61-setperms-groups | ||
t62-rule-sequences | ||
t63-perm-cats | ||
t64-write-able | ||
test-driver.sh | ||
update-gitolite |
notes on the testing setup
In this document:
- terminology
- notes and background
- quick instructions for running the test suite
- instructions for adding new tests
terminology
#define PW "patches welcome!"
#define TODO PW
notes and background
-
all testing is done on one machine, using 2 userids
-
test driver exits on the first failed test; no fancy counting here. (PW).
-
installs are done using "gl-easy-install". As such, this test suite is mainly meant for testing the core (access control) functionality, and will not help you test the install/upgrade parts themselves. Those are a lot more difficult to test in an automated fashion, but luckily they also change infrequently and can easily be tested manually when they do. Errors in those are much more visible too. (PW).
-
the test driver has evolved as new scripts were added; you will see that older scripts are a little less sophisticated.
quick instructions for running the test suite
-
create two brand new user IDs: tester and gitolite-test
- these are hard-coded, sorry. (PW)
- give them some passwords
- allow ssh into gitolite-test in
/etc/ssh/sshd_config
; preferably use a line likeAllowUsers gitolite-test@127.0.0.1
so that no one can ssh in from outside
-
prepare/push a bare clone of gitolite itself on /tmp so that the "tester" userid can grab it painlessly
cd your-gitolite-working-repo git clone --bare $PWD /tmp/gitolite # first time git push -f --all /tmp/gitolite # subsequent times
-
"su" to "tester" and clone/fetch the gitolite source:
cd $HOME; git clone /tmp/gitolite # first time cd gitolite; git fetch origin # subsequent times
-
checkout and "install" the branch you want to test (install from "tester" userid to "gitolite-test" userid). Example, if you want to test "pu" branch:
git checkout -t origin/pu # if needed git checkout -f pu; git reset --hard origin/pu # subsequent times cd t # THIS IS IMPORTANT (patches welcome, or will be fixed eventually!) ./install-gitolite
-
run all or some of the tests
./test-driver.sh # or ./test-driver.sh t51
instructions for adding new tests
(TODO)