test(kubeclient): add IsFinishedPod test cases#5770
test(kubeclient): add IsFinishedPod test cases#5770r0hansaxena wants to merge 2 commits intofluid-cloudnative:masterfrom
Conversation
Signed-off-by: r0hansaxena <rohansxn8772@gmail.com>
|
[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. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Hi @r0hansaxena. Thanks for your PR. I'm waiting for a fluid-cloudnative 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. DetailsInstructions 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/test-infra repository. |
There was a problem hiding this comment.
Code Review
This pull request introduces unit tests for the IsFinishedPod utility function, including checks for nil pods and various pod phases. The review feedback suggests expanding the test coverage to include the Pending and Unknown phases to ensure comprehensive validation of the pod phase logic.
Signed-off-by: r0hansaxena <rohansxn8772@gmail.com>
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #5770 +/- ##
=======================================
Coverage 60.47% 60.48%
=======================================
Files 465 465
Lines 31148 31148
=======================================
+ Hits 18837 18839 +2
+ Misses 10764 10762 -2
Partials 1547 1547 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|



Ⅰ. Describe what this PR does
test(pkg/utils/kubeclient): add unit tests for IsFinishedPod behavior
Ⅱ. Does this pull request fix one issue?
part of #5407
Ⅲ. List the added test cases (unit test/integration test) if any, please explain if no tests are needed.
IsFinishedPod: cover nil input, running pod (false), succeeded pod (true), and failed pod (true)Ⅳ. Describe how to verify it
go test ./pkg/utils/kubeclient -v
Ⅴ. Special notes for reviews