bootstrap: demo CommitService servicer tested with pytest
We use the `pytest-grpc` helpers. This implements only the `FindCommit` RPC call, but in a complete manner. This raises several questions: - for now, we have a single `servicer` module, but Gitaly has many services: How shall we organize our code? - the fixtures for gRPC server have the module scope. Shall we have such a fixture for each service? - will we be able to create commits directly with the Gitaly API in the future? - do we want to separate the tests in several layers, ie those that don't need a gRPC server (unit-testing the `changectx_to` functions) and those that do?
parent
7196784b950a
No related branches found
No related tags found
Showing
- .gitlab-ci.yml 3 additions, 0 deletions.gitlab-ci.yml
- conftest.py 27 additions, 0 deletionsconftest.py
- dev-requirements.txt 2 additions, 0 deletionsdev-requirements.txt
- hgitaly/servicer.py 113 additions, 0 deletionshgitaly/servicer.py
- hgitaly/tests/test_commit.py 50 additions, 0 deletionshgitaly/tests/test_commit.py
conftest.py
0 → 100644
hgitaly/servicer.py
0 → 100644
hgitaly/tests/test_commit.py
0 → 100644
Please register or sign in to comment