NetworkingDsc
NetworkingDsc copied to clipboard
Trim the line before splitting parts in HostsFile
Pull Request (PR) description
Trim the line before splitting parts in Get-HostEntry.
This Pull Request (PR) fixes the following issues
- Fixes #526
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.
The build pipeline is failing because the pipeline files haven't been updated in sometime and using a Linux build agent (which fails). I'll update the pipeline to the latest version so that you can rebase.
@PlagueHO If you point me to an example, I can probably help.
Updated pipeline files has been merged thanks to @PlagueHO. This PR can be rebased.
Sorry @cdhunt - the pipeline fix was already waiting for review (https://github.com/dsccommunity/NetworkingDsc/pull/529). But there will be other DSC resource repos that need similar updates... so if you're inclined and have the time, we're always happy to have help doing the chores :grinning:
I've completed:
- NetworkingDsc
- ComputerManagementDsc
- StorageDsc
PR needs review:
- DFSDsc
Still need to complete:
- xPSDesiredStateConfiguration
- ADCertificateServicesDsc
- CertificateDsc
- iSCSIDsc
- FileContentDsc
- WSManDsc
- FSRMDsc
@johlju - I'll probably sit down and do some of these tonight. Will raise issues and assign them to myself as I go.
It looks like the unit test gets hung up on Context Ensure is Present and the Firewall rule does exist but has a different Direction. I thought it was just my system, but the same is happing in AzDo. I haven't look at the source yet.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 97%. Comparing base (
e8b5edc) to head (43ce5ae).
Additional details and impacted files
@@ Coverage Diff @@
## main #527 +/- ##
===================================
Coverage 97% 97%
===================================
Files 28 28
Lines 2078 2078
===================================
Hits 2028 2028
Misses 50 50
| Files | Coverage Δ | |
|---|---|---|
| ...urce/DSCResources/DSC_HostsFile/DSC_HostsFile.psm1 | 97% <100%> (ø) |
What do you think the desired/expected behavior would be? Should it support intentional whitespace or enforce an exact format? You could use File.Contents if you want custom formatting.
@PlagueHO Can you rerun the failed integration test job?
@PlagueHO Can you rerun the failed integration test job?
I helped with that.
I've added additional tests which I believe cover at least one edge case and better cover the scenario I'm trying to fix.