In Part 1 of this blog servies we created and ran a PowerShell script on our local computer, and then turned that into a Bolt Task. We then packaged the module so others could use the task. In Part 2, we are going to look at how to test the PowerShell script.
So the most obvious question is, why would I want to test my Puppet Tasks? When we first start writing Tasks, testing isn't at the front our minds. However, if you stop and look at the actions we took in Part 1, you can see we were actually just manually testing our code.
For example, when we wanted to add Task metadata, we did the following: