Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR updates the tests module by reorganizing grammar interface definitions and removing redundant mock implementations for version compilation.
- Reorganizes interface definitions in grammar.go to extract common methods into a dedicated CommonGrammar interface.
- Removes CompileVersion mock implementations from both GormGrammar and SchemaGrammar, requiring corresponding test updates.
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| contracts/database/driver/grammar.go | Reorganizes grammar interfaces to consolidate common functionalities into CommonGrammar. |
| mocks/database/driver/GormGrammar.go | Removes the CompileVersion mock functions to align with the new interface design. |
| mocks/database/driver/SchemaGrammar.go | Removes the CompileVersion mock functions to align with the new interface design. |
Comments suppressed due to low confidence (2)
mocks/database/driver/GormGrammar.go:162
- The removal of the CompileVersion mock in GormGrammar may leave tests with uncovered cases. Ensure that tests now verify version compilation via the new CommonGrammar interface.
func (_m *GormGrammar) CompileVersion() string {
mocks/database/driver/SchemaGrammar.go:1468
- The removal of the CompileVersion mock in SchemaGrammar could result in gaps in test coverage. Verify that tests have been updated to cover version compilation through the CommonGrammar interface.
func (_m *SchemaGrammar) CompileVersion() string {
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #962 +/- ##
=======================================
Coverage 69.14% 69.14%
=======================================
Files 158 158
Lines 10607 10607
=======================================
Hits 7334 7334
Misses 2942 2942
Partials 331 331 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
📑 Description
Closes https://github.com/goravel/goravel/issues/
The summary will be generated by Copilot in the below.
✅ Checks