cluster-api-provider-aws
cluster-api-provider-aws copied to clipboard
🌱 Add basic unit test for EKS `AWSManagedControlPlaneReconciler`
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.
This meant to fix a few small things along the way, such as version parsing which ignored errors or panicked until now.
Checklist:
- [x] squashed commits
- [ ] includes documentation
- [x] includes emojis
- [x] adds unit tests
- [ ] adds or updates e2e tests
Release note:
NONE
/test pull-cluster-api-provider-aws-build-docker
/test pull-cluster-api-provider-aws-e2e-eks
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.
@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.
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
[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
- ~~OWNERS~~ [richardcase]
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
@cnmcavoy @faiq do you have a chance to review this? Thanks 😉
/lgtm