proof of concept: serve local git repos via http#6094
proof of concept: serve local git repos via http#6094allisonkarlitskaya wants to merge 1 commit intomainfrom
Conversation
This might be useful to help us do a more-complete mocking of github... Write a small job-runner test based on this (although this isn't proper unit testing in any sense)
| status, _, reason = message.get('Status', '200 OK').partition(' ') | ||
| return web.Response(status=int(status), reason=reason, headers=dict(message), body=body) | ||
|
|
||
| return await repository(request).http_backend(request) |
Check warning
Code scanning / CodeQL
Unreachable code
|
Hi @allisonkarlitskaya We've done somethins similar for packit projects, to mock whole communication with gitlab/github https://github.com/packit/requre usage is then like: In this case it mocks python github library communication, There exists also projects like: https://vcrpy.readthedocs.io/en/latest/ but these projects are simplier and we've needed also to cover e.g. also SOAP/XML-RPC api, what was not covered by this. |
|
hi @jscotka, thanks for the link. We already have a few different versions of mocked GitHub API as well, but the thing that this PR aims to do is to enable serving of the repo content as well, so that you can do things like |
This might be useful to help us do a more-complete mocking of github...
Write a small job-runner test based on this (although this isn't proper unit testing in any sense)