karmada
karmada copied to clipboard
Added unit tests for snapshot in pkg/util/lifted/scheduler/cache
What type of PR is this?
/kind feature
Description:
This PR adds unit tests for the Snapshot functionality in the cache package.
Key Changes:
- Added tests for
NewEmptySnapshot,NewSnapshot, and variousSnapshotmethods likeGet,List, andIsPVCUsedByPods. - Tests cover scenarios like empty snapshots, node and PVC tracking, and error handling for non-existent nodes. Fixes part of #5235
Does this PR introduce a user-facing change?:
NONE
:warning: Please install the to ensure uploads and comments are reliably processed by Codecov.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 30.90%. Comparing base (
2537912) to head (ae26bfe).
:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@ Coverage Diff @@
## master #5424 +/- ##
==========================================
- Coverage 31.05% 30.90% -0.16%
==========================================
Files 639 639
Lines 44313 44313
==========================================
- Hits 13763 13696 -67
- Misses 29556 29642 +86
+ Partials 994 975 -19
| Flag | Coverage Δ | |
|---|---|---|
| unittests | 30.90% <ø> (-0.16%) |
:arrow_down: |
Flags with carried forward coverage won't be shown. Click here to find out more.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
/assign
[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: Once this PR has been reviewed and has the lgtm label, please ask for approval from xishanyongye-chang. For more information see the Kubernetes Code Review Process.
The full list of commands accepted by this bot can be found here.
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
@XiShanYongYe-Chang please help review this pr , i have already fixed the headers data
As it lack of activity, we can close it first. If you are still working on it, please feel free to reopen it at any time. /close
@XiShanYongYe-Chang: Closed this PR.
In response to this:
As it lack of activity, we can close it first. If you are still working on it, please feel free to reopen it at any time. /close
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-sigs/prow repository.