Skip to content

Conversation

@miparnisari
Copy link
Contributor

@miparnisari miparnisari commented Dec 29, 2025

Increasing code coverage of schema.go. No change in functionality.

@miparnisari miparnisari force-pushed the more-tests branch 2 times, most recently from 4673d5e to eb72a81 Compare December 29, 2025 20:19
@codecov-commenter
Copy link

codecov-commenter commented Dec 29, 2025

Codecov Report

❌ Patch coverage is 34.78261% with 30 lines in your changes missing coverage. Please review.
✅ Project coverage is 42.04%. Comparing base (b7d11ff) to head (e871b10).

Files with missing lines Patch % Lines
internal/cmd/schema.go 34.78% 28 Missing and 2 partials ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.


func schemaDiffCmdFunc(_ *cobra.Command, args []string) error {
beforeBytes, err := os.ReadFile(args[0])
beforeReader, err := os.Open(args[0])
Copy link
Contributor Author

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) {
Copy link
Contributor Author

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 {
Copy link
Contributor Author

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

@miparnisari miparnisari marked this pull request as ready for review December 29, 2025 20:25
@miparnisari miparnisari enabled auto-merge (squash) December 29, 2025 22:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants