Skip to content
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

use a generic way to test methods of PD Client #2988

Merged
merged 2 commits into from
Jul 20, 2020
Merged

Conversation

cofyc
Copy link
Contributor

@cofyc cofyc commented Jul 20, 2020

What problem does this PR solve?

#2939

What is changed and how does it work?

Check List

Tests

  • Unit test
  • E2E test
  • Stability test
  • Manual test (add detailed scripts or steps below)
  • No code

Code changes

  • Has Go code change
  • Has CI related scripts change
  • Has Terraform scripts change

Side effects

  • Breaking backward compatibility

Related changes

  • Need to cherry-pick to the release branch
  • Need to update the documentation

Does this PR introduce a user-facing change?:

NONE

@@ -22,12 +22,6 @@ import (
"k8s.io/klog"
)

const (
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not used

@@ -0,0 +1,252 @@
// Copyright 2020 PingCAP, Inc.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move the faked version of PD API to a separate file

@@ -0,0 +1,135 @@
// Copyright 2018 PingCAP, Inc.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move PD control interface to a separate file

@codecov-commenter
Copy link

codecov-commenter commented Jul 20, 2020

Codecov Report

Merging #2988 into master will increase coverage by 0.39%.
The diff coverage is 61.93%.

@@            Coverage Diff             @@
##           master    #2988      +/-   ##
==========================================
+ Coverage   41.01%   41.41%   +0.39%     
==========================================
  Files         153      155       +2     
  Lines       16751    16744       -7     
==========================================
+ Hits         6871     6934      +63     
+ Misses       9333     9250      -83     
- Partials      547      560      +13     
Flag Coverage Δ
#unittest 41.41% <61.93%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Copy link
Contributor

@weekface weekface left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@cofyc cofyc requested a review from Yisaer July 20, 2020 10:44
Copy link
Contributor

@DanielZhangQD DanielZhangQD left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@cofyc
Copy link
Contributor Author

cofyc commented Jul 20, 2020

/merge

@ti-srebot
Copy link
Contributor

/run-all-tests

@ti-srebot ti-srebot merged commit be0e445 into pingcap:master Jul 20, 2020
ti-srebot pushed a commit to ti-srebot/tidb-operator that referenced this pull request Jul 20, 2020
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
@ti-srebot
Copy link
Contributor

cherry pick to release-1.1 in PR #2994

cofyc added a commit that referenced this pull request Jul 21, 2020
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>

Co-authored-by: Yecheng Fu <fuyecheng@pingcap.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants