-
Notifications
You must be signed in to change notification settings - Fork 81
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
Implemented new middleware system #571
Implemented new middleware system #571
Conversation
18d4753
to
b3b7008
Compare
@@ -136,7 +136,7 @@ type RequestParams struct { | |||
// Generic helper to execute HTTP requests using the net/http package | |||
// | |||
// nolint:unused, funlen, gocognit | |||
func (c *httpClient) doRequest(ctx context.Context, method, url string, params RequestParams, mutators ...func(req *http.Request) error) 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.
💯
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.
Looks great, nice work!
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, good unit test coverage and passing locally! Nice work!
* added reserved field to InstanceIP struct for IP Reservation response * Reserved IP resource for handling IP reservation API's * Added integration test covering multiple scenarios of reserving IP addresses * The fixture files for different scenarios of IP Reservation - EndToEnd, InsuffecientPermission, ReserveIP, GetReservedIP, getReservedIPs, DeleteReservedIPs * Updated the fixture files with responses after the user has permissions to reserve IP * Changed the error message to relay invalid token for insufficient permission tests * Updated the error message for Insufficient Permission tests to display appropriate error message along with code * Made changes to Delete, List, Get, Reserve, EndtoEnd fixtures to record user with adequate permissions * changed variable name from id to address to keep it consistent with other functions * Made changes to variable names, achanged logf statements to errorf and fatalf wherever necessary * changed fixture file names to improve consistency, re-recorded fixtures with latest error messages * removed debugging fmt statement * Made changes to reserve IP addresses before listing them using fitler feature. Removed for loop to reserve IPs till limit is reached. * uncommenting unaffected tests * Made changes to error messages, added mandatory checks and re-recorded fixtures to reflect new error messages * Added new middleware system (#571) * build(deps): bump golang.org/x/oauth2 from 0.22.0 to 0.23.0 (#574) * build(deps): bump golang.org/x/oauth2 from 0.22.0 to 0.23.0 Bumps [golang.org/x/oauth2](https://github.com/golang/oauth2) from 0.22.0 to 0.23.0. - [Commits](golang/oauth2@v0.22.0...v0.23.0) --- updated-dependencies: - dependency-name: golang.org/x/oauth2 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * Ran make tidy --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: ezilber-akamai <ezilber@akamai.com> * build(deps): bump golang.org/x/text from 0.17.0 to 0.18.0 (#575) * build(deps): bump golang.org/x/text from 0.17.0 to 0.18.0 Bumps [golang.org/x/text](https://github.com/golang/text) from 0.17.0 to 0.18.0. - [Release notes](https://github.com/golang/text/releases) - [Commits](golang/text@v0.17.0...v0.18.0) --- updated-dependencies: - dependency-name: golang.org/x/text dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * make tidy --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Ye Chen <yechen@akamai.com> * new: Add support LKE, Volume, NodeBalancer, and network transfer pricing endpoints (#573) * Add LKE types endpoints * Support base struct; add NB types endpoints * Add volume types * Add network transfer prices * Add price and region price structs * Revert IPv6 fixtures * Add missing fixtures * Add test case for ip limit exceed * add cleanup for TestReservedIPAddresses_ExceedLimit * added interactions to fixture and changed the ecpected error message * Added note indicating feature is currently not available to all users --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Erik Zilber <ezilber@akamai.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Ye Chen <yechen@akamai.com> Co-authored-by: Lena Garber <114949949+lgarber-akamai@users.noreply.github.com> Co-authored-by: ykim-1 <ykim@akamai.com>
📝 Description
Implemented new middleware system that no longer relies on resty.
✔️ How to Test
make testunit