-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
VReplication workflow package: unit tests for StreamMigrator, Mount et al #16498
VReplication workflow package: unit tests for StreamMigrator, Mount et al #16498
Conversation
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
Tests
Documentation
New flags
If a workflow is added or modified:
Backward compatibility
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #16498 +/- ##
==========================================
+ Coverage 68.87% 68.97% +0.10%
==========================================
Files 1562 1562
Lines 200673 200673
==========================================
+ Hits 138217 138423 +206
+ Misses 62456 62250 -206 ☔ View full report in Codecov by Sentry. |
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.
❤️ Thank you for working on these!
cd912b5
to
636eadd
Compare
Signed-off-by: Rohit Nayak <rohit@planetscale.com>
Signed-off-by: Rohit Nayak <rohit@planetscale.com>
Signed-off-by: Rohit Nayak <rohit@planetscale.com>
Signed-off-by: Rohit Nayak <rohit@planetscale.com>
Signed-off-by: Rohit Nayak <rohit@planetscale.com>
Signed-off-by: Rohit Nayak <rohit@planetscale.com>
Signed-off-by: Rohit Nayak <rohit@planetscale.com>
Signed-off-by: Rohit Nayak <rohit@planetscale.com>
Signed-off-by: Rohit Nayak <rohit@planetscale.com>
636eadd
to
a1aba96
Compare
for _, tt := range tests { | ||
t.Run(tt.name, func(t *testing.T) { | ||
result := tt.funcUnderTest(streams) | ||
if !reflect.DeepEqual(result, tt.expectedResult) { |
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.
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.
Will change in the related followup PRs that improve coverage.
…t al (vitessio#16498) Signed-off-by: Rohit Nayak <rohit@planetscale.com>
Description
As part of the vtctldclient migration, we ported over a lot of existing code and wrote new code in the
go/vt/vtctl/workflow
package. However the unit test frameworks were not. While we have added some unit tests since, the current coverage is still very low.This is one of multiple PRs that we will create to progressively increase coverage to a more acceptable level.
This PR has tests, among others, for:
Mount
commandsStreamMigrator
ShardRoutingRules
Related Issue(s)
#16499
Checklist
Deployment Notes