Skip to content

Add unit tests for CloneSet creation logic#148

Open
GautamBytes wants to merge 1 commit intoopenkruise:masterfrom
GautamBytes:add-cloneset-creation-tests
Open

Add unit tests for CloneSet creation logic#148
GautamBytes wants to merge 1 commit intoopenkruise:masterfrom
GautamBytes:add-cloneset-creation-tests

Conversation

@GautamBytes
Copy link
Copy Markdown
Contributor

This PR introduces unit tests for the resource creation logic located in pkg/creation/cloneset/cloneset_creation.go.

Reason for Change:
To ensure the reliability and correctness of the logic that converts a Deployment into a CloneSet, and to prevent future regressions.

Key Changes:
A new test file, cloneset_creation_test.go, has been added.
It utilizes the fake.Client from controller-runtime to provide a mock Kubernetes client, isolating the logic from a live API server.

Signed-off-by: GautamBytes <manchandanigautam@gmail.com>
@kruise-bot kruise-bot requested review from FillZpp and furykerry July 12, 2025 11:46
@kruise-bot
Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign fillzpp for approval by writing /assign @fillzpp in a comment. For more information see:The Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants