The resource wrongly try to enforce EndpointHostName even though it is not part of the configuration. When not passed in the configuration EndpointHostname will be matched against empty string which will always be wrong.
Verbose logs
Not available
DSC configuration
Found when converting unit test to Pester 5.
Suggested solution
Evaluate that the the parameter EndpointHostname was passed in the configuration.
Problem description
The resource wrongly try to enforce
EndpointHostName
even though it is not part of the configuration. When not passed in the configurationEndpointHostname
will be matched against empty string which will always be wrong.Verbose logs
DSC configuration
Suggested solution
Evaluate that the the parameter
EndpointHostname
was passed in the configuration.https://github.com/dsccommunity/SqlServerDsc/blob/d5692e24b3b6303556729639cbb0b2a6763198af/source/DSCResources/DSC_SqlAGReplica/DSC_SqlAGReplica.psm1#L730
SQL Server edition and version
SQL Server PowerShell modules
Operating system
PowerShell version
SqlServerDsc version