master TOC | chapter TOC | support

notes on the testing setup

WARNING: PLEASE use a dedicated user for doing this. Various files and directories get overwritten and it's much simpler this way.

terminology

#define PW "patches welcome!"
#define TODO PW

notes and background

All testing is done on one brand new userid. We use ssh host alias tricks to simulate multiple gitolite users within this, so ssh gitolite info gets you different results than ssh u1 info.

The test suite is mainly meant for testing the core (access control) functionality. It doesn't test anything else, like say the install or upgrade operations. Other big features NOT covered by the test suite are mirroring, smart http, and password-based access.

Note that the test driver has evolved as new scripts were added; you will see that older scripts are a little less sophisticated.

playing with gitolite

(Please heed the warning at the top of this document and use a dedicated user for this).

Playing with gitolite is easy.

This is what you get when you do this:

Don't forget that the client and the server are all on the same user on the same machine.

And don't forget, too, that we are simulating 7 gitolite users using ssh keys! (How? Maybe ~/.ssh/config will give you a hint). You can now use those 7 users in any way you please in the config file and test out different user's access simply using a different URL. For example, git clone u1:testing and git clone u2:testing may give you different results depending on what rights you gave users "u1" and "u2" in your config.

testing gitolite

First, do what the "playing with gitolite" section says. That is a pre-requisite.

Once that is done, run this command (still in $HOME of the gl-test userid):

prove gitolite/t/test-driver.sh

(note: to make it work easier with prove, I ended up making the "subtest" numbers be the actual test numbers, making it look like I have over 2000 tests, when in reality I have about 600)

instructions for adding new tests

(TODO)