Skip to content

Make gitlabstub API responses more explicit

Kassio Borges requested to merge kassio/refactoring-gitlabstub-reponses into master

What does this MR do?

While working on !856 (merged), I had some trouble to understand how to create new stubbed responses for the gitlabstub API.

Over the weekend, I took some time to rewrite that part of the code with the goal to make it more straightforward by leveraging go type system to define the stubbed responses.

I intentionally removed the calculated responses based on a given path. My goal is to have a more declarative way to stub the responses and be very explicit about where the files are coming from. Although it's a bit more verbose, the logic in the code, IMHO, is easier to follow and the overall api_responses.go file is easier to read.

TODO

Edited by Kassio Borges

Merge request reports