Closed RobBiddle closed 2 years ago
@danielboth Is there anything else I need to do for this PR to be accepted? Any questions about the issue https://github.com/dsccommunity/xRemoteDesktopSessionHost/issues/91 this PR resolves?
Hey Rob, are you up for writing a test for this PR as well? For example, you could write a test where the call to Get-RDSessionCollection returns 2 results and then ensure that the correct one is picked from that result. Other than that, PR looks good to me.
@danielboth Not sure I follow, that's essentially all I did, selecting the appropriate result if there's more than one Collection.
if ($Collection.count -gt 1) { $Collection = $Collection | Where-Object CollectionName -eq $CollectionName }
Are you wanting an additional test case in https://github.com/dsccommunity/xRemoteDesktopSessionHost/blob/95494e5c06dcebf0241244b61403a00cee3b2d2d/tests/Unit/MSFT_xRDSessionCollection.tests.ps1 with mock data containing more than one Collection?
Modified the Mock return to include two Collections.
I'm not sure if that's sufficient or if there needs to be another Should
statement to check test return value from Get-TargetResource. I'm thinking that might be enough of a test since it was erroring out previously.
@danielboth is there anything I can help with to move this PR along? Two of my customers have the same issue, and were able to validate the solution that was proposed here.
MSFT_xRDSessionCollection: Workaround for bug in Windows Server 2019
Pull Request (PR) description
Workaround for Get-RDSessionCollection bug in Windows Server 2019.
This Pull Request (PR) fixes the following issues
Fixes #91
Task list
This change is