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

🌱 Add basic unit test for EKS AWSManagedControlPlaneReconciler #4808

Merged
merged 1 commit into from
Apr 15, 2024

Conversation

AndiDog
Copy link
Contributor

@AndiDog AndiDog commented Feb 22, 2024

What type of PR is this?

/kind support

What this PR does / why we need it:

The EKS reconciliation was not covered in unit tests at all, making it hard to contribute changes with confidence. So like for AWSCluster reconciliation, I added a similar type of test that checks the basic creation of a cluster and the expected AWS API calls.

For now, the only test is for AWSManagedControlPlane creation with managed VPC, but more can be added more easily after this PR, since I'm making the controller testable.

This meant to fix a few small things along the way, such as version parsing which ignored errors or panicked until now.

Checklist:

  • squashed commits
  • includes documentation
  • includes emojis
  • adds unit tests
  • adds or updates e2e tests

Release note:

NONE

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/support Categorizes issue or PR as a support question. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-priority labels Feb 22, 2024
@k8s-ci-robot k8s-ci-robot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Feb 22, 2024
@AndiDog
Copy link
Contributor Author

AndiDog commented Mar 5, 2024

/test pull-cluster-api-provider-aws-build-docker

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

AndiDog commented Mar 26, 2024

/test pull-cluster-api-provider-aws-e2e-eks

@Ankitasw
Copy link
Member

This is really helpful @AndiDog, could you please add what all tests have you covered as part of description? It would be helpful in the review.

@AndiDog
Copy link
Contributor Author

AndiDog commented Apr 11, 2024

@Ankitasw Added some more description, but really it's "just" about making the controller testable and adding a basic test AWSManagedControlPlane creation with managed VPC. I didn't want to blow up the PR size by adding much more. Adding more tests will be much easier after this.

@richardcase
Copy link
Member

Thanks @AndiDog. This is really helpful and as a base it will enable us to improve our test coverage on the EKS side. From my side:

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: richardcase

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 Apr 12, 2024
@AndiDog
Copy link
Contributor Author

AndiDog commented Apr 15, 2024

@cnmcavoy @faiq do you have a chance to review this? Thanks 😉

@cnmcavoy
Copy link
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 15, 2024
@k8s-ci-robot k8s-ci-robot merged commit c23e955 into kubernetes-sigs:main Apr 15, 2024
23 checks passed
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/support Categorizes issue or PR as a support question. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-priority release-note-none Denotes a PR that doesn't merit a release note. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants