Skip to content

Conversation

@troy0820
Copy link
Member

@troy0820 troy0820 commented Apr 1, 2025

What type of PR is this?
/kind cleanup

What this PR does / why we need it:
Adds testing to the controllers package

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 #3649
Special notes for your reviewer:

TODOs:

  • squashed commits
  • includes documentation
  • adds unit tests
  • cherry-pick candidate

Release note:

None

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Apr 1, 2025
@k8s-ci-robot k8s-ci-robot requested review from Jont828 and marosset April 1, 2025 17:56
@troy0820 troy0820 force-pushed the troy0820/more-test-coverage branch from dfe2dec to 8bd1b4b Compare April 1, 2025 17:59
@codecov
Copy link

codecov bot commented Apr 1, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 52.93%. Comparing base (eb42392) to head (b3873a8).
Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5535      +/-   ##
==========================================
+ Coverage   52.60%   52.93%   +0.32%     
==========================================
  Files         272      272              
  Lines       29485    29485              
==========================================
+ Hits        15511    15607      +96     
+ Misses      13167    13061     -106     
- Partials      807      817      +10     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@troy0820 troy0820 force-pushed the troy0820/more-test-coverage branch from 8bd1b4b to f103e8b Compare April 1, 2025 18:18
@troy0820
Copy link
Member Author

troy0820 commented Apr 1, 2025

/hold

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 1, 2025
@troy0820 troy0820 force-pushed the troy0820/more-test-coverage branch from f103e8b to b3873a8 Compare April 1, 2025 18:32
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Apr 1, 2025
@troy0820
Copy link
Member Author

troy0820 commented Apr 1, 2025

/hold cancel

The test would stop early in the Reconcile method because it had OwnerReferences on it. Now it creates the machinePool resource and gets validated through the test.

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 1, 2025
@nawazkh nawazkh self-assigned this Apr 2, 2025
@nawazkh
Copy link
Member

nawazkh commented Apr 3, 2025

/lgtm
/approve

Hi @troy0820 ! Thank you for adding this. Great start to add more cases.
Are you planning to add more test cases ?

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

LGTM label has been added.

Git tree hash: bd18247c35d2790ed7415a6c26d0d823abe962df

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: nawazkh

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 3, 2025
@troy0820
Copy link
Member Author

troy0820 commented Apr 3, 2025

/lgtm /approve

Hi @troy0820 ! Thank you for adding this. Great start to add more cases. Are you planning to add more test cases ?

Yeah I fell behind but I plan on it.

@k8s-ci-robot k8s-ci-robot merged commit b32f0c6 into kubernetes-sigs:main Apr 3, 2025
28 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.20 milestone Apr 3, 2025
@github-project-automation github-project-automation bot moved this from Todo to Done in CAPZ Planning Apr 3, 2025
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/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants