Skip to content
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 test for state_test.go #9789

Closed

Conversation

abdurrehman107
Copy link
Contributor

What this PR does / why we need it:
This PR adds tests for the new ClusterClass MachinePool implementation for the internal/controllers/topology/cluster/scope/state_test.go
Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes part of #5991

/area testing

@k8s-ci-robot k8s-ci-robot added area/testing Issues or PRs related to testing cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Nov 28, 2023
@k8s-ci-robot
Copy link
Contributor

Hi @razashahid107. Thanks for your PR.

I'm waiting for a kubernetes-sigs 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.

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.

@k8s-ci-robot
Copy link
Contributor

[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 justinsb for approval. For more information see the Kubernetes Code Review Process.

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@abdurrehman107
Copy link
Contributor Author

@willie-yao I'd really appreciate if you review the PR

@willie-yao
Copy link
Contributor

@razashahid107 Will take a look asap. Thanks for your PR!

@willie-yao
Copy link
Contributor

/assign

Copy link
Contributor

@willie-yao willie-yao left a comment

Choose a reason for hiding this comment

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

Wow awesome work @razashahid107! This looks great to me 🚀
/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 29, 2023
@willie-yao
Copy link
Contributor

@razashahid107 Make sure to add the 🌱 emoji in the PR title

@willie-yao
Copy link
Contributor

Hmm looks like the unit test job didn't run before, will remove the lgtm until those are fixed
/lgtm cancel

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 29, 2023
@abdurrehman107 abdurrehman107 changed the title Added test for state_test.go 🌱 Added test for state_test.go Nov 30, 2023
@enxebre
Copy link
Member

enxebre commented Nov 30, 2023

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Nov 30, 2023
@k8s-ci-robot
Copy link
Contributor

@razashahid107: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-cluster-api-test-main 8a391e1 link true /test pull-cluster-api-test-main
pull-cluster-api-verify-main 8a391e1 link true /test pull-cluster-api-verify-main

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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. I understand the commands that are listed here.

@abdurrehman107
Copy link
Contributor Author

The tests I've written fail when the IsUpgrading() function fails to enter the for loop towards the end of it (debugged the code). This is because there exist no NodeRefs in the tests I create. I hence tried to add Status.NodeRefs in the Build() function for MachinePoolBuilder. The test now fails to run with a pointer dereferencing issue.

I've committed the latest changes (I've kept the Status.NodeRefs part in the PR, I'd appreciate if anyone can review it and correct where I am going wrong). Am I not supposed to make changes in the MachinePoolBuilder Build() function?

@willie-yao
Copy link
Contributor

/close in favor of #10052. @razashahid107 I've continued your work as requested and added you as a code author. Thanks for all your great work on this! 🚀

@sbueringer
Copy link
Member

/close

See above

@k8s-ci-robot
Copy link
Contributor

@sbueringer: Closed this PR.

In response to this:

/close

See above

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/testing Issues or PRs related to testing cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants