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

pkg, api, tests: migrate the server/api tests to testify #5204

Merged
merged 6 commits into from
Jun 22, 2022

Conversation

JmPotato
Copy link
Member

Signed-off-by: JmPotato [email protected]

What problem does this PR solve?

Issue Number: Close #5199.

What is changed and how does it work?

Migrate the server/api tests to testify.

Check List

Tests

  • Unit test
  • Integration test

Release note

None.

@JmPotato JmPotato added component/api HTTP API. component/testing CI testing. labels Jun 21, 2022
@JmPotato JmPotato requested review from nolouch, lhy1024 and rleungx June 21, 2022 09:56
@ti-chi-bot
Copy link
Member

ti-chi-bot commented Jun 21, 2022

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • lhy1024
  • nolouch

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

The full list of commands accepted by this bot can be found here.

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@ti-chi-bot ti-chi-bot added the release-note-none Denotes a PR that doesn't merit a release note. label Jun 21, 2022
// TODO: enable it.
c.Skip("Temporary disable. See issue: https://github.com/tikv/pd/issues/1893")
t.Skip("Temporary disable. See issue: https://github.com/tikv/pd/issues/1893")
Copy link
Member

Choose a reason for hiding this comment

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

Should we remove it or fix it? This test is disabled for a long time.

Copy link
Member Author

Choose a reason for hiding this comment

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

I think we can remove or fix it in another PR.

@codecov
Copy link

codecov bot commented Jun 21, 2022

Codecov Report

Merging #5204 (f9f251e) into master (18fbc4a) will decrease coverage by 0.35%.
The diff coverage is 95.00%.

@@            Coverage Diff             @@
##           master    #5204      +/-   ##
==========================================
- Coverage   75.78%   75.42%   -0.36%     
==========================================
  Files         310      310              
  Lines       30678    30674       -4     
==========================================
- Hits        23248    23136     -112     
- Misses       5438     5524      +86     
- Partials     1992     2014      +22     
Flag Coverage Δ
unittests 75.42% <95.00%> (-0.36%) ⬇️

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

Impacted Files Coverage Δ
pkg/testutil/testutil.go 92.59% <ø> (-4.08%) ⬇️
client/testutil/testutil.go 72.72% <87.50%> (+18.18%) ⬆️
pkg/testutil/api_check.go 67.56% <100.00%> (-0.86%) ⬇️
server/api/region.go 69.30% <100.00%> (ø)
tests/pdctl/helper.go 98.21% <100.00%> (ø)
server/schedulers/scatter_range.go 63.57% <0.00%> (-17.22%) ⬇️
server/tso/local_allocator.go 64.86% <0.00%> (-13.52%) ⬇️
...erver/config/service_middleware_persist_options.go 91.66% <0.00%> (-8.34%) ⬇️
server/storage/kv/etcd_kv.go 79.71% <0.00%> (-5.80%) ⬇️
server/id/id.go 76.19% <0.00%> (-4.77%) ⬇️
... and 21 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 18fbc4a...f9f251e. Read the comment docs.

server/api/health_test.go Outdated Show resolved Hide resolved
server/api/health_test.go Outdated Show resolved Hide resolved
server/api/member_test.go Outdated Show resolved Hide resolved
server/api/cluster_test.go Outdated Show resolved Hide resolved
server/api/region_test.go Outdated Show resolved Hide resolved
server/api/region_test.go Outdated Show resolved Hide resolved
server/api/region_test.go Outdated Show resolved Hide resolved
server/api/store_test.go Outdated Show resolved Hide resolved
server/api/store_test.go Outdated Show resolved Hide resolved
server/api/store_test.go Outdated Show resolved Hide resolved
@JmPotato JmPotato requested review from lhy1024 and rleungx June 21, 2022 12:59
@ti-chi-bot ti-chi-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 21, 2022
@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Jun 21, 2022
server/api/cluster_test.go Outdated Show resolved Hide resolved
@ti-chi-bot ti-chi-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 22, 2022
@JmPotato JmPotato requested a review from rleungx June 22, 2022 05:49
@ti-chi-bot ti-chi-bot added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Jun 22, 2022
@JmPotato
Copy link
Member Author

/merge

@ti-chi-bot
Copy link
Member

@JmPotato: 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.

@ti-chi-bot
Copy link
Member

This pull request has been accepted and is ready to merge.

Commit hash: 70493b1

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Jun 22, 2022
@ti-chi-bot
Copy link
Member

@JmPotato: 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.

@ti-chi-bot ti-chi-bot merged commit 3b3ff69 into tikv:master Jun 22, 2022
@JmPotato JmPotato deleted the testify_api branch June 22, 2022 12:03
CabinfeverB pushed a commit to CabinfeverB/pd that referenced this pull request Jul 14, 2022
close tikv#5199

Migrate the server/api tests to testify.

Signed-off-by: JmPotato <[email protected]>

Co-authored-by: Ti Chi Robot <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/api HTTP API. component/testing CI testing. release-note-none Denotes a PR that doesn't merit a release note. status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

migrate test-infra to testify for server/api
5 participants