BREAKING: `WSManListener`: Convert to a Class Resource
Pull Request (PR) description
Convert WSManListener to a class resource
Rename parameter DN to BaseDN
This Pull Request (PR) fixes the following issues
Contributes to #98 Fixes #89
Task list
- [x] Added an entry to the change log under the Unreleased section of the file CHANGELOG.md. Entry should say what was changed and how that affects users (if applicable), and reference the issue being resolved (if applicable).
- [x] Resource documentation added/updated in README.md.
- [x] Resource parameter descriptions added/updated in README.md, schema.mof and comment-based help.
- [x] Comment-based help added/updated.
- [x] Localization strings added/updated in all localization files as appropriate.
- [x] Examples appropriately added/updated.
- [x] Unit tests added/updated. See DSC Community Testing Guidelines.
- [x] Integration tests added/updated (where possible). See DSC Community Testing Guidelines.
- [x] New/changed code adheres to DSC Community Style Guidelines.
Codecov Report
Attention: Patch coverage is 99.23077% with 1 line in your changes missing coverage. Please review.
Project coverage is 99%. Comparing base (
6f4163d) to head (3d7e440). Report is 2 commits behind head on main.
| Files with missing lines | Patch % | Lines |
|---|---|---|
| source/Private/Find-Certificate.ps1 | 97% | 1 Missing :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## main #106 +/- ##
====================================
+ Coverage 88% 99% +11%
====================================
Files 3 7 +4
Lines 310 200 -110
====================================
- Hits 274 199 -75
+ Misses 36 1 -35
| Files with missing lines | Coverage Δ | |
|---|---|---|
| source/Classes/020.WSManListener.ps1 | 100% <100%> (ø) |
|
| .../DSCResources/DSC_WSManConfig/DSC_WSManConfig.psm1 | 100% <ø> (ø) |
|
| ...DSC_WSManServiceConfig/DSC_WSManServiceConfig.psm1 | 100% <ø> (ø) |
|
| source/Private/Get-DefaultPort.ps1 | 100% <100%> (ø) |
|
| source/Private/Get-Listener.ps1 | 100% <100%> (ø) |
|
| source/prefix.ps1 | 100% <100%> (ø) |
|
| source/Private/Find-Certificate.ps1 | 97% <97%> (ø) |
@PlagueHO, finally ready to go.
@johlju, is this something you can also look at please?
Will do, later in the week or weekend. 😊
Justa few comments. Heads up, there might be some issues with PowerShell Gallery - i trying to release a version before merging this breaking change, but it fails with random errors (re-run 3 times, failing on different module name each time): https://dev.azure.com/dsccommunity/WsManDsc/_build/results?buildId=9921&view=logs&j=d7ffe41d-f206-59ed-99c3-e44ba5bb1f40&t=e2ebcab5-cb94-5995-9070-3fa60620c9c4
@johlju, this is ready for another review.
I reverted back to using an Enum on one of the DSC properties. It cannot be nullable, but if the Enum values begin at 1, when the class is initialized without a value it will be 0.
This really only impacts optional properties and especially when there is an assert check. I added some logic to test if any of the properties are Enums and value = 0 which means it was not set by the user and can be ignored.
It seems to work, I have a feeling there is something I've not thought about though...
I will try to get on this next, as soon as I can. But there is a lot at regular work this week.
That's fine. There is actually something I wanted to discuss/propose around DscResource.Base to enable the use of Enums for optional properties. I'll create a discussion in the correct repo.
@johlju this is ready for review again. Uses new base class functionality and preview DocGenerator which has the class enhancements.
/azp run
Azure Pipelines successfully started running 1 pipeline(s).
@dan-hughes this looks good too me, but was a long time since I was on this. Do you see anything to add/change before merge? Kicked off the tests again just to make sure merge will work.
Not that I know of. I will raise as a separate PR if needs be.