-
Notifications
You must be signed in to change notification settings - Fork 720
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
checker: migrate test framework to testify #5174
Conversation
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
Signed-off-by: Ryan Leung <rleungx@gmail.com>
Codecov Report
@@ Coverage Diff @@
## master #5174 +/- ##
==========================================
+ Coverage 75.71% 75.72% +0.01%
==========================================
Files 310 310
Lines 30648 30686 +38
==========================================
+ Hits 23204 23238 +34
+ Misses 5449 5448 -1
- Partials 1995 2000 +5
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Signed-off-by: Ryan Leung <rleungx@gmail.com>
Signed-off-by: Ryan Leung <rleungx@gmail.com>
pkg/testutil/operator_check.go
Outdated
func CheckSteps(re *require.Assertions, op *operator.Operator, steps []operator.OpStep) { | ||
re.NotEqual(0, op.Kind()&operator.OpMerge) | ||
re.NotNil(steps) | ||
re.Equal(len(steps), op.Len()) |
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.
re.Equal(len(steps), op.Len()) | |
re.Len(steps, op.Len()) |
|
||
c.Assert(op.Len(), Equals, len(steps)) | ||
re.Equal(len(steps), op.Len()) |
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.
Ditto.
ctx context.Context | ||
cancel context.CancelFunc | ||
cluster *mockcluster.Cluster | ||
mc *MergeChecker | ||
regions []*core.RegionInfo | ||
} | ||
|
||
func (s *testMergeCheckerSuite) SetUpSuite(c *C) { | ||
s.ctx, s.cancel = context.WithCancel(context.Background()) | ||
func TestMergeCheckerSuite(t *testing.T) { |
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.
func TestMergeCheckerSuite(t *testing.T) { | |
func TestMergeCheckerTestSuite(t *testing.T) { |
Signed-off-by: Ryan Leung <rleungx@gmail.com>
/merge |
@nolouch: It seems you want to merge this PR, I will help you trigger all the tests: /run-all-tests Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository. |
This pull request has been accepted and is ready to merge. Commit hash: fe435a9
|
@rleungx: Your PR was out of date, I have automatically updated it for you. At the same time I will also trigger all tests for you: /run-all-tests If the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository. |
ref tikv#4813 Signed-off-by: Ryan Leung <rleungx@gmail.com> Co-authored-by: Ti Chi Robot <ti-community-prow-bot@tidb.io>
Signed-off-by: Ryan Leung rleungx@gmail.com
What problem does this PR solve?
Issue Number: Ref #4813.
What is changed and how does it work?
Check List
Tests
Release note