-
Notifications
You must be signed in to change notification settings - Fork 40.9k
test: add test coverage for pkg/kubelet/status #132857
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
base: master
Are you sure you want to change the base?
Conversation
This issue is currently awaiting triage. If a SIG or subproject determines this is a relevant issue, they will accept it by applying the The 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. |
Hi @ylink-lfs. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
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.
Pull Request Overview
This PR increases test coverage in the pkg/kubelet/status
package by adding two new sets of unit tests:
- A test ensuring pods in non-terminal phases with a deletion timestamp do not trigger deletion.
- A table-driven test for the
NeedToReconcilePodReadiness
helper covering various readiness-gate scenarios.
Comments suppressed due to low confidence (1)
pkg/kubelet/status/status_manager_test.go:1507
- [nitpick] The variable
logger
actually holds acontext.Context
; consider renaming it toctx
(e.g.,ctx, _ := ktesting.NewTestContext(t)
) to improve clarity.
logger, _ := ktesting.NewTestContext(t)
55188cb
to
353e54d
Compare
/assign mrunalp |
/ok-to-test |
353e54d
to
5b06723
Compare
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: ylink-lfs 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 |
5b06723
to
fcab848
Compare
fcab848
to
11d19c1
Compare
What type of PR is this?
/kind cleanup
/sig node
/priority important-longterm
What this PR does / why we need it:
Test coverage increase for kubelet package
Which issue(s) this PR is related to:
Part of #109717
Special notes for your reviewer:
Before the commits were made, the coverage of
pkg/kubelet/types
module was 86.8%:This commit increased the coverage to 89.5%:
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:
None