You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Details of the scenario you tried and the problem that is occurring:
When running the unit tests for the resource SqlServiceAccount, the tests fail becuase it cannot find a registry key. This is probably due to that a mock is missing.
Get-ChildItem : Cannot find path 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\Services' because it does not exist.
At C:\Source\SqlServerDsc\DSCResources\MSFT_SqlServiceAccount\MSFT_SqlServiceAccount.psm1:409 char:30
+ ... rviceTypeDefinition = Get-ChildItem -Path $serviceRegistryKey | Where ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (HKEY_LOCAL_MACH...Server\Services:String) [Get-ChildItem], ItemNotFoundException
+ FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetChildItemCommand
[-] Should have the correct Type for the service 252ms
ArgumentException: Unknown or unsupported service type 'DatabaseEngine' specified!
Parameter name: ServiceType
at New-InvalidArgumentException, C:\Source\SqlServerDsc\DscResources\CommonResourceHelper.psm1: line 37
at Get-SqlServiceName, C:\Source\SqlServerDsc\DSCResources\MSFT_SqlServiceAccount\MSFT_SqlServiceAccount.psm1: line 431
at Get-ServiceObject, C:\Source\SqlServerDsc\DSCResources\MSFT_SqlServiceAccount\MSFT_SqlServiceAccount.psm1: line 282
at <ScriptBlock>, C:\Source\SqlServerDsc\Tests\Unit\MSFT_SqlServiceAccount.Tests.ps1: line 585
The DSC configuration that is using the resource (as detailed as possible):
n/a
Version of the Operating System, SQL Server and PowerShell the DSC Target Node is running:
n/a
What module (SqlServer or SQLPS) and which version of the module the DSC Target Node is running:
n/a
Version of the DSC module you're using, or 'dev' if you're using current dev branch:
Dev
The text was updated successfully, but these errors were encountered:
- Fix unit tests that didn't mock some of the calls. It no longer fail
when a SQL Server installation is not present on the node running the
unit test (issue dsccommunity#983).
…1235)
- Changes to SqlServiceAccount
- Fix unit tests that didn't mock some of the calls. It no longer fail
when a SQL Server installation is not present on the node running the
unit test (issue #983).
Details of the scenario you tried and the problem that is occurring:
When running the unit tests for the resource SqlServiceAccount, the tests fail becuase it cannot find a registry key. This is probably due to that a mock is missing.
The DSC configuration that is using the resource (as detailed as possible):
n/a
Version of the Operating System, SQL Server and PowerShell the DSC Target Node is running:
n/a
What module (SqlServer or SQLPS) and which version of the module the DSC Target Node is running:
n/a
Version of the DSC module you're using, or 'dev' if you're using current dev branch:
Dev
The text was updated successfully, but these errors were encountered: