dsccommunity / StorageDsc

DSC resource module is used to manage storage on Windows Servers.
https://dsccommunity.org
MIT License
66 stars 51 forks source link

Make Supporting Helper Functions Public so that they can be tested/autodoced #287

Open PlagueHO opened 5 months ago

PlagueHO commented 5 months ago

We could add the functions (e.g. Test-OpticalDiskCanBeManaged) that is part of the resource as public commands so it possible to use them standalone. But that can be a future PR.

I started using that pattern in SqlServerDsc and will do that in future PRs in other modules as well. See private and public functions in SqlServerDsc, and I also recently fixed so they are auto-documented in the wiki (using DscResource.DocGenerator), see the "tree" (that is also automatically built) to the right in the SqlServerDsc wiki. Using this pattern it so much simpler testing the code practically as I can use the commands to verify the functionality without the need to run LCM or Invoke-DscResource, then adding them to a DSC resource is just another layer.