Skip to content
This repository has been archived by the owner on Nov 2, 2023. It is now read-only.

add nodepool controoller unit test #89

Merged
merged 1 commit into from
Aug 8, 2022
Merged

Conversation

luc99hen
Copy link
Member

@luc99hen luc99hen commented Aug 3, 2022

What type of PR is this?

Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespace from that line:
/kind bug
/kind documentation

/kind enhancement

/kind good-first-issue
/kind feature
/kind question
/kind design
/sig ai
/sig iot
/sig network
/sig storage
/sig storage

What this PR does / why we need it:

Which issue(s) this PR fixes:

Fixes # #73

Special notes for your reviewer:

This PR add unit tests for nodepool controller and some related utils function. To improve the test coverage, some controller code are refactored for better testability.

Does this PR introduce a user-facing change?

no

other Note

@openyurt-bot
Copy link
Collaborator

@luc99hen: 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?

Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespace from that line:
/kind bug
/kind documentation
/kind enhancement
/kind good-first-issue
/kind feature
/kind question
/kind design
/sig ai
/sig iot
/sig network
/sig storage
/sig storage

What this PR does / why we need it:

Which issue(s) this PR fixes:

Fixes # #73

Special notes for your reviewer:

This PR add unit tests for nodepool controller and some related utils function. To improve the test coverage, some controller code are refactored for better testability.

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 the kind/enhancement kind/enhancement label Aug 3, 2022
@openyurt-bot openyurt-bot requested review from Fei-Guo and zzguang August 3, 2022 08:50
@luc99hen
Copy link
Member Author

luc99hen commented Aug 3, 2022

/assign @kadisi

@codecov
Copy link

codecov bot commented Aug 3, 2022

Codecov Report

Merging #89 (d09f5c4) into master (fe8491b) will increase coverage by 7.57%.
The diff coverage is 72.00%.

@@            Coverage Diff             @@
##           master      #89      +/-   ##
==========================================
+ Coverage    7.78%   15.36%   +7.57%     
==========================================
  Files          17       18       +1     
  Lines        1901     1953      +52     
==========================================
+ Hits          148      300     +152     
+ Misses       1724     1617     -107     
- Partials       29       36       +7     
Flag Coverage Δ
unittests 15.36% <72.00%> (+7.57%) ⬆️

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

Impacted Files Coverage Δ
...r/controller/nodepool/nodepool_enqueue_handlers.go 0.00% <ø> (ø)
...manager/controller/nodepool/nodepool_controller.go 56.41% <71.62%> (+39.58%) ⬆️
...g/yurtappmanager/util/gate/custom_resource_gate.go 70.83% <100.00%> (ø)

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

@openyurt-bot openyurt-bot added the approved approved label Aug 8, 2022
@rambohe-ch
Copy link
Member

/lgtm
/approve

@openyurt-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: luc99hen, 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

@rambohe-ch rambohe-ch merged commit ed03bba into openyurtio:master Aug 8, 2022
@luc99hen luc99hen deleted the np_ut branch August 9, 2022 02:40
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants