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
-
An example workflow for this might look like defining a script in the
Examples
folder of my repository which has one or more calls toInvoke-DscResource
and 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:Get
mode to retrieve current state, ensuring it matches expectationsSet
mode, first ensuring it changes state as expected and the second time to ensure it does nothingTest
mode, 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