-
Notifications
You must be signed in to change notification settings - Fork 39
test: add more tests #614
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
test: add more tests #614
Conversation
4673d5e to
eb72a81
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #614 +/- ##
==========================================
+ Coverage 41.35% 42.04% +0.69%
==========================================
Files 38 38
Lines 4998 5018 +20
==========================================
+ Hits 2067 2110 +43
+ Misses 2684 2654 -30
- Partials 247 254 +7 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
|
||
| func schemaDiffCmdFunc(_ *cobra.Command, args []string) error { | ||
| beforeBytes, err := os.ReadFile(args[0]) | ||
| beforeReader, err := os.Open(args[0]) |
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.
refactor for testability
| return nil | ||
| } | ||
|
|
||
| func schemaCopyInner(ctx context.Context, srcClient, destClient v1.SchemaServiceClient, definitionPrefix string) (*v1.WriteSchemaResponse, 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.
refactor for testability
| } | ||
| } | ||
|
|
||
| type mockWriteSchemaClient struct { |
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.
replaced by the auto-generated mock
eb72a81 to
e871b10
Compare
tstirrat15
left a comment
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
e871b10 to
26d6ca8
Compare
Increasing code coverage of
schema.go. No change in functionality.