vmware / terraform-provider-tanzu-mission-control

Terraform provider to manage resources of Tanzu Mission Control
Mozilla Public License 2.0
38 stars 31 forks source link

Fix the NPE issue in provisioner resource/datasource #373

Closed ramya-bangera closed 7 months ago

ramya-bangera commented 7 months ago
  1. What this PR does / why we need it: Added the fix to return without trying to parse the nil response in case of any error.

  2. Which issue(s) this PR fixes Internal Jira

  3. Additional information

  4. Special notes for your reviewer

    Screenshot 2024-01-19 at 12 10 31 PM
<testsuite name="github.com/vmware/terraform-provider-tanzu-mission-control/internal/resources/provisioner" tests="2" failures="0" errors="0" id="230" hostname="sc2-10-187-102-46.nimbus.eng.vmware.com" time="45.050" timestamp="2024-01-19T07:26:16Z">
        <properties>
            <property name="coverage.statements.pct" value="62.80"></property>
        </properties>
        <testcase name="TestAcceptanceForProvisionerDataSource" classname="github.com/vmware/terraform-provider-tanzu-mission-control/internal/resources/provisioner" time="15.960">
            <system-out><![CDATA[    provisioner_data_source_test.go:43: provisioner datasource acceptance test complete!]]></system-out>
        </testcase>
        <testcase name="TestAcceptanceForProvisionerResource" classname="github.com/vmware/terraform-provider-tanzu-mission-control/internal/resources/provisioner" time="29.080">
            <system-out><![CDATA[    provisioner_resource_test.go:86: provisioner resource acceptance test complete!]]></system-out>
        </testcase>
    </testsuite>
codecov-commenter commented 7 months ago

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (ee9e28b) 25.31% compared to head (25c9eca) 25.29%.

Files Patch % Lines
...l/resources/provisioner/data_source_provisioner.go 0.00% 2 Missing :warning:
...rnal/resources/provisioner/resource_provisioner.go 0.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #373 +/- ## ========================================== - Coverage 25.31% 25.29% -0.03% ========================================== Files 192 192 Lines 16665 16668 +3 ========================================== - Hits 4219 4216 -3 - Misses 12229 12234 +5 - Partials 217 218 +1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.