puppetlabs / ruby-pwsh

A ruby gem for interacting with PowerShell
MIT License
15 stars 21 forks source link

(CAT-1724) - Fix Provider returned data not matching Type Schema #295

Closed jordanbreen28 closed 4 months ago

jordanbreen28 commented 4 months ago

Summary

Warning: Provider returned data that does not match the Type Schema for `dsc_smbshare[Integrations]`
 Value type mismatch:
    * dsc_path:  (expects a String value, got Undef)

Prior to this PR, we would see the above error returned when dsc would return a nil value for a required string in its data hash. As puppet is not expecting a nil value, but rather a complete or empty string, the error is raised on each puppet run where this occurs. We can fix this by converting all required string attributes values returned in the data hash by DSC from nil to an empty string ('').

Additional Context

Add any additional context about the problem here.

Related Issues (if any)

Mention any related issues or pull requests.

Checklist

codecov[bot] commented 4 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (9203b8d) 91.90% compared to head (e802c9a) 91.98%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #295 +/- ## ========================================== + Coverage 91.90% 91.98% +0.07% ========================================== Files 6 6 Lines 704 711 +7 ========================================== + Hits 647 654 +7 Misses 57 57 ```

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