diff --git a/README.md b/README.md index a6a674c8048a9294259a812d4e1d5a56b6adae24..e228cc5d558c9c9f1fc88ad1833fefcbc3d72c18 100644 --- a/README.md +++ b/README.md @@ -70,42 +70,21 @@ make install PREFIX=/foo ## Tests -``` -make clean test -``` - -## Try it out - -You can try out the Git server without authentication as follows: +Run the tests with: ``` -# Start a fake auth backend that allows everything/everybody -make test/data/test.git -go run support/fake-auth-backend.go ~+/test/data/test.git & -# Start gitlab-workhorse -make -./gitlab-workhorse +make clean test ``` -Now you can try things like: +### Coverage / what to test -``` -git clone http://localhost:8181/test.git -curl -JO http://localhost:8181/test/repository/archive.zip -``` +Each feature in gitlab-workhorse should have an integration test that +verifies that the feature 'kicks in' on the right requests and leaves +other requests unaffected. It is better to also have package-level tests +for specific behavior but the high-level integration tests should have +the first priority during development. -## Example request flow - -- start POST repo.git/git-receive-pack to NGINX -- ..start POST repo.git/git-receive-pack to gitlab-workhorse -- ....start POST repo.git/git-receive-pack to Unicorn for auth -- ....end POST to Unicorn for auth -- ....start git-receive-pack process from gitlab-workhorse -- ......start POST /api/v3/internal/allowed to Unicorn from Git hook (check protected branches) -- ......end POST to Unicorn from Git hook -- ....end git-receive-pack process -- ..end POST to gitlab-workhorse -- end POST to NGINX +It is OK if a feature is only covered by integration tests. ## License