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
When running the integration tests for SqlServiceAccount, on the build worker that have installed the SQL Server 2022 of the Database Engine, it fails with an exception. It seems it fails when getting the current state.
To reproduce, enable the Pester tag 'Integration_SQL2022' on line 48 in the integration tests of SqlServiceAccount and then run the pipeline (or the integration test).
This has probably something to do with the type Microsoft.SqlServer.Management.Smo.Wmi.ManagedComputer, and might be because feature like CONN and SDK are no longer available in SQL Server 2022. Or, maybe we need to install a newer version of the SqlServer PowerShell module. But it is all a guess since I have not debugged the resource. 🤔
Verbose logs
##[error] [-] Should compile and apply the MOF without throwing 1.13s (1.12s|8ms)
##[error] Expected no exception to be thrown, but an exception "The following exception occurred while trying to enumerate the collection: "SQL Server WMI provider is not available on fv-az420-835."." was thrown from D:\a\1\s\tests\Integration\DSC_SqlServiceAccount.Integration.Tests.ps1:118 char:17
##[error] + ... Start-DscConfiguration @startDscConfigurationParameters
##[error] + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~.
##[error] at } | Should -Not -Throw, D:\a\1\s\tests\Integration\DSC_SqlServiceAccount.Integration.Tests.ps1:119
DSC configuration
See integration tests configuration.
Suggested solution
Unknown. But seems this need to be handled differently for SQL Server 2022.
SQL Server edition and version
SQL Server 2022 (GA)
SQL Server PowerShell modules
SqlServer 21.1.18256 (as installed by integratation tests)
Operating system
Windows Server 2019 and Windows Server 2022
PowerShell version
Unknown (the version build pipeline uses)
SqlServerDsc version
Code in main branch.
The text was updated successfully, but these errors were encountered:
johlju
changed the title
SqlServiceAccount: Throw exception when used with SQL Server 2022
SqlServiceAccount: Throws exception when used with SQL Server 2022
Nov 25, 2022
johlju
added a commit
to johlju/SqlServerDsc
that referenced
this issue
Nov 26, 2022
This was resolved with PR #1808. To use this resource on SQL Server 2022 the SqlServer module 22.0.49-preview is needed, and also the latest preview of SqlServerDsc (building and deploying as I write this).
Problem description
When running the integration tests for SqlServiceAccount, on the build worker that have installed the SQL Server 2022 of the Database Engine, it fails with an exception. It seems it fails when getting the current state.
To reproduce, enable the Pester tag
'Integration_SQL2022'
on line 48 in the integration tests of SqlServiceAccount and then run the pipeline (or the integration test).This has probably something to do with the type
Microsoft.SqlServer.Management.Smo.Wmi.ManagedComputer
, and might be because feature like CONN and SDK are no longer available in SQL Server 2022. Or, maybe we need to install a newer version of the SqlServer PowerShell module. But it is all a guess since I have not debugged the resource. 🤔Verbose logs
DSC configuration
Suggested solution
Unknown. But seems this need to be handled differently for SQL Server 2022.
SQL Server edition and version
SQL Server PowerShell modules
Operating system
PowerShell version
SqlServerDsc version
The text was updated successfully, but these errors were encountered: