Repository navigation
fix(go): add unit test suites, error handling, and CI workflow for Go samples - #9383
Open
Hardik K (hardikkaurani) wants to merge 8 commits into
Open
Hardik K (hardikkaurani) wants to merge 8 commits into
Hardik K (hardikkaurani) wants to merge 8 commits into
Conversation
…g in app.go Signed-off-by: Hardik Kaurani <[email protected]>
Signed-off-by: Hardik Kaurani <[email protected]>
…n app.go Signed-off-by: Hardik Kaurani <[email protected]>
Signed-off-by: Hardik Kaurani <[email protected]>
Signed-off-by: Hardik Kaurani <[email protected]>
Signed-off-by: Hardik Kaurani <[email protected]>
Signed-off-by: Hardik Kaurani <[email protected]>
… clients Signed-off-by: Hardik Kaurani <[email protected]>
Contributor
Author
|
While reviewing the Go samples across the repository, I noticed a few areas for improvement and missing test coverage across
All tests pass locally across the three directories. Whenever you have a moment, I'd appreciate your review and feedback. Thank you! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR improves code quality, test coverage, and CI automation across the Go sample clients (
petstore/go,msgraph-mail/go, andsample-api/clients/go):petstore/go:AnonymousAuthenticationProvider{}(Swagger Petstore endpoints do not require authentication).log.Fatalfto prevent downstream execution on failure.Pet,FindByStatus,StoreInventory), and models (Pet,Order).go mod tidy.msgraph-mail/go:log.Fatalfto prevent execution with invalid/uninitialized credentials.Messages,MailFolders), query parameters, and models (Message,MailFolder).sample-api/clients/go:ToDoItems,ByIdGuid), query parameters, and models (ToDoItem,ToDoItemUpdate,ProblemDetails).Repository Hygiene & CI Automation:
.gitignorefiles topetstore/go,msgraph-mail/go, andsample-api/clients/go/srcto avoid committing local build and test artifacts..github/workflows/go-samples.ymlworkflow to build and test all three Go sample applications in GitHub Actions.Testing
All test suites were executed and pass locally:
petstore/go: 7 unit tests passedmsgraph-mail/go: 7 unit tests passedsample-api/clients/go/src: 8 unit tests passed