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

test: add test cases for yurthub #972

Merged
merged 7 commits into from
Aug 30, 2022

Conversation

donychen1134
Copy link
Contributor

What type of PR is this?

/kind enhancement

What this PR does / why we need it:

add unit test cases for yurthub

Which issue(s) this PR fixes:

Fixes #917

Special notes for your reviewer:

Does this PR introduce a user-facing change?


other Note

@openyurt-bot
Copy link
Collaborator

@donychen1134: GitHub didn't allow me to assign the following users: your_reviewer.

Note that only openyurtio members, repo collaborators and people who have commented on this issue/PR can be assigned. Additionally, issues/PRs can only have 10 assignees at the same time.
For more information please see the contributor guide

In response to this:

What type of PR is this?

/kind enhancement

What this PR does / why we need it:

add unit test cases for yurthub

Which issue(s) this PR fixes:

Fixes #917

Special notes for your reviewer:

Does this PR introduce a user-facing change?


other Note

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 kubernetes/test-infra repository.

@openyurt-bot openyurt-bot added size/XL size/XL: 500-999 and removed size/XXL labels Aug 30, 2022
@codecov
Copy link

codecov bot commented Aug 30, 2022

Codecov Report

Merging #972 (09b901b) into master (fd0d3d3) will increase coverage by 0.83%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #972      +/-   ##
==========================================
+ Coverage   44.38%   45.22%   +0.83%     
==========================================
  Files          83       85       +2     
  Lines       11370    11857     +487     
==========================================
+ Hits         5047     5362     +315     
- Misses       5886     6047     +161     
- Partials      437      448      +11     
Flag Coverage Δ
unittests 45.22% <100.00%> (+0.83%) ⬆️

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

Impacted Files Coverage Δ
pkg/yurthub/util/connrotation.go 86.48% <ø> (+86.48%) ⬆️
pkg/yurthub/util/util.go 77.93% <100.00%> (+56.55%) ⬆️
pkg/yurthub/certificate/hubself/cert_mgr.go 20.04% <0.00%> (ø)
pkg/yurthub/certificate/hubself/fake_cert_mgr.go 0.00% <0.00%> (ø)
...troller/nodelifecycle/node_lifecycle_controller.go 56.15% <0.00%> (+0.60%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@rambohe-ch
Copy link
Member

@donychen1134 please fix the golangci-lint errors.

the library import sequence:

  1. golang libs
  2. k8s.io and github libs
  3. openyurt libs

@rambohe-ch
Copy link
Member

/lgtm
/approve

@openyurt-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: donychen1134, rambohe-ch

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

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openyurt-bot openyurt-bot merged commit 44e83a0 into openyurtio:master Aug 30, 2022
@donychen1134 donychen1134 deleted the yurthub-test-cases branch August 30, 2022 08:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved approved lgtm lgtm size/XL size/XL: 500-999
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[unit test] improve unit test coverage for yurthub
4 participants