-
Notifications
You must be signed in to change notification settings - Fork 892
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
Added unit tests for snapshot in pkg/util/lifted/scheduler/cache #5424
base: master
Are you sure you want to change the base?
Added unit tests for snapshot in pkg/util/lifted/scheduler/cache #5424
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ 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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
/assign |
126f084
to
fcba169
Compare
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 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 |
Signed-off-by: Yash Pandey <yash.pandey@agoda.com>
fcba169
to
ae26bfe
Compare
@XiShanYongYe-Chang please help review this pr , i have already fixed the headers data |
// This code is directly lifted from the Kubernetes codebase in order to avoid relying on the k8s.io/kubernetes package. | ||
// For reference: | ||
// https://github.com/kubernetes/kubernetes/blob/release-1.26/pkg/scheduler/internal/cache/snapshot.go |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @yashpandey06 Is the following test code copied directly from this file? I looked at it and it doesn't seem to be directly copied. You can copy the test functions from the https://github.com/kubernetes/kubernetes/blob/release-1.26/pkg/scheduler/internal/cache/snapshot_test.go file without having to add the test code yourself.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the review , I am working on it.
What type of PR is this?
/kind feature
Description:
This PR adds unit tests for the
Snapshot
functionality in thecache
package.Key Changes:
NewEmptySnapshot
,NewSnapshot
, and variousSnapshot
methods likeGet
,List
, andIsPVCUsedByPods
.Fixes part of [lfx-mentorship-2024-September-November] Enhance Karmada controller-manager and schedule testing coverage #5235
Does this PR introduce a user-facing change?: