-
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
test: Include unit tests for switcher-dry-run
#17403
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
|
Signed-off-by: Noble Mittal <[email protected]>
5c560be
to
d55b620
Compare
Signed-off-by: Noble Mittal <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #17403 +/- ##
==========================================
+ Coverage 67.52% 67.61% +0.08%
==========================================
Files 1581 1581
Lines 253948 253945 -3
==========================================
+ Hits 171480 171696 +216
+ Misses 82468 82249 -219 ☔ 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.
Thanks, @beingnoble03 ! Just the one nit about the struct name.
topodatapb "vitess.io/vitess/go/vt/proto/topodata" | ||
) | ||
|
||
func newTrafficSwitcherEnv(t *testing.T, tables []string, sourceKeyspaceName string, sourceShards []string, targetKeyspaceName string, targetShards []string, workflowName string) (*testEnv, *trafficSwitcher) { |
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.
IMO we should rename this to newSwitcherDryRunEnv
so that it's more aligned with what it is.
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.
but the function returns testEnv
and trafficSwitcher
instance, so I thought of naming it newTrafficSwitcherEnv
?
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.
OK, it's not a big deal either way. If it has nothing specifically to do with dry runs then the current name is definitely fine.
Description
This PR adds unit tests for
switcher_dry_run.go
.Coverage diff:
Related Issue(s)
Checklist
Deployment Notes