-
Notifications
You must be signed in to change notification settings - Fork 91
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: some bugs when adding test cases for v1.16 #980
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #980 +/- ##
==========================================
+ Coverage 69.10% 70.04% +0.94%
==========================================
Files 168 168
Lines 11340 11353 +13
==========================================
+ Hits 7836 7952 +116
+ Misses 3152 3050 -102
+ Partials 352 351 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Pull Request Overview
This PR fixes issues related to test case execution and module refreshing in version 1.16 by updating method signatures, renaming Refresh to Fresh, and refining mock implementations. Key changes include:
- Updated Shutdown to return an error value and adjusted related mocks.
- Renamed Refresh methods to Fresh across multiple modules with corresponding updates in tests.
- Converted configuration values (e.g., HTTP timeout) and updated interface signatures (e.g. SetFiles).
Reviewed Changes
Copilot reviewed 29 out of 30 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
mocks/grpc/Grpc.go | Updated Shutdown method to return error and modified mock call return handling. |
mocks/foundation/Application.go | Introduced Fresh method replacing Refresh and updated corresponding mocks. |
mocks/database/orm/Orm.go | Removed Refresh mocks in favor of Fresh. |
http/service_provider.go | Adjusted HTTP client timeout conversion from duration getter to integer with multiplier. |
grpc/application.go | Updated Shutdown method signature and test assertions to check for errors. |
foundation/container.go | Replaced Refresh with Fresh for clearing container instances. |
foundation/application.go | Modified several helper methods to use new Fresh method; added Refresh to compose Fresh+Boot. |
facades/db.go | Added MakeDB façade. |
database/service_provider.go | Changed usage from Refresh to Fresh in ORM building. |
database/orm/orm.go | Renamed refresh parameter and related method to fresh. |
database/migration/* | Added a prepareDatabase call in Reset and updated tests accordingly. |
contracts/support/http/body.go | Updated SetFiles signature to use map[string][]string. |
contracts/grpc/grpc.go | Updated Shutdown signature to return error. |
contracts/foundation/application.go | Updated interface definitions and replaced Refresh with Fresh; added MakeDB. |
contracts/database/orm/orm.go | Changed Refresh method to Fresh. |
console/application.go | Added support for the --no-ansi flag when running commands. |
Files not reviewed (1)
- go.mod: Language not supported
Comments suppressed due to low confidence (3)
contracts/support/http/body.go:11
- Changing the SetFiles method’s signature to accept map[string][]string may break existing implementations; ensure that all consumers are updated accordingly.
SetFiles(files map[string][]string) Body
database/migration/migrator.go:60
- The introduction of prepareDatabase() in Reset adds a dependency; please confirm that prepareDatabase is implemented and properly tested in this context.
if err := r.prepareDatabase(); err != nil {
foundation/application.go:100
- [nitpick] The Refresh method now calls Fresh followed by Boot; verify that this combined behavior is in line with the intended module reset functionality to avoid side effects.
func (r *Application) Refresh() {
📑 Description
✅ Checks