Define and provide a harness for testable DSC Resource examples #95
michaeltlombardi
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
An example workflow for this might look like defining a script in the
Examplesfolder of my repository which has one or more calls toInvoke-DscResourceand uses comment-based help in the script file. When a PR is made against the repository, a matrix is spun up, one per script file and supported operating system, and verifies:Getmode to retrieve current state, ensuring it matches expectationsSetmode, first ensuring it changes state as expected and the second time to ensure it does nothingTestmode, ensuring it reports that the resource is in the desired stateAdvanced considerations about spin-up/down/reset/rerun of the harness are opportunities for further improvement but secondary to the primary usefulness of having testable examples as documentation.
Beta Was this translation helpful? Give feedback.
All reactions