Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-workhorse
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
iv
gitlab-workhorse
Commits
8b9f31be
Commit
8b9f31be
authored
Mar 09, 2016
by
Jacob Vosmaer
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'test-guidelines' into 'master'
Add test guidelines See merge request !39
parents
1500542c
1c2b7374
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
30 deletions
+9
-30
README.md
README.md
+9
-30
No files found.
README.md
View file @
8b9f31be
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment