-
Notifications
You must be signed in to change notification settings - Fork 67
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 Client Code, part 2 of several #197
Refactor Client Code, part 2 of several #197
Conversation
} | ||
|
||
// Helper method to request and decode a device service | ||
func (s *deviceServiceRestClient) requestDeviceService(url string, ctx context.Context) (models.DeviceService, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed this helper method because it is only used once and is unlikely to be used anywhere else.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rework based on comments in #195
Signed-off-by: Brandon Forster <brandonforster@gmail.com>
Renamed EndpointerClient to Client. Signed-off-by: Michael W. Estrin <me@michaelestrin.com>
Signed-off-by: Michael W. Estrin <me@michaelestrin.com>
Refactored client implementation to strategy pattern. Updated package to only expose public Factory function. Signed-off-by: Michael W. Estrin <me@michaelestrin.com>
… here). Signed-off-by: Michael W. Estrin <me@michaelestrin.com>
Signed-off-by: Brandon Forster <brandonforster@gmail.com>
Signed-off-by: Brandon Forster <brandonforster@gmail.com>
Signed-off-by: Brandon Forster <brandonforster@gmail.com>
Signed-off-by: Brandon Forster <me@brandonforster.com>
Signed-off-by: Brandon Forster <me@brandonforster.com>
Signed-off-by: Brandon Forster <me@brandonforster.com>
d0c3967
to
96dd8e2
Compare
Codecov Report
@@ Coverage Diff @@
## master #197 +/- ##
==========================================
+ Coverage 48.01% 48.39% +0.38%
==========================================
Files 61 64 +3
Lines 2347 2093 -254
==========================================
- Hits 1127 1013 -114
+ Misses 1146 1002 -144
- Partials 74 78 +4
Continue to review full report at Codecov.
|
Signed-off-by: Brandon Forster <me@brandonforster.com>
Signed-off-by: Brandon Forster <me@brandonforster.com>
Signed-off-by: Brandon Forster <brandonforster@gmail.com>
Signed-off-by: Brandon Forster <me@brandonforster.com>
Signed-off-by: Brandon Forster <brandonforster@gmail.com>
96dd8e2
to
c9aeac5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
This PR is the second part of several working on #196.
This PR refactors all of metadata's clients and updates their unit tests.
To test, actuate the endpoints in the metadata device client. The blackbox tests for command should work for that.