karmada icon indicating copy to clipboard operation
karmada copied to clipboard

Added unit tests for snapshot in pkg/util/lifted/scheduler/cache

Open yashpandey06 opened this issue 1 year ago • 4 comments

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 various Snapshot methods like Get, List, and IsPVCUsedByPods.
  • 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

yashpandey06 avatar Aug 26 '24 03:08 yashpandey06

:warning: Please install the 'codecov app svg image' 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.

codecov-commenter avatar Aug 26 '24 04:08 codecov-commenter

/assign

XiShanYongYe-Chang avatar Aug 26 '24 06:08 XiShanYongYe-Chang

[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.

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

karmada-bot avatar Aug 27 '24 04:08 karmada-bot

@XiShanYongYe-Chang please help review this pr , i have already fixed the headers data

yashpandey06 avatar Aug 27 '24 06:08 yashpandey06

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 avatar Mar 29 '25 07:03 XiShanYongYe-Chang

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

karmada-bot avatar Mar 29 '25 07:03 karmada-bot