gitolite/t
2011-10-11 13:53:58 +05:30
..
keys (test suite) t/install also serves as a quick way to "play install" gitolite 2011-10-11 13:53:57 +05:30
out fix sequencing for repo config statements 2011-08-17 21:03:14 +05:30
basic.conf finally, open up my secret test scripts... 2010-06-12 13:24:55 +05:30
install (test suite) t/install also serves as a quick way to "play install" gitolite 2011-10-11 13:53:57 +05:30
README.mkd (doc) a slew of minor doc fixes 2011-05-05 09:32:13 +05:30
rollback (test suite) t/install also serves as a quick way to "play install" gitolite 2011-10-11 13:53:57 +05:30
rollback.server (test suite) t/install also serves as a quick way to "play install" gitolite 2011-10-11 13:53:57 +05:30
t-fedora-big-config (minor) updated fedora test case to add new RC vars introduced 2 commits in HEAD^^ 2010-07-30 08:48:20 +05:30
t00-initial make REPO_BASE absolute early 2011-03-21 07:51:10 +05:30
t01-repo-groups (major change in big-config mode) split the compiled config file 2011-01-02 11:30:29 +05:30
t02-user-groups (major change in big-config mode) split the compiled config file 2011-01-02 11:30:29 +05:30
t03-branch-permissions test suite: catch internal errors better 2010-06-18 22:09:30 +05:30
t03a-branch-permissions lots of changes to tests for big-config 2010-08-11 22:38:16 +05:30
t04-wild test suite: catch internal errors better 2010-06-18 22:09:30 +05:30
t04a-wild-all make REPO_BASE absolute early 2011-03-21 07:51:10 +05:30
t04a-wild-students make REPO_BASE absolute early 2011-03-21 07:51:10 +05:30
t05-delegation (tests) added tests for delegating with wildcards 2010-08-21 10:48:39 +05:30
t05a-delegation new 'subconf' feature to explicitly do delegation 2011-08-30 20:50:34 +05:30
t05b-delegation-wild new 'subconf' feature to explicitly do delegation 2011-08-30 20:50:34 +05:30
t09-oldtests finally, open up my secret test scripts... 2010-06-12 13:24:55 +05:30
t09a-oldtests put single quotes around bad user/repo names etc 2011-10-06 21:09:55 +05:30
t10-all-yall (test suite) remove hardcoded username 'gitolite-test' 2011-10-11 13:53:58 +05:30
t11-deny-repo (test suite) remove hardcoded username 'gitolite-test' 2011-10-11 13:53:58 +05:30
t50-sequence-test make REPO_BASE absolute early 2011-03-21 07:51:10 +05:30
t51-personal-branches lots of changes to tests for big-config 2010-08-11 22:38:16 +05:30
t52-deny-create-ref lots of changes to tests for big-config 2010-08-11 22:38:16 +05:30
t53-check-info-expand-output (minor) change to version reporting 2011-09-10 11:08:54 +05:30
t54-repo-configs make REPO_BASE absolute early 2011-03-21 07:51:10 +05:30
t55-repo-configs-wild-without-CREATOR rc: get rid of GL_GITCONFIG_WILD 2011-08-17 21:53:06 +05:30
t56-repo-configs-wild-with-CREATOR rc: get rid of GL_GITCONFIG_WILD 2011-08-17 21:53:06 +05:30
t57-daemon-gitweb (test suite) remove hardcoded username 'gitolite-test' 2011-10-11 13:53:58 +05:30
t58-daemon-gitweb-wild (test suite) remove hardcoded username 'gitolite-test' 2011-10-11 13:53:58 +05:30
t59-repo-not-on-disk make REPO_BASE absolute early 2011-03-21 07:51:10 +05:30
t60-daemon-gitweb-via-setperms (test suite) remove hardcoded username 'gitolite-test' 2011-10-11 13:53:58 +05:30
t61-setperms-groups make REPO_BASE absolute early 2011-03-21 07:51:10 +05:30
t62-rule-sequences make REPO_BASE absolute early 2011-03-21 07:51:10 +05:30
t63-perm-cats make REPO_BASE absolute early 2011-03-21 07:51:10 +05:30
t64-write-able (test suite) remove hardcoded username 'gitolite-test' 2011-10-11 13:53:58 +05:30
t65-rsync gitolite v2.0rc1 -- please see new developer-notes doc 2011-01-16 07:26:13 +05:30
t67-hub (test suite) remove hardcoded username 'gitolite-test' 2011-10-11 13:53:58 +05:30
t68-include fix a rather large typo/thinko in 1006eba 2011-09-10 19:46:37 +05:30
t69-bad-ref-file-names tighten up ref/file names (warning: possible backward compat breakage) 2011-10-01 15:19:50 +05:30
test-driver.sh (test suite) changes to test-driver for "all in one user" testing 2011-10-11 13:53:58 +05:30

notes on the testing setup

In this document:

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 like AllowUsers 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
    
  • you can also run them through "prove", although 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:

    prove ./test-driver.sh
    # or
    prove ./test-driver.sh :: t51
    

instructions for adding new tests

(TODO)