puppetlabs / ruby-pwsh

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

(CAT-1869) - Add configurable dsc_timeout #319

Closed jordanbreen28 closed 1 month ago

jordanbreen28 commented 1 month ago

Summary

This PR introduces a new instance variable @timeout, set to nil by default. A new method set_dsc_timeout is added to handle the setting of @timeout based on the name_hash[:dsc_timeout] value. This timeout specifies the number of seconds the ps_manager will await the dsc invocation to return, before moving on.

The ps_manager.execute method call now includes the timeout value. The error message for when output is nil has been updated to include information about the timeout, if it is set.

Does not affect previous behaviour, therefore is completely backwards compatible with previous versions.

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 1 month ago

Codecov Report

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

Project coverage is 92.10%. Comparing base (b78625a) to head (f7094c8).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #319 +/- ## ========================================== + Coverage 92.01% 92.10% +0.08% ========================================== Files 6 6 Lines 714 722 +8 ========================================== + Hits 657 665 +8 Misses 57 57 ```

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