cluster-api-provider-ibmcloud icon indicating copy to clipboard operation
cluster-api-provider-ibmcloud copied to clipboard

Add UT for powervs_cluster file

Open Karthik-K-N opened this issue 1 year ago • 6 comments

What this PR does / why we need it: This PR adds UT for powervs_cluster.go files

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 # Partially fixes https://github.com/kubernetes-sigs/cluster-api-provider-ibmcloud/issues/1818

Special notes for your reviewer:

/area provider/ibmcloud

  1. Please confirm that if this PR changes any image versions, then that's the sole change this PR makes.

Release note:


Karthik-K-N avatar Aug 06 '24 05:08 Karthik-K-N

Deploy Preview for kubernetes-sigs-cluster-api-ibmcloud ready!

Name Link
Latest commit 859b362139a5f26edc1c19cc4903702d90a4dca5
Latest deploy log https://app.netlify.com/sites/kubernetes-sigs-cluster-api-ibmcloud/deploys/66e7e5ae72749700084c0f57
Deploy Preview https://deploy-preview-1912--kubernetes-sigs-cluster-api-ibmcloud.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

netlify[bot] avatar Aug 06 '24 05:08 netlify[bot]

@dharaneeshvrd @Amulyam24 Please take a look and let me know your opinion, I tried to add UT for individual functions just to get more coverage and cover all the cases, Though few of the cases will be covered in UT for various Recocile functions. Should this be continued this way or cover multiple function in same UT?

Karthik-K-N avatar Aug 06 '24 05:08 Karthik-K-N

I think we can continue this way, if something broke it will help identify the exact func, if we dependant on the Reconcile test, may need some level of debugging. Also if we only test the main Reconcile func, there maybe chances for minor func to get missed.

dharaneeshvrd avatar Aug 06 '24 06:08 dharaneeshvrd

I think we can continue this way, if something broke it will help identify the exact func, if we dependant on the Reconcile test, may need some level of debugging. Also if we only test the main Reconcile func, there maybe chances for minor func to get missed.

Sure thanks for the feedback, Will continue this way

Karthik-K-N avatar Aug 06 '24 06:08 Karthik-K-N

/test pull-cluster-api-provider-ibmcloud-coverage

Karthik-K-N avatar Aug 09 '24 12:08 Karthik-K-N

Updated and rebased with main, PR is ready for review again.

Karthik-K-N avatar Sep 16 '24 08:09 Karthik-K-N

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Karthik-K-N, mkumatag

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 avatar Sep 17 '24 05:09 k8s-ci-robot