-
Notifications
You must be signed in to change notification settings - Fork 61
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
fix(Activity Tracker): re-gen service after recent API changes #135
Conversation
I reached out to Ying via Slack and asked for the api def file was used to re-gen the sdk. The activity repo has an, seemingly, outdated one. |
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 good!
I'd like to ask you to add further test cases to the integration suite covering 400
, 403
and 404
status codes for both new operation. If you can test easily and programmatically 429
then please add that too.
We'd like to achieve that all the status codes mentioned in the api definition file are exercised by integration tests. There are exceptions like 401
, but we can live with that.
You can find examples (link below), especially how to create a new client not having enough rights to do things so the server returns 403.
https://github.com/IBM/platform-services-go-sdk/blob/main/catalogmanagementv1/catalog_management_v1_integration_new_test.go
Feel free to ping me if you need any help.
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
I agree with @Andras-Csanyi that it would be good to augment the integration tests to include negative tests that exercise each of the error status codes that are explicitly defined in the API definition. We haven't always done this in the SDK int tests, but it's a good practice to follow going forward. I'll approve now to avoid a re-review assuming these negative tests are added.
@Andras-Csanyi @padamstx thanks for reviewing, I have add some 20+ negative test cases (400, 404, 403) for integration tests. For the 2 new Endpoints APIs, it seems hard to simulate 400 error and 404 error is removed from apidoc, so I just include 403 negative tests for them. Please help review, thanks. here are new integration test results:
|
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 really good!
Thank you for adding the negative tests!
## [0.19.1](v0.19.0...v0.19.1) (2021-07-09) ### Bug Fixes * **activity tracker:** re-gen service after recent API changes ([#135](#135)) ([7723b9e](7723b9e))
🎉 This PR is included in version 0.19.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
PR summary
add endpoint sdk functions based on 2 new endpoints api for atracker service
PR Checklist
Please make sure that your PR fulfills the following requirements:
Current vs new behavior
Does this PR introduce a breaking change?
Other information
unit test results:
integration test results: