Skip to content

test(kubeclient): add IsFinishedPod test cases#5770

Merged
cheyang merged 2 commits intofluid-cloudnative:masterfrom
r0hansaxena:pod-finished-state-tests
Apr 9, 2026
Merged

test(kubeclient): add IsFinishedPod test cases#5770
cheyang merged 2 commits intofluid-cloudnative:masterfrom
r0hansaxena:pod-finished-state-tests

Conversation

@r0hansaxena
Copy link
Copy Markdown
Contributor

@r0hansaxena r0hansaxena commented Apr 7, 2026

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

Signed-off-by: r0hansaxena <rohansxn8772@gmail.com>
@fluid-e2e-bot
Copy link
Copy Markdown

fluid-e2e-bot Bot commented Apr 7, 2026

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 /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

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/test-infra repository.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread pkg/utils/kubeclient/pod_test.go
Signed-off-by: r0hansaxena <rohansxn8772@gmail.com>
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Apr 7, 2026

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 8, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 60.48%. Comparing base (9fe6aad) to head (6d0b9af).
⚠️ Report is 2 commits behind head on master.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Collaborator

@cheyang cheyang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
/approve

@fluid-e2e-bot
Copy link
Copy Markdown

fluid-e2e-bot Bot commented Apr 9, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cheyang

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details 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

@cheyang cheyang merged commit d3801d5 into fluid-cloudnative:master Apr 9, 2026
12 of 18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants