Skip to content

test: add unit test nodepool lookup image with nil NodeSourceViaImage#494

Open
joekr wants to merge 1 commit intooracle:mainfrom
joekr:add-unit-test
Open

test: add unit test nodepool lookup image with nil NodeSourceViaImage#494
joekr wants to merge 1 commit intooracle:mainfrom
joekr:add-unit-test

Conversation

@joekr
Copy link
Member

@joekr joekr commented Jan 20, 2026

What this PR does / why we need it:
This covers a nil check to make sure we don't regress.

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 #

Checklist

  • All unit tests are passing
  • All PRBlocking tests are passing
  • Code builds successfully

This covers a nil check to make sure we don't regress.
@joekr joekr requested review from HaoyL666 and alcampag January 20, 2026 16:24
@joekr joekr self-assigned this Jan 20, 2026
@joekr joekr added the Tests Pull requests that update project tests label Jan 20, 2026
@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Jan 20, 2026
@joekr
Copy link
Member Author

joekr commented Jan 20, 2026

unit tests

        github.com/oracle/cluster-api-provider-oci              coverage: 0.0% of statements
ok      github.com/oracle/cluster-api-provider-oci/api/v1beta1  41.133s coverage: 23.3% of statements
ok      github.com/oracle/cluster-api-provider-oci/api/v1beta2  2.266s  coverage: 18.0% of statements
ok      github.com/oracle/cluster-api-provider-oci/cloud/config 0.930s  coverage: 86.1% of statements
        github.com/oracle/cluster-api-provider-oci/cloud/metrics                coverage: 0.0% of statements
ok      github.com/oracle/cluster-api-provider-oci/cloud/ociutil        1.455s  coverage: 23.2% of statements
ok      github.com/oracle/cluster-api-provider-oci/cloud/ociutil/ptr    2.701s  coverage: 100.0% of statements
ok      github.com/oracle/cluster-api-provider-oci/cloud/scope  28.997s coverage: 74.8% of statements
        github.com/oracle/cluster-api-provider-oci/cloud/scope/mocks            coverage: 0.0% of statements
        github.com/oracle/cluster-api-provider-oci/cloud/services/base          coverage: 0.0% of statements
        github.com/oracle/cluster-api-provider-oci/cloud/services/base/mock_base                coverage: 0.0% of statements
?       github.com/oracle/cluster-api-provider-oci/cloud/services/compute       [no test files]
        github.com/oracle/cluster-api-provider-oci/cloud/services/compute/mock_compute          coverage: 0.0% of statements
?       github.com/oracle/cluster-api-provider-oci/cloud/services/computemanagement     [no test files]
        github.com/oracle/cluster-api-provider-oci/cloud/services/computemanagement/mock_computemanagement              coverage: 0.0% of statements
?       github.com/oracle/cluster-api-provider-oci/cloud/services/containerengine       [no test files]
        github.com/oracle/cluster-api-provider-oci/cloud/services/containerengine/mock_containerengine          coverage: 0.0% of statements
?       github.com/oracle/cluster-api-provider-oci/cloud/services/identity      [no test files]
        github.com/oracle/cluster-api-provider-oci/cloud/services/identity/mock_identity                coverage: 0.0% of statements
?       github.com/oracle/cluster-api-provider-oci/cloud/services/loadbalancer  [no test files]
        github.com/oracle/cluster-api-provider-oci/cloud/services/loadbalancer/mock_lb          coverage: 0.0% of statements
?       github.com/oracle/cluster-api-provider-oci/cloud/services/networkloadbalancer   [no test files]
        github.com/oracle/cluster-api-provider-oci/cloud/services/networkloadbalancer/mock_nlb          coverage: 0.0% of statements
?       github.com/oracle/cluster-api-provider-oci/cloud/services/vcn   [no test files]
        github.com/oracle/cluster-api-provider-oci/cloud/services/vcn/mock_vcn          coverage: 0.0% of statements
?       github.com/oracle/cluster-api-provider-oci/cloud/services/workrequests  [no test files]
        github.com/oracle/cluster-api-provider-oci/cloud/services/workrequests/mock_workrequests                coverage: 0.0% of statements
ok      github.com/oracle/cluster-api-provider-oci/cloud/util   2.345s  coverage: 60.4% of statements
ok      github.com/oracle/cluster-api-provider-oci/controllers  7.645s  coverage: 59.8% of statements
ok      github.com/oracle/cluster-api-provider-oci/exp/api/v1beta1      13.109s coverage: 15.3% of statements
ok      github.com/oracle/cluster-api-provider-oci/exp/api/v1beta2      0.685s  coverage: 5.8% of statements
ok      github.com/oracle/cluster-api-provider-oci/exp/controllers      3.561s  coverage: 56.3% of statements
        github.com/oracle/cluster-api-provider-oci/feature              coverage: 0.0% of statements
?       github.com/oracle/cluster-api-provider-oci/version      [no test files]

e2e tests

NA since this is only covering a unit test change.

Copy link
Member

@alcampag alcampag left a comment

Choose a reason for hiding this comment

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

Test is looking good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OCA Verified All contributors have signed the Oracle Contributor Agreement. Tests Pull requests that update project tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants