Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor api package to an interface #1020

Merged
merged 4 commits into from
May 24, 2019
Merged

Refactor api package to an interface #1020

merged 4 commits into from
May 24, 2019

Conversation

lox
Copy link
Contributor

@lox lox commented May 21, 2019

Previously the api client used different sub-structs for different "services", which ended up being very hard to test. This folds it down into methods on the api.Client struct, which is less modular, but easier to mock in tests (and understand).

Additionally, the api client construction lived in the agent package. This is moved into the api package so everything lives together.

A basic test was added for the api client.

@lox lox requested a review from sj26 May 22, 2019 04:50
@lox
Copy link
Contributor Author

lox commented May 22, 2019

@sj26 could I walk you through this one?

@sj26
Copy link
Member

sj26 commented May 22, 2019

Yup @lox, grab me when you'd like to go through it. Maybe tomorrow, if we'll both be in league?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants