gojek / proctor

A Developer-Friendly Automation Orchestrator
Apache License 2.0
123 stars 43 forks source link

[Rajat] Add Github client to fetch latest release of proctor #78

Closed RajatVaryani closed 5 years ago

RajatVaryani commented 5 years ago

The PR references #55. I am using a mature github client. The only pitfall with the library is that mocking is not easy as the github client does not expose any interfaces. This is a draft PR suggesting that. @olttwa How should we go forward with this?

olttwa commented 5 years ago

@RajatVaryani wrapping the github client inside a struct is a good enough approach. see if you can reverse engineer the http call and mock it, else leave the testing of github client code. Just inject the wrapper struct, mock it in application code's tests and you're good to go.

RajatVaryani commented 5 years ago

@jensoncs @olttwa Can you please review the PR?

RajatVaryani commented 5 years ago

@jensoncs @olttwa Bumping up!