-
Notifications
You must be signed in to change notification settings - Fork 919
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 node_tree in pkg/util/lifted/scheduler/cache #5422
base: master
Are you sure you want to change the base?
Added unit tests for node_tree in pkg/util/lifted/scheduler/cache #5422
Conversation
Signed-off-by: Yash Pandey <[email protected]>
[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 |
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 #5422 +/- ##
==========================================
- Coverage 30.58% 30.40% -0.18%
==========================================
Files 632 632
Lines 43936 43936
==========================================
- Hits 13438 13360 -78
- Misses 29519 29622 +103
+ Partials 979 954 -25
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
/retest |
@XiShanYongYe-Chang , the pr has passed the ci tests, we can move ahead with the review . Thanks 😊 |
|
||
// 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/node_tree.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, I assume you copied it from this file: https://github.com/kubernetes/kubernetes/blob/release-1.26/pkg/scheduler/internal/cache/node_tree_test.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.
Hey @XiShanYongYe-Chang , i took headers from node_tree itself for which the tests have been written . please see
![Screenshot 2024-08-26 at 9 15 13 AM](https://private-user-images.githubusercontent.com/97700473/361298982-17cb4fa7-c33d-4b32-bb69-fa8a535f9582.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzNzM4ODEsIm5iZiI6MTczOTM3MzU4MSwicGF0aCI6Ii85NzcwMDQ3My8zNjEyOTg5ODItMTdjYjRmYTctYzMzZC00YjMyLWJiNjktZmE4YTUzNWY5NTgyLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEyVDE1MTk0MVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTkzZjNjMTM2YTM2Y2IwN2UyMjc4YTRjMmIwMjk4MzRlMTRjYmNhYjJlMjJlYmFjMGIyNzkzZTU1ZGMxNDI2YzQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.yzpkDQ0UZb4pFi9uSRbTX9CqlN8RsPa7Q7I_4qZeNXg)
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.
I mean you can just copy the test functions you need from this file, no need to add extra tests 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.
@XiShanYongYe-Chang I got your point .Let me revisit this .
/kind feature
This PR introduces unit tests for the node_tree file :
NodeTree
with nodes.NodeTree
.NodeTree
.NodeTree
.Fixes part of #5235
Coverage : 96.5 %
Does this PR introduce a user-facing change?: