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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃尡 Add unit tests for MachinePools in topology/scope package #10052

Merged
merged 1 commit into from
Mar 19, 2024

Conversation

willie-yao
Copy link
Contributor

What this PR does / why we need it:
This PR adds unit tests for MachinePool workers in ClusterClass for the following files:

  • internal/controllers/topology/cluster/scope/state_test.go
  • internal/controllers/topology/cluster/scope/upgradetracker_test.go
  • internal/topology/check/compatibility_test.go

Big thanks to @razashahid107 for most of the work in 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 #10028

/area clusterclass

@k8s-ci-robot k8s-ci-robot added area/clusterclass Issues or PRs related to clusterclass cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jan 24, 2024
@k8s-ci-robot k8s-ci-robot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Jan 24, 2024
@willie-yao willie-yao force-pushed the cc-scope-tests branch 3 times, most recently from 6688e74 to 346dbf3 Compare January 24, 2024 20:08
@abdurrehman107
Copy link
Contributor

Thank you for the support @willie-yao. Looking forward to learning so much.

@@ -155,3 +157,147 @@ func TestUpgrading(t *testing.T) {
g.Expect(got).To(BeComparableTo(want))
})
}

func TestMPIsUpgrading(t *testing.T) {
Copy link
Member

@sbueringer sbueringer Feb 9, 2024

Choose a reason for hiding this comment

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

Sorry didn't get around to review your PRs yet (and I'm soon on PTO).

Just fyi for now. This will be also added in this PR (and moved around): https://github.com/kubernetes-sigs/cluster-api/pull/10063/files

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No problem, thanks for letting me know!!

Copy link
Member

@chrischdi chrischdi Feb 20, 2024

Choose a reason for hiding this comment

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

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 20, 2024
@k8s-ci-robot
Copy link
Contributor

PR needs rebase.

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 k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 21, 2024
@willie-yao willie-yao force-pushed the cc-scope-tests branch 2 times, most recently from 8cbfdaa to 9541409 Compare February 26, 2024 20:55
@willie-yao
Copy link
Contributor Author

@sbueringer @chrischdi I updated the PR to account for the moved test, PTAL!

Copy link
Member

@chrischdi chrischdi left a comment

Choose a reason for hiding this comment

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

One last nit

internal/topology/check/compatibility_test.go Outdated Show resolved Hide resolved
@chrischdi
Copy link
Member

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 28, 2024
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: fc196e8301d175db4fd0911b8e8e6aa169c797b9

@fabriziopandini
Copy link
Member

Thanks for adding those tests!
/lgtm
/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: fabriziopandini

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

The pull request process is described 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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 19, 2024
@k8s-ci-robot k8s-ci-robot merged commit 9949d93 into kubernetes-sigs:main Mar 19, 2024
20 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.7 milestone Mar 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/clusterclass Issues or PRs related to clusterclass cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants