openyurtio / yurt-app-manager

The workload controller manager from NodePool level in OpenYurt cluster
Apache License 2.0
6 stars 1 forks source link

improve the coverage of yurtappset #113

Closed River-sh closed 2 years ago

River-sh commented 2 years ago

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 enhancement

What this PR does / why we need it:

This PR enriches unit testing of the Yurtappset controller and improves test coverage.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?

other Note

openyurt-bot commented 2 years ago

@River-sh: 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](https://github.com/openyurtio/yurt-app-manager/pull/113): > > > >#### 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 enhancement > >#### What this PR does / why we need it: >This PR enriches unit testing of the Yurtappset controller and improves test coverage. > >#### Which issue(s) this PR fixes: > >Fixes # > >#### Special notes for your reviewer: > > > >#### Does this PR introduce a user-facing change? > >```release-note > >``` > >#### other Note > > Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
openyurt-bot commented 2 years ago

Welcome @River-sh! It looks like this is your first PR to openyurtio/yurt-app-manager 🎉

codecov[bot] commented 2 years ago

Codecov Report

Merging #113 (1550680) into master (0e8bf4d) will increase coverage by 10.88%. The diff coverage is n/a.

@@             Coverage Diff             @@
##           master     #113       +/-   ##
===========================================
+ Coverage   26.42%   37.31%   +10.88%     
===========================================
  Files          42       42               
  Lines        4776     4776               
===========================================
+ Hits         1262     1782      +520     
+ Misses       3344     2754      -590     
- Partials      170      240       +70     
Flag Coverage Δ
unittests 37.31% <ø> (+10.88%) :arrow_up:

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

Impacted Files Coverage Δ
...manager/controller/nodepool/nodepool_controller.go 56.75% <0.00%> (-1.02%) :arrow_down:
...ager/controller/yurtappset/adapter/adapter_util.go 65.62% <0.00%> (+40.62%) :arrow_up:
...ntroller/yurtappset/adapter/statefulset_adapter.go 41.87% <0.00%> (+41.87%) :arrow_up:
...ger/controller/yurtappset/yurtappset_controller.go 48.16% <0.00%> (+47.24%) :arrow_up:
...manager/controller/yurtappset/yurtappset_update.go 48.27% <0.00%> (+48.27%) :arrow_up:
...g/yurtappmanager/controller/yurtappset/revision.go 49.21% <0.00%> (+49.21%) :arrow_up:
...ntroller/yurtappset/yurtappset_controller_utils.go 60.00% <0.00%> (+60.00%) :arrow_up:
...rtappmanager/controller/yurtappset/pool_control.go 60.74% <0.00%> (+60.74%) :arrow_up:
...ontroller/yurtappset/adapter/deployment_adapter.go 66.66% <0.00%> (+66.66%) :arrow_up:

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

rambohe-ch commented 2 years ago

/lgtm /approve

openyurt-bot commented 2 years ago

[APPROVALNOTIFIER] This PR is APPROVED

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

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: - ~~[OWNERS](https://github.com/openyurtio/yurt-app-manager/blob/master/OWNERS)~~ [rambohe-ch] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
rambohe-ch commented 2 years ago

Fixes #74