diff --git a/CHANGELOG.md b/CHANGELOG.md index 163537f3c9..4898525c42 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,12 +9,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - SqlServerDsc.Common - Moved functions into individual files and use ModuleBuilder to assemble. - - SqlServerDsc - Refactor integration tests for _SQL Server Reporting Services_ and _Power BI_ _Report Server_ ([issue #2431](https://github.com/dsccommunity/SqlServerDsc/issues/2431)). - `Connect-Sql` create connection and server objects as per documentation. - `Invoke-SqlDscQuery` remove disconnect as there is not an explicit connect. + - Add SQL Server 2025 to integration tests ([issue #2427](https://github.com/dsccommunity/SqlServerDsc/issues/2427)). ### Fixed diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 47010ac410..e5fb1f8ad8 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -282,8 +282,7 @@ To make sure a integration tests is run in the correct order the integration tests are grouped in the file `azure-pipelines.yml` in the integration tests jobs. -There are three, separate, integration tests jobs that each, independently, test -SQL Server 2016, SQL Server 2017 and SQL Server 2019. +There are multiple, separate integration test jobs that independently test SQL Server 2017, SQL Server 2019, SQL Server 2022 and SQL Server 2025. ### Testing of examples files diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 84ab564e58..ac76979eb7 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -283,6 +283,9 @@ stages: SQL2022_WIN2025: JOB_VMIMAGE: 'windows-2025' TEST_CONFIGURATION: 'Integration_SQL2022' + SQL2025_WIN2025: + JOB_VMIMAGE: 'windows-2025' + TEST_CONFIGURATION: 'Integration_SQL2025' pool: vmImage: $(JOB_VMIMAGE) timeoutInMinutes: '0' @@ -452,6 +455,9 @@ stages: SQL2022_WIN2025: JOB_VMIMAGE: 'windows-2025' TEST_CONFIGURATION: 'Integration_SQL2022' + SQL2025_WIN2025: + JOB_VMIMAGE: 'windows-2025' + TEST_CONFIGURATION: 'Integration_SQL2025' pool: vmImage: $(JOB_VMIMAGE) timeoutInMinutes: '0' @@ -846,6 +852,9 @@ stages: SQL2022_WIN2025: JOB_VMIMAGE: 'windows-2025' TEST_CONFIGURATION: 'Integration_SQL2022' + SQL2025_WIN2025: + JOB_VMIMAGE: 'windows-2025' + TEST_CONFIGURATION: 'Integration_SQL2025' pool: vmImage: $(JOB_VMIMAGE) timeoutInMinutes: '0' @@ -938,6 +947,9 @@ stages: SQL2022_WIN2022: JOB_VMIMAGE: 'windows-2022' TEST_CONFIGURATION: 'Integration_SQL2022' + SQL2025_WIN2025: + JOB_VMIMAGE: 'windows-2025' + TEST_CONFIGURATION: 'Integration_SQL2025' pool: vmImage: $(JOB_VMIMAGE) timeoutInMinutes: '0' @@ -1254,6 +1266,9 @@ stages: SQL2022_WIN2022: JOB_VMIMAGE: 'windows-2022' TEST_CONFIGURATION: 'Integration_SQL2022' + SQL2025_WIN2025: + JOB_VMIMAGE: 'windows-2025' + TEST_CONFIGURATION: 'Integration_SQL2025' pool: vmImage: $(JOB_VMIMAGE) timeoutInMinutes: 0 diff --git a/source/Classes/020.SqlDatabase.ps1 b/source/Classes/020.SqlDatabase.ps1 index 40f5447c83..cb6364ea71 100644 --- a/source/Classes/020.SqlDatabase.ps1 +++ b/source/Classes/020.SqlDatabase.ps1 @@ -337,7 +337,7 @@ class SqlDatabase : SqlResourceBase $Collation [DscProperty()] - [ValidateSet('Version80', 'Version90', 'Version100', 'Version110', 'Version120', 'Version130', 'Version140', 'Version150', 'Version160')] + [ValidateSet('Version80', 'Version90', 'Version100', 'Version110', 'Version120', 'Version130', 'Version140', 'Version150', 'Version160', 'Version170')] [System.String] $CompatibilityLevel @@ -745,7 +745,21 @@ class SqlDatabase : SqlResourceBase # Only set CompatibilityLevel if it's a valid non-zero value if ($databaseObject.CompatibilityLevel -gt 0) { - $currentState.CompatibilityLevel = $databaseObject.CompatibilityLevel.ToString() + $compatValue = $databaseObject.CompatibilityLevel.ToString() + + <# + SMO may return numeric values (e.g. 170 for SQL Server 2025). + Convert purely-numeric values to the 'Version' prefixed form + so they match the ValidateSet values (Version80..Version170). + #> + if ($compatValue -match '^[0-9]+$') + { + $currentState.CompatibilityLevel = 'Version{0}' -f $compatValue + } + else + { + $currentState.CompatibilityLevel = $compatValue + } } $currentState.RecoveryModel = $databaseObject.RecoveryModel.ToString() diff --git a/source/DSCResources/DSC_SqlReplication/DSC_SqlReplication.psm1 b/source/DSCResources/DSC_SqlReplication/DSC_SqlReplication.psm1 index cd394097fc..b359f7ad75 100644 --- a/source/DSCResources/DSC_SqlReplication/DSC_SqlReplication.psm1 +++ b/source/DSCResources/DSC_SqlReplication/DSC_SqlReplication.psm1 @@ -287,7 +287,8 @@ function Set-TargetResource Install-RemoteDistributor ` -ReplicationServer $localReplicationServer ` -RemoteDistributor $RemoteDistributor ` - -AdminLinkCredentials $AdminLinkCredentials + -AdminLinkCredentials $AdminLinkCredentials ` + -InstanceName $InstanceName } } else #'Absent' @@ -437,7 +438,7 @@ function New-ServerConnection $SqlServerName ) - if ($SqlMajorVersion -eq 16) + if ($SqlMajorVersion -in @(16, 17)) { <# For SQL Server 2022 the object must be created with New-Object and @@ -598,6 +599,9 @@ function New-DistributionPublisher .PARAMETER AdminLinkCredentials AdminLink password to be used when setting up publisher distributor relationship. + + .PARAMETER InstanceName + SQL Server instance name where replication distribution will be configured. #> function Install-RemoteDistributor { @@ -614,22 +618,50 @@ function Install-RemoteDistributor [Parameter(Mandatory = $true)] [System.Management.Automation.PSCredential] - $AdminLinkCredentials + $AdminLinkCredentials, + + [Parameter(Mandatory = $true)] + [System.String] + $InstanceName ) Write-Verbose -Message ( $script:localizedData.InstallRemoteDistributor -f $RemoteDistributor ) - try + $serverObject = Connect-SqlDscDatabaseEngine -InstanceName $InstanceName -ErrorAction 'Stop' + + $sqlMajorVersion = $serverObject.VersionMajor + + if ($sqlMajorVersion -eq 17) { - $ReplicationServer.InstallDistributor($RemoteDistributor, $AdminLinkCredentials.Password) + $clearTextPassword = $AdminLinkCredentials.GetNetworkCredential().Password + + <# + Need to execute stored procedure sp_adddistributor for SQL Server 2025. + Workaround for issue: https://github.com/dsccommunity/SqlServerDsc/pull/2435#issuecomment-3796616952 + + TODO: Should support encrypted connection in the future, then we could + probably go back to using InstallDistributor(), another option is + to move to stored procedures for all of the Replication logic. + #> + $query = "EXECUTE sys.sp_adddistributor @distributor = N'$RemoteDistributor', @password = N'$clearTextPassword', @encrypt_distributor_connection = 'optional', @trust_distributor_certificate = 'yes';" + + # TODO: This need to pass a credential in the future, now connects using the one resource is run as. + Invoke-SqlDscQuery -ServerObject $serverObject -DatabaseName 'master' -Query $query -RedactText $clearTextPassword -Force -ErrorAction 'Stop' } - catch + else { - $errorMessage = $script:localizedData.FailedInFunction -f 'Install-RemoteDistributor' + try + { + $ReplicationServer.InstallDistributor($RemoteDistributor, $AdminLinkCredentials.Password) + } + catch + { + $errorMessage = $script:localizedData.FailedInFunction -f 'Install-RemoteDistributor' - New-InvalidOperationException -Message $errorMessage -ErrorRecord $_ + New-InvalidOperationException -Message $errorMessage -ErrorRecord $_ + } } } diff --git a/source/DSCResources/DSC_SqlSetup/DSC_SqlSetup.psm1 b/source/DSCResources/DSC_SqlSetup/DSC_SqlSetup.psm1 index 293dc642c9..1ce37fb936 100644 --- a/source/DSCResources/DSC_SqlSetup/DSC_SqlSetup.psm1 +++ b/source/DSCResources/DSC_SqlSetup/DSC_SqlSetup.psm1 @@ -1119,7 +1119,7 @@ function Set-TargetResource # If SQL shared components already installed, clear InstallShared*Dir variables switch ($SqlVersion) { - { $_ -in ('10', '11', '12', '13', '14', '15', '16') } + { $_ -in ('10', '11', '12', '13', '14', '15', '16', '17') } { if ((Get-Variable -Name 'InstallSharedDir' -ErrorAction SilentlyContinue) -and (Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Components\FEE2E540D20152D4597229B6CFBC0A69' -ErrorAction SilentlyContinue)) { @@ -3387,7 +3387,7 @@ function Get-SqlSharedPaths switch ($SqlServerMajorVersion) { - { $_ -in ('10', '11', '12', '13', '14', '15', '16') } + { $_ -in ('10', '11', '12', '13', '14', '15', '16', '17') } { $registryKeySharedDir = 'FEE2E540D20152D4597229B6CFBC0A69' $registryKeySharedWOWDir = 'A79497A344129F64CA7D69C56F5DD8B4' diff --git a/source/Public/New-SqlDscDatabase.ps1 b/source/Public/New-SqlDscDatabase.ps1 index d2bbcd0c38..388b4e1885 100644 --- a/source/Public/New-SqlDscDatabase.ps1 +++ b/source/Public/New-SqlDscDatabase.ps1 @@ -368,7 +368,7 @@ function New-SqlDscDatabase $CatalogCollation, [Parameter(ParameterSetName = 'Database')] - [ValidateSet('Version80', 'Version90', 'Version100', 'Version110', 'Version120', 'Version130', 'Version140', 'Version150', 'Version160')] + [ValidateSet('Version80', 'Version90', 'Version100', 'Version110', 'Version120', 'Version130', 'Version140', 'Version150', 'Version160', 'Version170')] [System.String] $CompatibilityLevel, @@ -738,6 +738,7 @@ function New-SqlDscDatabase 14 = @('Version100', 'Version110', 'Version120', 'Version130', 'Version140') 15 = @('Version100', 'Version110', 'Version120', 'Version130', 'Version140', 'Version150') 16 = @('Version100', 'Version110', 'Version120', 'Version130', 'Version140', 'Version150', 'Version160') + 17 = @('Version100', 'Version110', 'Version120', 'Version130', 'Version140', 'Version150', 'Version160', 'Version170') } if ($CompatibilityLevel -notin $supportedCompatibilityLevels.$($ServerObject.VersionMajor)) diff --git a/tests/Integration/Commands/Add-SqlDscFileGroup.Integration.Tests.ps1 b/tests/Integration/Commands/Add-SqlDscFileGroup.Integration.Tests.ps1 index 23377822a3..add8414706 100644 --- a/tests/Integration/Commands/Add-SqlDscFileGroup.Integration.Tests.ps1 +++ b/tests/Integration/Commands/Add-SqlDscFileGroup.Integration.Tests.ps1 @@ -31,7 +31,7 @@ BeforeAll { Import-Module -Name $script:moduleName -ErrorAction 'Stop' } -Describe 'Add-SqlDscFileGroup' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe 'Add-SqlDscFileGroup' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { $script:mockInstanceName = 'DSCSQLTEST' $script:mockComputerName = Get-ComputerName diff --git a/tests/Integration/Commands/Add-SqlDscTraceFlag.Integration.Tests.ps1 b/tests/Integration/Commands/Add-SqlDscTraceFlag.Integration.Tests.ps1 index 00705e6c5b..808754f838 100644 --- a/tests/Integration/Commands/Add-SqlDscTraceFlag.Integration.Tests.ps1 +++ b/tests/Integration/Commands/Add-SqlDscTraceFlag.Integration.Tests.ps1 @@ -31,7 +31,7 @@ BeforeAll { Import-Module -Name $script:moduleName -ErrorAction 'Stop' } -Describe 'Add-SqlDscTraceFlag' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe 'Add-SqlDscTraceFlag' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { $script:mockInstanceName = 'DSCSQLTEST' $script:mockComputerName = Get-ComputerName diff --git a/tests/Integration/Commands/Assert-SqlDscAgentOperator.Integration.Tests.ps1 b/tests/Integration/Commands/Assert-SqlDscAgentOperator.Integration.Tests.ps1 index 44d6331e1f..c8dbcfdfcf 100644 --- a/tests/Integration/Commands/Assert-SqlDscAgentOperator.Integration.Tests.ps1 +++ b/tests/Integration/Commands/Assert-SqlDscAgentOperator.Integration.Tests.ps1 @@ -40,7 +40,7 @@ AfterAll { $null = Remove-Item -Path 'Env:\SqlServerDscCI' -ErrorAction 'Stop' } -Describe 'Assert-SqlDscAgentOperator' -Tag 'Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022' { +Describe 'Assert-SqlDscAgentOperator' -Tag 'Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025' { BeforeAll { $mockSqlAdministratorUserName = 'SqlAdmin' # Using computer name as NetBIOS name throw exception. $mockSqlAdministratorPassword = ConvertTo-SecureString -String 'P@ssw0rd1' -AsPlainText -Force diff --git a/tests/Integration/Commands/Assert-SqlDscLogin.Integration.Tests.ps1 b/tests/Integration/Commands/Assert-SqlDscLogin.Integration.Tests.ps1 index 5482f595c5..35e6bc5e71 100644 --- a/tests/Integration/Commands/Assert-SqlDscLogin.Integration.Tests.ps1 +++ b/tests/Integration/Commands/Assert-SqlDscLogin.Integration.Tests.ps1 @@ -31,7 +31,7 @@ BeforeAll { Import-Module -Name $script:moduleName -ErrorAction 'Stop' } -Describe 'Assert-SqlDscLogin' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe 'Assert-SqlDscLogin' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { $script:instanceName = 'DSCSQLTEST' $script:computerName = Get-ComputerName diff --git a/tests/Integration/Commands/Backup-SqlDscDatabase.Integration.Tests.ps1 b/tests/Integration/Commands/Backup-SqlDscDatabase.Integration.Tests.ps1 index 089cc58081..9ff9f4c1f8 100644 --- a/tests/Integration/Commands/Backup-SqlDscDatabase.Integration.Tests.ps1 +++ b/tests/Integration/Commands/Backup-SqlDscDatabase.Integration.Tests.ps1 @@ -31,7 +31,7 @@ BeforeAll { Import-Module -Name $script:moduleName -ErrorAction 'Stop' } -Describe 'Backup-SqlDscDatabase' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe 'Backup-SqlDscDatabase' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { $script:mockInstanceName = 'DSCSQLTEST' $script:mockComputerName = Get-ComputerName diff --git a/tests/Integration/Commands/Complete-SqlDscImage.Integration.Tests.ps1 b/tests/Integration/Commands/Complete-SqlDscImage.Integration.Tests.ps1 index c30a2e791e..260b467606 100644 --- a/tests/Integration/Commands/Complete-SqlDscImage.Integration.Tests.ps1 +++ b/tests/Integration/Commands/Complete-SqlDscImage.Integration.Tests.ps1 @@ -33,7 +33,7 @@ BeforeAll { } # cSpell: ignore DSCSQLTEST, PrepareImage, CompleteImage -Describe 'Complete-SqlDscImage' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe 'Complete-SqlDscImage' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { Write-Verbose -Message ('Running integration test as user ''{0}''.' -f $env:UserName) -Verbose diff --git a/tests/Integration/Commands/Connect-SqlDscDatabaseEngine.Integration.Tests.ps1 b/tests/Integration/Commands/Connect-SqlDscDatabaseEngine.Integration.Tests.ps1 index 88e8490d04..f977d3cd43 100644 --- a/tests/Integration/Commands/Connect-SqlDscDatabaseEngine.Integration.Tests.ps1 +++ b/tests/Integration/Commands/Connect-SqlDscDatabaseEngine.Integration.Tests.ps1 @@ -32,7 +32,7 @@ BeforeAll { } # cSpell: ignore DSCSQLTEST -Describe 'Connect-SqlDscDatabaseEngine' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe 'Connect-SqlDscDatabaseEngine' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { Write-Verbose -Message ('Running integration test as user ''{0}''.' -f $env:UserName) -Verbose diff --git a/tests/Integration/Commands/ConvertFrom-SqlDscDatabasePermission.Integration.Tests.ps1 b/tests/Integration/Commands/ConvertFrom-SqlDscDatabasePermission.Integration.Tests.ps1 index a3e0a30573..8d3aafc1b5 100644 --- a/tests/Integration/Commands/ConvertFrom-SqlDscDatabasePermission.Integration.Tests.ps1 +++ b/tests/Integration/Commands/ConvertFrom-SqlDscDatabasePermission.Integration.Tests.ps1 @@ -31,7 +31,7 @@ BeforeAll { Import-Module -Name $script:moduleName -ErrorAction 'Stop' } -Describe 'ConvertFrom-SqlDscDatabasePermission' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe 'ConvertFrom-SqlDscDatabasePermission' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { Context 'When converting DatabasePermission objects' { Context 'When converting a single permission Grant state' { It 'Should return a DatabasePermissionSet with correct permissions set' { diff --git a/tests/Integration/Commands/ConvertFrom-SqlDscServerPermission.Integration.Tests.ps1 b/tests/Integration/Commands/ConvertFrom-SqlDscServerPermission.Integration.Tests.ps1 index 2876ce45d5..4734f956d1 100644 --- a/tests/Integration/Commands/ConvertFrom-SqlDscServerPermission.Integration.Tests.ps1 +++ b/tests/Integration/Commands/ConvertFrom-SqlDscServerPermission.Integration.Tests.ps1 @@ -35,7 +35,7 @@ BeforeAll { # in a realistic environment. Since this is a conversion utility that doesn't directly interact # with SQL Server, it tests the command's functionality with real ServerPermission objects # rather than requiring SQL Server connectivity. -Describe 'ConvertFrom-SqlDscServerPermission' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe 'ConvertFrom-SqlDscServerPermission' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { Context 'When converting ServerPermission objects in integration environment' { It 'Should convert single permission correctly' { # Use the module scope to create ServerPermission object properly diff --git a/tests/Integration/Commands/ConvertTo-SqlDscDataFile.Integration.Tests.ps1 b/tests/Integration/Commands/ConvertTo-SqlDscDataFile.Integration.Tests.ps1 index 3d0714330b..e6b968e10f 100644 --- a/tests/Integration/Commands/ConvertTo-SqlDscDataFile.Integration.Tests.ps1 +++ b/tests/Integration/Commands/ConvertTo-SqlDscDataFile.Integration.Tests.ps1 @@ -34,7 +34,7 @@ BeforeAll { Import-SqlDscPreferredModule } -Describe 'ConvertTo-SqlDscDataFile' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe 'ConvertTo-SqlDscDataFile' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { $script:mockInstanceName = 'DSCSQLTEST' $script:mockComputerName = Get-ComputerName diff --git a/tests/Integration/Commands/ConvertTo-SqlDscDatabasePermission.Integration.Tests.ps1 b/tests/Integration/Commands/ConvertTo-SqlDscDatabasePermission.Integration.Tests.ps1 index 6294138865..bc1722c56b 100644 --- a/tests/Integration/Commands/ConvertTo-SqlDscDatabasePermission.Integration.Tests.ps1 +++ b/tests/Integration/Commands/ConvertTo-SqlDscDatabasePermission.Integration.Tests.ps1 @@ -31,7 +31,7 @@ BeforeAll { Import-Module -Name $script:moduleName -ErrorAction 'Stop' } -Describe 'ConvertTo-SqlDscDatabasePermission' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe 'ConvertTo-SqlDscDatabasePermission' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { $script:mockInstanceName = 'DSCSQLTEST' diff --git a/tests/Integration/Commands/ConvertTo-SqlDscEditionName.Integration.Tests.ps1 b/tests/Integration/Commands/ConvertTo-SqlDscEditionName.Integration.Tests.ps1 index 52908eccf9..4b49c95f06 100644 --- a/tests/Integration/Commands/ConvertTo-SqlDscEditionName.Integration.Tests.ps1 +++ b/tests/Integration/Commands/ConvertTo-SqlDscEditionName.Integration.Tests.ps1 @@ -31,7 +31,7 @@ BeforeAll { Import-Module -Name $script:moduleName -ErrorAction 'Stop' } -Describe 'ConvertTo-SqlDscEditionName' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe 'ConvertTo-SqlDscEditionName' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { Write-Verbose -Message ('Running integration test as user ''{0}''.' -f $env:UserName) -Verbose diff --git a/tests/Integration/Commands/ConvertTo-SqlDscFileGroup.Integration.Tests.ps1 b/tests/Integration/Commands/ConvertTo-SqlDscFileGroup.Integration.Tests.ps1 index 51eb849c72..ebaa3c3e54 100644 --- a/tests/Integration/Commands/ConvertTo-SqlDscFileGroup.Integration.Tests.ps1 +++ b/tests/Integration/Commands/ConvertTo-SqlDscFileGroup.Integration.Tests.ps1 @@ -34,7 +34,7 @@ BeforeAll { Import-SqlDscPreferredModule } -Describe 'ConvertTo-SqlDscFileGroup' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe 'ConvertTo-SqlDscFileGroup' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { $script:mockInstanceName = 'DSCSQLTEST' $script:mockComputerName = Get-ComputerName diff --git a/tests/Integration/Commands/ConvertTo-SqlDscServerPermission.Integration.Tests.ps1 b/tests/Integration/Commands/ConvertTo-SqlDscServerPermission.Integration.Tests.ps1 index ca27d0bb31..6d8dcfa7be 100644 --- a/tests/Integration/Commands/ConvertTo-SqlDscServerPermission.Integration.Tests.ps1 +++ b/tests/Integration/Commands/ConvertTo-SqlDscServerPermission.Integration.Tests.ps1 @@ -31,7 +31,7 @@ BeforeAll { Import-Module -Name $script:moduleName -ErrorAction 'Stop' } -Describe 'ConvertTo-SqlDscServerPermission' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe 'ConvertTo-SqlDscServerPermission' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { $script:mockInstanceName = 'DSCSQLTEST' diff --git a/tests/Integration/Commands/Deny-SqlDscServerPermission.Integration.Tests.ps1 b/tests/Integration/Commands/Deny-SqlDscServerPermission.Integration.Tests.ps1 index c2f77646e8..47dffedb23 100644 --- a/tests/Integration/Commands/Deny-SqlDscServerPermission.Integration.Tests.ps1 +++ b/tests/Integration/Commands/Deny-SqlDscServerPermission.Integration.Tests.ps1 @@ -31,7 +31,7 @@ BeforeAll { Import-Module -Name $script:moduleName -ErrorAction 'Stop' } -Describe 'Deny-SqlDscServerPermission' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe 'Deny-SqlDscServerPermission' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { $script:mockInstanceName = 'DSCSQLTEST' diff --git a/tests/Integration/Commands/Disable-SqlDscAgentOperator.Integration.Tests.ps1 b/tests/Integration/Commands/Disable-SqlDscAgentOperator.Integration.Tests.ps1 index 2294fe5bdb..b1e3ffb5f4 100644 --- a/tests/Integration/Commands/Disable-SqlDscAgentOperator.Integration.Tests.ps1 +++ b/tests/Integration/Commands/Disable-SqlDscAgentOperator.Integration.Tests.ps1 @@ -40,7 +40,7 @@ AfterAll { Remove-Item -Path 'Env:\SqlServerDscCI' -ErrorAction 'SilentlyContinue' } -Describe 'Disable-SqlDscAgentOperator' -Tag 'Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022' { +Describe 'Disable-SqlDscAgentOperator' -Tag 'Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025' { BeforeAll { $mockSqlAdministratorUserName = 'SqlAdmin' # Using computer name as NetBIOS name throw exception. $mockSqlAdministratorPassword = ConvertTo-SecureString -String 'P@ssw0rd1' -AsPlainText -Force diff --git a/tests/Integration/Commands/Disable-SqlDscAudit.Integration.Tests.ps1 b/tests/Integration/Commands/Disable-SqlDscAudit.Integration.Tests.ps1 index a82fdb883d..de5b5ca325 100644 --- a/tests/Integration/Commands/Disable-SqlDscAudit.Integration.Tests.ps1 +++ b/tests/Integration/Commands/Disable-SqlDscAudit.Integration.Tests.ps1 @@ -31,7 +31,7 @@ BeforeAll { Import-Module -Name $script:moduleName -ErrorAction 'Stop' } -Describe 'Disable-SqlDscAudit' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe 'Disable-SqlDscAudit' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { $script:mockInstanceName = 'DSCSQLTEST' $script:mockComputerName = Get-ComputerName diff --git a/tests/Integration/Commands/Disable-SqlDscDatabaseSnapshotIsolation.Integration.Tests.ps1 b/tests/Integration/Commands/Disable-SqlDscDatabaseSnapshotIsolation.Integration.Tests.ps1 index 1c513ee394..bee60b7cf6 100644 --- a/tests/Integration/Commands/Disable-SqlDscDatabaseSnapshotIsolation.Integration.Tests.ps1 +++ b/tests/Integration/Commands/Disable-SqlDscDatabaseSnapshotIsolation.Integration.Tests.ps1 @@ -31,7 +31,7 @@ BeforeAll { Import-Module -Name $script:moduleName -ErrorAction 'Stop' } -Describe 'Disable-SqlDscDatabaseSnapshotIsolation' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe 'Disable-SqlDscDatabaseSnapshotIsolation' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { $script:mockInstanceName = 'DSCSQLTEST' $script:mockComputerName = Get-ComputerName diff --git a/tests/Integration/Commands/Disable-SqlDscLogin.Integration.Tests.ps1 b/tests/Integration/Commands/Disable-SqlDscLogin.Integration.Tests.ps1 index 5b2a0cdb88..7c37f87ae0 100644 --- a/tests/Integration/Commands/Disable-SqlDscLogin.Integration.Tests.ps1 +++ b/tests/Integration/Commands/Disable-SqlDscLogin.Integration.Tests.ps1 @@ -31,7 +31,7 @@ BeforeAll { Import-Module -Name $script:moduleName -ErrorAction 'Stop' } -Describe 'Disable-SqlDscLogin' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe 'Disable-SqlDscLogin' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { $script:mockInstanceName = 'DSCSQLTEST' diff --git a/tests/Integration/Commands/Disconnect-SqlDscDatabaseEngine.Integration.Tests.ps1 b/tests/Integration/Commands/Disconnect-SqlDscDatabaseEngine.Integration.Tests.ps1 index 8343ddd3c8..21a4b7cbd3 100644 --- a/tests/Integration/Commands/Disconnect-SqlDscDatabaseEngine.Integration.Tests.ps1 +++ b/tests/Integration/Commands/Disconnect-SqlDscDatabaseEngine.Integration.Tests.ps1 @@ -32,7 +32,7 @@ BeforeAll { } # cSpell: ignore DSCSQLTEST -Describe 'Disconnect-SqlDscDatabaseEngine' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe 'Disconnect-SqlDscDatabaseEngine' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { Write-Verbose -Message ('Running integration test as user ''{0}''.' -f $env:UserName) -Verbose } diff --git a/tests/Integration/Commands/Enable-SqlDscAgentOperator.Integration.Tests.ps1 b/tests/Integration/Commands/Enable-SqlDscAgentOperator.Integration.Tests.ps1 index 1a6edb0dec..f0ad9a0f93 100644 --- a/tests/Integration/Commands/Enable-SqlDscAgentOperator.Integration.Tests.ps1 +++ b/tests/Integration/Commands/Enable-SqlDscAgentOperator.Integration.Tests.ps1 @@ -40,7 +40,7 @@ AfterAll { Remove-Item -Path 'Env:\SqlServerDscCI' -ErrorAction 'SilentlyContinue' } -Describe 'Enable-SqlDscAgentOperator' -Tag 'Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022' { +Describe 'Enable-SqlDscAgentOperator' -Tag 'Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025' { BeforeAll { $mockSqlAdministratorUserName = 'SqlAdmin' # Using computer name as NetBIOS name throw exception. $mockSqlAdministratorPassword = ConvertTo-SecureString -String 'P@ssw0rd1' -AsPlainText -Force diff --git a/tests/Integration/Commands/Enable-SqlDscAudit.Integration.Tests.ps1 b/tests/Integration/Commands/Enable-SqlDscAudit.Integration.Tests.ps1 index 82bc01bd4e..268c72bbc5 100644 --- a/tests/Integration/Commands/Enable-SqlDscAudit.Integration.Tests.ps1 +++ b/tests/Integration/Commands/Enable-SqlDscAudit.Integration.Tests.ps1 @@ -33,7 +33,7 @@ BeforeAll { Import-Module -Name $script:moduleName -ErrorAction 'Stop' } -Describe 'Enable-SqlDscAudit' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe 'Enable-SqlDscAudit' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { $script:mockInstanceName = 'DSCSQLTEST' $script:mockComputerName = Get-ComputerName diff --git a/tests/Integration/Commands/Enable-SqlDscDatabaseSnapshotIsolation.Integration.Tests.ps1 b/tests/Integration/Commands/Enable-SqlDscDatabaseSnapshotIsolation.Integration.Tests.ps1 index 6e11532bf0..aad12b7876 100644 --- a/tests/Integration/Commands/Enable-SqlDscDatabaseSnapshotIsolation.Integration.Tests.ps1 +++ b/tests/Integration/Commands/Enable-SqlDscDatabaseSnapshotIsolation.Integration.Tests.ps1 @@ -31,7 +31,7 @@ BeforeAll { Import-Module -Name $script:moduleName -ErrorAction 'Stop' } -Describe 'Enable-SqlDscDatabaseSnapshotIsolation' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe 'Enable-SqlDscDatabaseSnapshotIsolation' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { $script:mockInstanceName = 'DSCSQLTEST' $script:mockComputerName = Get-ComputerName diff --git a/tests/Integration/Commands/Enable-SqlDscLogin.Integration.Tests.ps1 b/tests/Integration/Commands/Enable-SqlDscLogin.Integration.Tests.ps1 index 26e43f798f..7a6a5d30ce 100644 --- a/tests/Integration/Commands/Enable-SqlDscLogin.Integration.Tests.ps1 +++ b/tests/Integration/Commands/Enable-SqlDscLogin.Integration.Tests.ps1 @@ -31,7 +31,7 @@ BeforeAll { Import-Module -Name $script:moduleName -ErrorAction 'Stop' } -Describe 'Enable-SqlDscLogin' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe 'Enable-SqlDscLogin' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { $script:mockInstanceName = 'DSCSQLTEST' diff --git a/tests/Integration/Commands/Get-SqlDscAgentAlert.Integration.Tests.ps1 b/tests/Integration/Commands/Get-SqlDscAgentAlert.Integration.Tests.ps1 index 972cf5ab7f..d287b3bbe7 100644 --- a/tests/Integration/Commands/Get-SqlDscAgentAlert.Integration.Tests.ps1 +++ b/tests/Integration/Commands/Get-SqlDscAgentAlert.Integration.Tests.ps1 @@ -31,7 +31,7 @@ BeforeAll { Import-Module -Name $script:moduleName -ErrorAction 'Stop' } -Describe 'Get-SqlDscAgentAlert' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe 'Get-SqlDscAgentAlert' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { # Integration tests are run on the DSCSQLTEST instance $script:sqlServerInstance = 'DSCSQLTEST' diff --git a/tests/Integration/Commands/Get-SqlDscAgentOperator.Integration.Tests.ps1 b/tests/Integration/Commands/Get-SqlDscAgentOperator.Integration.Tests.ps1 index 1d938f3d82..23a2154115 100644 --- a/tests/Integration/Commands/Get-SqlDscAgentOperator.Integration.Tests.ps1 +++ b/tests/Integration/Commands/Get-SqlDscAgentOperator.Integration.Tests.ps1 @@ -40,7 +40,7 @@ AfterAll { Remove-Item -Path 'Env:\SqlServerDscCI' -ErrorAction 'SilentlyContinue' } -Describe 'Get-SqlDscAgentOperator' -Tag 'Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022' { +Describe 'Get-SqlDscAgentOperator' -Tag 'Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025' { BeforeAll { $mockSqlAdministratorUserName = 'SqlAdmin' # Using computer name as NetBIOS name throw exception. $mockSqlAdministratorPassword = ConvertTo-SecureString -String 'P@ssw0rd1' -AsPlainText -Force diff --git a/tests/Integration/Commands/Get-SqlDscAudit.Integration.Tests.ps1 b/tests/Integration/Commands/Get-SqlDscAudit.Integration.Tests.ps1 index 452aa553a3..2f20a542a7 100644 --- a/tests/Integration/Commands/Get-SqlDscAudit.Integration.Tests.ps1 +++ b/tests/Integration/Commands/Get-SqlDscAudit.Integration.Tests.ps1 @@ -31,7 +31,7 @@ BeforeAll { Import-Module -Name $script:moduleName -ErrorAction 'Stop' } -Describe 'Get-SqlDscAudit' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe 'Get-SqlDscAudit' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { $script:mockInstanceName = 'DSCSQLTEST' $script:mockComputerName = Get-ComputerName diff --git a/tests/Integration/Commands/Get-SqlDscBackupFileList.Integration.Tests.ps1 b/tests/Integration/Commands/Get-SqlDscBackupFileList.Integration.Tests.ps1 index 11da497662..e6214096ed 100644 --- a/tests/Integration/Commands/Get-SqlDscBackupFileList.Integration.Tests.ps1 +++ b/tests/Integration/Commands/Get-SqlDscBackupFileList.Integration.Tests.ps1 @@ -31,7 +31,7 @@ BeforeAll { Import-Module -Name $script:moduleName -ErrorAction 'Stop' } -Describe 'Get-SqlDscBackupFileList' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe 'Get-SqlDscBackupFileList' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { $script:mockInstanceName = 'DSCSQLTEST' $script:mockComputerName = Get-ComputerName diff --git a/tests/Integration/Commands/Get-SqlDscCompatibilityLevel.Integration.Tests.ps1 b/tests/Integration/Commands/Get-SqlDscCompatibilityLevel.Integration.Tests.ps1 index d2f38f7d1d..58913befee 100644 --- a/tests/Integration/Commands/Get-SqlDscCompatibilityLevel.Integration.Tests.ps1 +++ b/tests/Integration/Commands/Get-SqlDscCompatibilityLevel.Integration.Tests.ps1 @@ -30,7 +30,7 @@ BeforeAll { } # cSpell: ignore DSCSQLTEST -Describe 'Get-SqlDscCompatibilityLevel' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe 'Get-SqlDscCompatibilityLevel' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { $script:mockInstanceName = 'DSCSQLTEST' $script:mockComputerName = Get-ComputerName @@ -64,6 +64,10 @@ Describe 'Get-SqlDscCompatibilityLevel' -Tag @('Integration_SQL2017', 'Integrati { $script:expectedLevels = @('Version100', 'Version110', 'Version120', 'Version130', 'Version140', 'Version150', 'Version160') } + 17 # SQL Server 2025 + { + $script:expectedLevels = @('Version100', 'Version110', 'Version120', 'Version130', 'Version140', 'Version150', 'Version160', 'Version170') + } default { throw "Unsupported SQL Server version: $($script:serverObject.VersionMajor)" diff --git a/tests/Integration/Commands/Get-SqlDscConfigurationOption.Integration.Tests.ps1 b/tests/Integration/Commands/Get-SqlDscConfigurationOption.Integration.Tests.ps1 index ce2a4accb2..4aa599b565 100644 --- a/tests/Integration/Commands/Get-SqlDscConfigurationOption.Integration.Tests.ps1 +++ b/tests/Integration/Commands/Get-SqlDscConfigurationOption.Integration.Tests.ps1 @@ -31,7 +31,7 @@ BeforeAll { Import-Module -Name $script:moduleName -ErrorAction 'Stop' } -Describe 'Get-SqlDscConfigurationOption' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe 'Get-SqlDscConfigurationOption' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { $script:mockInstanceName = 'DSCSQLTEST' diff --git a/tests/Integration/Commands/Get-SqlDscDatabase.Integration.Tests.ps1 b/tests/Integration/Commands/Get-SqlDscDatabase.Integration.Tests.ps1 index 11a62b4fe9..3947692af6 100644 --- a/tests/Integration/Commands/Get-SqlDscDatabase.Integration.Tests.ps1 +++ b/tests/Integration/Commands/Get-SqlDscDatabase.Integration.Tests.ps1 @@ -31,7 +31,7 @@ BeforeAll { Import-Module -Name $script:moduleName -ErrorAction 'Stop' } -Describe 'Get-SqlDscDatabase' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe 'Get-SqlDscDatabase' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { $script:mockInstanceName = 'DSCSQLTEST' $script:mockComputerName = Get-ComputerName diff --git a/tests/Integration/Commands/Get-SqlDscDatabasePermission.Integration.Tests.ps1 b/tests/Integration/Commands/Get-SqlDscDatabasePermission.Integration.Tests.ps1 index 911c96378e..9b27afd435 100644 --- a/tests/Integration/Commands/Get-SqlDscDatabasePermission.Integration.Tests.ps1 +++ b/tests/Integration/Commands/Get-SqlDscDatabasePermission.Integration.Tests.ps1 @@ -31,7 +31,7 @@ BeforeAll { Import-Module -Name $script:moduleName -ErrorAction 'Stop' } -Describe 'Get-SqlDscDatabasePermission' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe 'Get-SqlDscDatabasePermission' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { $script:mockInstanceName = 'DSCSQLTEST' diff --git a/tests/Integration/Commands/Get-SqlDscDateTime.Integration.Tests.ps1 b/tests/Integration/Commands/Get-SqlDscDateTime.Integration.Tests.ps1 index e03a91e5a1..c93fb8c1cf 100644 --- a/tests/Integration/Commands/Get-SqlDscDateTime.Integration.Tests.ps1 +++ b/tests/Integration/Commands/Get-SqlDscDateTime.Integration.Tests.ps1 @@ -31,7 +31,7 @@ BeforeAll { Import-Module -Name $script:moduleName -ErrorAction 'Stop' } -Describe 'Get-SqlDscDateTime' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe 'Get-SqlDscDateTime' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { $script:mockInstanceName = 'DSCSQLTEST' $script:mockComputerName = Get-ComputerName diff --git a/tests/Integration/Commands/Get-SqlDscLogin.Integration.Tests.ps1 b/tests/Integration/Commands/Get-SqlDscLogin.Integration.Tests.ps1 index 6560a9fba0..4e3571b351 100644 --- a/tests/Integration/Commands/Get-SqlDscLogin.Integration.Tests.ps1 +++ b/tests/Integration/Commands/Get-SqlDscLogin.Integration.Tests.ps1 @@ -31,7 +31,7 @@ BeforeAll { Import-Module -Name $script:moduleName -ErrorAction 'Stop' } -Describe 'Get-SqlDscLogin' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe 'Get-SqlDscLogin' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { $script:mockInstanceName = 'DSCSQLTEST' diff --git a/tests/Integration/Commands/Get-SqlDscManagedComputer.Integration.Tests.ps1 b/tests/Integration/Commands/Get-SqlDscManagedComputer.Integration.Tests.ps1 index 8dda7b49ef..02dcb2e7ca 100644 --- a/tests/Integration/Commands/Get-SqlDscManagedComputer.Integration.Tests.ps1 +++ b/tests/Integration/Commands/Get-SqlDscManagedComputer.Integration.Tests.ps1 @@ -32,7 +32,7 @@ BeforeAll { } # cSpell: ignore DSCSQLTEST -Describe 'Get-SqlDscManagedComputer' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe 'Get-SqlDscManagedComputer' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { Write-Verbose -Message ('Running integration test as user ''{0}''.' -f $env:UserName) -Verbose diff --git a/tests/Integration/Commands/Get-SqlDscManagedComputerInstance.Integration.Tests.ps1 b/tests/Integration/Commands/Get-SqlDscManagedComputerInstance.Integration.Tests.ps1 index a1b927707b..fbb6f90dde 100644 --- a/tests/Integration/Commands/Get-SqlDscManagedComputerInstance.Integration.Tests.ps1 +++ b/tests/Integration/Commands/Get-SqlDscManagedComputerInstance.Integration.Tests.ps1 @@ -32,7 +32,7 @@ BeforeAll { } # cSpell: ignore DSCSQLTEST -Describe 'Get-SqlDscManagedComputerInstance' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe 'Get-SqlDscManagedComputerInstance' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { Write-Verbose -Message ('Running integration test as user ''{0}''.' -f $env:UserName) -Verbose diff --git a/tests/Integration/Commands/Get-SqlDscManagedComputerService.Integration.Tests.ps1 b/tests/Integration/Commands/Get-SqlDscManagedComputerService.Integration.Tests.ps1 index 2ced995855..76a687d565 100644 --- a/tests/Integration/Commands/Get-SqlDscManagedComputerService.Integration.Tests.ps1 +++ b/tests/Integration/Commands/Get-SqlDscManagedComputerService.Integration.Tests.ps1 @@ -32,7 +32,7 @@ BeforeAll { } # cSpell: ignore DSCSQLTEST -Describe 'Get-SqlDscManagedComputerService' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe 'Get-SqlDscManagedComputerService' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { Write-Verbose -Message ('Running integration test as user ''{0}''.' -f $env:UserName) -Verbose diff --git a/tests/Integration/Commands/Get-SqlDscPreferredModule.Integration.Tests.ps1 b/tests/Integration/Commands/Get-SqlDscPreferredModule.Integration.Tests.ps1 index 98f7e88299..3f7c4a040c 100644 --- a/tests/Integration/Commands/Get-SqlDscPreferredModule.Integration.Tests.ps1 +++ b/tests/Integration/Commands/Get-SqlDscPreferredModule.Integration.Tests.ps1 @@ -31,7 +31,7 @@ BeforeAll { Import-Module -Name $script:moduleName -ErrorAction 'Stop' } -Describe 'Get-SqlDscPreferredModule' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe 'Get-SqlDscPreferredModule' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { Context 'When using default parameters' { It 'Should return a module object when preferred modules are available' { $result = Get-SqlDscPreferredModule -ErrorAction 'Stop' diff --git a/tests/Integration/Commands/Get-SqlDscRole.Integration.Tests.ps1 b/tests/Integration/Commands/Get-SqlDscRole.Integration.Tests.ps1 index 0ffd81ab52..8c4d9b0832 100644 --- a/tests/Integration/Commands/Get-SqlDscRole.Integration.Tests.ps1 +++ b/tests/Integration/Commands/Get-SqlDscRole.Integration.Tests.ps1 @@ -31,7 +31,7 @@ BeforeAll { Import-Module -Name $script:moduleName -ErrorAction 'Stop' } -Describe 'Get-SqlDscRole' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe 'Get-SqlDscRole' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { $script:mockInstanceName = 'DSCSQLTEST' diff --git a/tests/Integration/Commands/Get-SqlDscServerPermission.Integration.Tests.ps1 b/tests/Integration/Commands/Get-SqlDscServerPermission.Integration.Tests.ps1 index 940fa4922f..ced5cc13d0 100644 --- a/tests/Integration/Commands/Get-SqlDscServerPermission.Integration.Tests.ps1 +++ b/tests/Integration/Commands/Get-SqlDscServerPermission.Integration.Tests.ps1 @@ -31,7 +31,7 @@ BeforeAll { Import-Module -Name $script:moduleName -ErrorAction 'Stop' } -Describe 'Get-SqlDscServerPermission' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe 'Get-SqlDscServerPermission' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { $script:mockInstanceName = 'DSCSQLTEST' diff --git a/tests/Integration/Commands/Get-SqlDscServerProtocol.Integration.Tests.ps1 b/tests/Integration/Commands/Get-SqlDscServerProtocol.Integration.Tests.ps1 index 026536ab2d..af37f3960a 100644 --- a/tests/Integration/Commands/Get-SqlDscServerProtocol.Integration.Tests.ps1 +++ b/tests/Integration/Commands/Get-SqlDscServerProtocol.Integration.Tests.ps1 @@ -32,7 +32,7 @@ BeforeAll { } # cSpell: ignore DSCSQLTEST -Describe 'Get-SqlDscServerProtocol' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe 'Get-SqlDscServerProtocol' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { Write-Verbose -Message ('Running integration test as user ''{0}''.' -f $env:UserName) -Verbose diff --git a/tests/Integration/Commands/Get-SqlDscServerProtocolName.Integration.Tests.ps1 b/tests/Integration/Commands/Get-SqlDscServerProtocolName.Integration.Tests.ps1 index ef305c9a33..7fc8adf0da 100644 --- a/tests/Integration/Commands/Get-SqlDscServerProtocolName.Integration.Tests.ps1 +++ b/tests/Integration/Commands/Get-SqlDscServerProtocolName.Integration.Tests.ps1 @@ -31,7 +31,7 @@ BeforeAll { Import-Module -Name $script:moduleName -ErrorAction 'Stop' } -Describe 'Get-SqlDscServerProtocolName' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe 'Get-SqlDscServerProtocolName' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { Write-Verbose -Message ('Running integration test as user ''{0}''.' -f $env:UserName) -Verbose diff --git a/tests/Integration/Commands/Get-SqlDscServerProtocolTcpIp.Integration.Tests.ps1 b/tests/Integration/Commands/Get-SqlDscServerProtocolTcpIp.Integration.Tests.ps1 index 28a4910c00..e59df39b66 100644 --- a/tests/Integration/Commands/Get-SqlDscServerProtocolTcpIp.Integration.Tests.ps1 +++ b/tests/Integration/Commands/Get-SqlDscServerProtocolTcpIp.Integration.Tests.ps1 @@ -32,7 +32,7 @@ BeforeAll { } # cSpell: ignore DSCSQLTEST -Describe 'Get-SqlDscServerProtocolTcpIp' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe 'Get-SqlDscServerProtocolTcpIp' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { Write-Verbose -Message ('Running integration test as user ''{0}''.' -f $env:UserName) -Verbose diff --git a/tests/Integration/Commands/Get-SqlDscSetupLog.Integration.Tests.ps1 b/tests/Integration/Commands/Get-SqlDscSetupLog.Integration.Tests.ps1 index 05b2b9395b..bf3b0d8ae8 100644 --- a/tests/Integration/Commands/Get-SqlDscSetupLog.Integration.Tests.ps1 +++ b/tests/Integration/Commands/Get-SqlDscSetupLog.Integration.Tests.ps1 @@ -31,7 +31,7 @@ BeforeAll { Import-Module -Name $script:moduleName -ErrorAction 'Stop' } -Describe 'Get-SqlDscSetupLog' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe 'Get-SqlDscSetupLog' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { Context 'When retrieving SQL Server setup log' { It 'Should retrieve the setup log from the most recent installation' { # This test verifies that Get-SqlDscSetupLog can successfully retrieve the diff --git a/tests/Integration/Commands/Get-SqlDscStartupParameter.Integration.Tests.ps1 b/tests/Integration/Commands/Get-SqlDscStartupParameter.Integration.Tests.ps1 index 292b8deee7..24c879caf9 100644 --- a/tests/Integration/Commands/Get-SqlDscStartupParameter.Integration.Tests.ps1 +++ b/tests/Integration/Commands/Get-SqlDscStartupParameter.Integration.Tests.ps1 @@ -32,7 +32,7 @@ BeforeAll { } # cSpell: ignore DSCSQLTEST -Describe 'Get-SqlDscStartupParameter' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe 'Get-SqlDscStartupParameter' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { Write-Verbose -Message ('Running integration test as user ''{0}''.' -f $env:UserName) -Verbose diff --git a/tests/Integration/Commands/Get-SqlDscTraceFlag.Integration.Tests.ps1 b/tests/Integration/Commands/Get-SqlDscTraceFlag.Integration.Tests.ps1 index 499ff15ad8..40899f051b 100644 --- a/tests/Integration/Commands/Get-SqlDscTraceFlag.Integration.Tests.ps1 +++ b/tests/Integration/Commands/Get-SqlDscTraceFlag.Integration.Tests.ps1 @@ -31,7 +31,7 @@ BeforeAll { Import-Module -Name $script:moduleName -ErrorAction 'Stop' } -Describe 'Get-SqlDscTraceFlag' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe 'Get-SqlDscTraceFlag' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { $script:mockInstanceName = 'DSCSQLTEST' $script:mockComputerName = Get-ComputerName diff --git a/tests/Integration/Commands/Grant-SqlDscServerPermission.Integration.Tests.ps1 b/tests/Integration/Commands/Grant-SqlDscServerPermission.Integration.Tests.ps1 index b142762167..e912d0b44b 100644 --- a/tests/Integration/Commands/Grant-SqlDscServerPermission.Integration.Tests.ps1 +++ b/tests/Integration/Commands/Grant-SqlDscServerPermission.Integration.Tests.ps1 @@ -31,7 +31,7 @@ BeforeAll { Import-Module -Name $script:moduleName -ErrorAction 'Stop' } -Describe 'Grant-SqlDscServerPermission' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe 'Grant-SqlDscServerPermission' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { $script:mockInstanceName = 'DSCSQLTEST' diff --git a/tests/Integration/Commands/Import-SqlDscPreferredModule.Integration.Tests.ps1 b/tests/Integration/Commands/Import-SqlDscPreferredModule.Integration.Tests.ps1 index 87cf3730e9..ab3a1a6e23 100644 --- a/tests/Integration/Commands/Import-SqlDscPreferredModule.Integration.Tests.ps1 +++ b/tests/Integration/Commands/Import-SqlDscPreferredModule.Integration.Tests.ps1 @@ -31,7 +31,7 @@ BeforeAll { Import-Module -Name $script:moduleName -ErrorAction 'Stop' } -Describe 'Import-SqlDscPreferredModule' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe 'Import-SqlDscPreferredModule' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { # Store original environment variable value to restore later $script:originalSMODefaultModuleName = $env:SMODefaultModuleName diff --git a/tests/Integration/Commands/Initialize-SqlDscFailoverCluster.Integration.Tests.ps1 b/tests/Integration/Commands/Initialize-SqlDscFailoverCluster.Integration.Tests.ps1 index ee7a1296c9..76b49f36cd 100644 --- a/tests/Integration/Commands/Initialize-SqlDscFailoverCluster.Integration.Tests.ps1 +++ b/tests/Integration/Commands/Initialize-SqlDscFailoverCluster.Integration.Tests.ps1 @@ -31,7 +31,7 @@ BeforeAll { Import-Module -Name $script:moduleName -ErrorAction 'Stop' } -Describe 'Initialize-SqlDscFailoverCluster' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe 'Initialize-SqlDscFailoverCluster' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { $computerName = Get-ComputerName Write-Verbose -Message ("Running integration test as user '{0}' on computer '{1}'." -f $env:UserName, $computerName) -Verbose diff --git a/tests/Integration/Commands/Initialize-SqlDscImage.Integration.Tests.ps1 b/tests/Integration/Commands/Initialize-SqlDscImage.Integration.Tests.ps1 index 0c043d8f48..0e1cfd6b9e 100644 --- a/tests/Integration/Commands/Initialize-SqlDscImage.Integration.Tests.ps1 +++ b/tests/Integration/Commands/Initialize-SqlDscImage.Integration.Tests.ps1 @@ -32,7 +32,7 @@ BeforeAll { } # cSpell: ignore SQLSERVERAGENT, DSCSQLTEST -Describe 'Initialize-SqlDscImage' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe 'Initialize-SqlDscImage' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { $computerName = Get-ComputerName Write-Verbose -Message ("Running integration test as user '{0}' on computer '{1}'." -f $env:UserName, $computerName) -Verbose diff --git a/tests/Integration/Commands/Initialize-SqlDscRebuildDatabase.Integration.Tests.ps1 b/tests/Integration/Commands/Initialize-SqlDscRebuildDatabase.Integration.Tests.ps1 index 3045150324..7f3533d90a 100644 --- a/tests/Integration/Commands/Initialize-SqlDscRebuildDatabase.Integration.Tests.ps1 +++ b/tests/Integration/Commands/Initialize-SqlDscRebuildDatabase.Integration.Tests.ps1 @@ -33,7 +33,7 @@ BeforeAll { } # cSpell: ignore DSCSQLTEST -Describe 'Initialize-SqlDscRebuildDatabase' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe 'Initialize-SqlDscRebuildDatabase' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { Write-Verbose -Message ('Running integration test as user ''{0}''.' -f $env:UserName) -Verbose diff --git a/tests/Integration/Commands/Install-SqlDscFailoverCluster.Integration.Tests.ps1 b/tests/Integration/Commands/Install-SqlDscFailoverCluster.Integration.Tests.ps1 index 311c5a0117..30d9253776 100644 --- a/tests/Integration/Commands/Install-SqlDscFailoverCluster.Integration.Tests.ps1 +++ b/tests/Integration/Commands/Install-SqlDscFailoverCluster.Integration.Tests.ps1 @@ -37,7 +37,7 @@ AfterAll { $PSDefaultParameterValues.Remove('Should:ModuleName') } -Describe 'Install-SqlDscFailoverCluster Integration Tests' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe 'Install-SqlDscFailoverCluster Integration Tests' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { <# Integration tests require a Windows Failover Cluster environment which is not available in the CI pipeline. Remove -Skip from the diff --git a/tests/Integration/Commands/Install-SqlDscServer.Integration.Tests.ps1 b/tests/Integration/Commands/Install-SqlDscServer.Integration.Tests.ps1 index b8b156abde..812e449083 100644 --- a/tests/Integration/Commands/Install-SqlDscServer.Integration.Tests.ps1 +++ b/tests/Integration/Commands/Install-SqlDscServer.Integration.Tests.ps1 @@ -32,7 +32,7 @@ BeforeAll { } # cSpell: ignore SQLSERVERAGENT, DSCSQLTEST -Describe 'Install-SqlDscServer' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe 'Install-SqlDscServer' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { Write-Verbose -Message ('Running integration test as user ''{0}''.' -f $env:UserName) -Verbose diff --git a/tests/Integration/Commands/Invoke-SqlDscQuery.Integration.Tests.ps1 b/tests/Integration/Commands/Invoke-SqlDscQuery.Integration.Tests.ps1 index 0413e32e3b..29e9f8401e 100644 --- a/tests/Integration/Commands/Invoke-SqlDscQuery.Integration.Tests.ps1 +++ b/tests/Integration/Commands/Invoke-SqlDscQuery.Integration.Tests.ps1 @@ -31,7 +31,7 @@ BeforeAll { Import-Module -Name $script:moduleName -ErrorAction 'Stop' } -Describe 'Invoke-SqlDscQuery' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe 'Invoke-SqlDscQuery' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { $script:mockInstanceName = 'DSCSQLTEST' $script:mockComputerName = Get-ComputerName diff --git a/tests/Integration/Commands/Invoke-SqlDscScalarQuery.Integration.Tests.ps1 b/tests/Integration/Commands/Invoke-SqlDscScalarQuery.Integration.Tests.ps1 index b5696df82c..53bacf31ca 100644 --- a/tests/Integration/Commands/Invoke-SqlDscScalarQuery.Integration.Tests.ps1 +++ b/tests/Integration/Commands/Invoke-SqlDscScalarQuery.Integration.Tests.ps1 @@ -37,7 +37,7 @@ AfterAll { Remove-Item -Path 'env:SqlServerDscCI' -ErrorAction 'SilentlyContinue' } -Describe 'Invoke-SqlDscScalarQuery' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe 'Invoke-SqlDscScalarQuery' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { $script:mockInstanceName = 'DSCSQLTEST' $script:mockComputerName = Get-ComputerName diff --git a/tests/Integration/Commands/New-SqlDscAgentAlert.Integration.Tests.ps1 b/tests/Integration/Commands/New-SqlDscAgentAlert.Integration.Tests.ps1 index fc8dac8d3d..ccce8bbf27 100644 --- a/tests/Integration/Commands/New-SqlDscAgentAlert.Integration.Tests.ps1 +++ b/tests/Integration/Commands/New-SqlDscAgentAlert.Integration.Tests.ps1 @@ -31,7 +31,7 @@ BeforeAll { Import-Module -Name $script:moduleName -ErrorAction 'Stop' } -Describe 'New-SqlDscAgentAlert' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe 'New-SqlDscAgentAlert' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { # Integration tests are run on the DSCSQLTEST instance $script:sqlServerInstance = 'DSCSQLTEST' diff --git a/tests/Integration/Commands/New-SqlDscAgentOperator.Integration.Tests.ps1 b/tests/Integration/Commands/New-SqlDscAgentOperator.Integration.Tests.ps1 index 0b125b98f0..61d6ec86b1 100644 --- a/tests/Integration/Commands/New-SqlDscAgentOperator.Integration.Tests.ps1 +++ b/tests/Integration/Commands/New-SqlDscAgentOperator.Integration.Tests.ps1 @@ -40,7 +40,7 @@ AfterAll { Remove-Item -Path 'Env:\SqlServerDscCI' -ErrorAction 'SilentlyContinue' } -Describe 'New-SqlDscAgentOperator' -Tag 'Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022' { +Describe 'New-SqlDscAgentOperator' -Tag 'Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025' { BeforeAll { $mockSqlAdministratorUserName = 'SqlAdmin' # Using computer name as NetBIOS name throw exception. $mockSqlAdministratorPassword = ConvertTo-SecureString -String 'P@ssw0rd1' -AsPlainText -Force diff --git a/tests/Integration/Commands/New-SqlDscAudit.Integration.Tests.ps1 b/tests/Integration/Commands/New-SqlDscAudit.Integration.Tests.ps1 index 6381472f23..1f44929e01 100644 --- a/tests/Integration/Commands/New-SqlDscAudit.Integration.Tests.ps1 +++ b/tests/Integration/Commands/New-SqlDscAudit.Integration.Tests.ps1 @@ -31,7 +31,7 @@ BeforeAll { Import-Module -Name $script:moduleName -ErrorAction 'Stop' } -Describe 'New-SqlDscAudit' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe 'New-SqlDscAudit' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { $script:mockInstanceName = 'DSCSQLTEST' $script:mockComputerName = Get-ComputerName diff --git a/tests/Integration/Commands/New-SqlDscDataFile.Integration.Tests.ps1 b/tests/Integration/Commands/New-SqlDscDataFile.Integration.Tests.ps1 index dd2c02486f..f4b07955ea 100644 --- a/tests/Integration/Commands/New-SqlDscDataFile.Integration.Tests.ps1 +++ b/tests/Integration/Commands/New-SqlDscDataFile.Integration.Tests.ps1 @@ -34,7 +34,7 @@ BeforeAll { Import-SqlDscPreferredModule } -Describe 'New-SqlDscDataFile' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe 'New-SqlDscDataFile' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { $script:mockInstanceName = 'DSCSQLTEST' $script:mockComputerName = Get-ComputerName diff --git a/tests/Integration/Commands/New-SqlDscDatabase.Integration.Tests.ps1 b/tests/Integration/Commands/New-SqlDscDatabase.Integration.Tests.ps1 index 76643888cd..672afe3f0d 100644 --- a/tests/Integration/Commands/New-SqlDscDatabase.Integration.Tests.ps1 +++ b/tests/Integration/Commands/New-SqlDscDatabase.Integration.Tests.ps1 @@ -31,7 +31,7 @@ BeforeAll { Import-Module -Name $script:moduleName -ErrorAction 'Stop' } -Describe 'New-SqlDscDatabase' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe 'New-SqlDscDatabase' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { $script:mockInstanceName = 'DSCSQLTEST' $script:mockComputerName = Get-ComputerName diff --git a/tests/Integration/Commands/New-SqlDscDatabaseSnapshot.Integration.Tests.ps1 b/tests/Integration/Commands/New-SqlDscDatabaseSnapshot.Integration.Tests.ps1 index 6e1d852626..e2a21c0af5 100644 --- a/tests/Integration/Commands/New-SqlDscDatabaseSnapshot.Integration.Tests.ps1 +++ b/tests/Integration/Commands/New-SqlDscDatabaseSnapshot.Integration.Tests.ps1 @@ -31,7 +31,7 @@ BeforeAll { Import-Module -Name $script:moduleName -ErrorAction 'Stop' } -Describe 'New-SqlDscDatabaseSnapshot' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe 'New-SqlDscDatabaseSnapshot' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { $script:mockInstanceName = 'DSCSQLTEST' diff --git a/tests/Integration/Commands/New-SqlDscFileGroup.Integration.Tests.ps1 b/tests/Integration/Commands/New-SqlDscFileGroup.Integration.Tests.ps1 index 1cd3048951..556e2a85bb 100644 --- a/tests/Integration/Commands/New-SqlDscFileGroup.Integration.Tests.ps1 +++ b/tests/Integration/Commands/New-SqlDscFileGroup.Integration.Tests.ps1 @@ -34,7 +34,7 @@ BeforeAll { Import-SqlDscPreferredModule } -Describe 'New-SqlDscFileGroup' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe 'New-SqlDscFileGroup' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { $script:mockInstanceName = 'DSCSQLTEST' $script:mockComputerName = Get-ComputerName diff --git a/tests/Integration/Commands/New-SqlDscLogin.Integration.Tests.ps1 b/tests/Integration/Commands/New-SqlDscLogin.Integration.Tests.ps1 index 61fe209fc9..5dcf018fd6 100644 --- a/tests/Integration/Commands/New-SqlDscLogin.Integration.Tests.ps1 +++ b/tests/Integration/Commands/New-SqlDscLogin.Integration.Tests.ps1 @@ -31,7 +31,7 @@ BeforeAll { Import-Module -Name $script:moduleName -ErrorAction 'Stop' } -Describe 'New-SqlDscLogin' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe 'New-SqlDscLogin' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { $script:instanceName = 'DSCSQLTEST' $script:computerName = Get-ComputerName diff --git a/tests/Integration/Commands/New-SqlDscRole.Integration.Tests.ps1 b/tests/Integration/Commands/New-SqlDscRole.Integration.Tests.ps1 index f76693e5f5..e6df6e7d43 100644 --- a/tests/Integration/Commands/New-SqlDscRole.Integration.Tests.ps1 +++ b/tests/Integration/Commands/New-SqlDscRole.Integration.Tests.ps1 @@ -31,7 +31,7 @@ BeforeAll { Import-Module -Name $script:moduleName -ErrorAction 'Stop' } -Describe 'New-SqlDscRole' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe 'New-SqlDscRole' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { $script:mockInstanceName = 'DSCSQLTEST' $script:mockComputerName = Get-ComputerName diff --git a/tests/Integration/Commands/PostInstallationConfiguration.Integration.Tests.ps1 b/tests/Integration/Commands/PostInstallationConfiguration.Integration.Tests.ps1 index 52e28ef7d2..9d38d579ba 100644 --- a/tests/Integration/Commands/PostInstallationConfiguration.Integration.Tests.ps1 +++ b/tests/Integration/Commands/PostInstallationConfiguration.Integration.Tests.ps1 @@ -32,7 +32,7 @@ BeforeAll { } # cSpell: ignore DSCSQLTEST -Describe 'PostInstallationConfiguration' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe 'PostInstallationConfiguration' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { Context 'When configuring SSL certificate for encryption support on DSCSQLTEST instance' { BeforeAll { $script:instanceName = 'DSCSQLTEST' diff --git a/tests/Integration/Commands/Prerequisites.Integration.Tests.ps1 b/tests/Integration/Commands/Prerequisites.Integration.Tests.ps1 index 6226a3478f..06d36b2520 100644 --- a/tests/Integration/Commands/Prerequisites.Integration.Tests.ps1 +++ b/tests/Integration/Commands/Prerequisites.Integration.Tests.ps1 @@ -33,7 +33,7 @@ BeforeAll { # CSpell: ignore Remoting Describe 'Prerequisites' { - Context 'Create required local Windows users' -Tag @('Integration_SQL2016', 'Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_PowerBI', 'Integration_SQL2017_RS', 'Integration_SQL2019_RS', 'Integration_SQL2022_RS') { + Context 'Create required local Windows users' -Tag @('Integration_SQL2016', 'Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025', 'Integration_PowerBI', 'Integration_SQL2017_RS', 'Integration_SQL2019_RS', 'Integration_SQL2022_RS') { BeforeAll { $password = ConvertTo-SecureString -String 'P@ssw0rd1' -AsPlainText -Force } @@ -60,7 +60,7 @@ Describe 'Prerequisites' { } } - Context 'Should create required local Windows service accounts' -Tag @('Integration_SQL2016', 'Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_PowerBI', 'Integration_SQL2017_RS', 'Integration_SQL2019_RS', 'Integration_SQL2022_RS') { + Context 'Should create required local Windows service accounts' -Tag @('Integration_SQL2016', 'Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025', 'Integration_PowerBI', 'Integration_SQL2017_RS', 'Integration_SQL2019_RS', 'Integration_SQL2022_RS') { BeforeAll { $password = ConvertTo-SecureString -String 'yig-C^Equ3' -AsPlainText -Force } @@ -101,7 +101,7 @@ Describe 'Prerequisites' { } } - Context 'Create required local Windows groups' -Tag @('Integration_SQL2016', 'Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_PowerBI', 'Integration_SQL2017_RS', 'Integration_SQL2019_RS', 'Integration_SQL2022_RS') { + Context 'Create required local Windows groups' -Tag @('Integration_SQL2016', 'Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025', 'Integration_PowerBI', 'Integration_SQL2017_RS', 'Integration_SQL2019_RS', 'Integration_SQL2022_RS') { It 'Should create SqlIntegrationTestGroup group' { $group = New-LocalGroup -Name 'SqlIntegrationTestGroup' -Description 'Local Windows group for SQL integration testing.' @@ -110,7 +110,7 @@ Describe 'Prerequisites' { } } - Context 'Add local Windows users to local groups' -Tag @('Integration_SQL2016', 'Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_PowerBI') { + Context 'Add local Windows users to local groups' -Tag @('Integration_SQL2016', 'Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025', 'Integration_PowerBI') { It 'Should add SqlInstall to local administrator group' { # Add user to local administrator group Add-LocalGroupMember -Group 'Administrators' -Member 'SqlInstall' @@ -164,9 +164,17 @@ Describe 'Prerequisites' { $mediaFile.Name | Should -Be 'media.iso' } + + It 'Should download SQL Server 2025 media' -Tag @('Integration_SQL2025') { + $url = 'https://download.microsoft.com/download/4ba126fc-a6a0-4810-80e9-c0182d3e1f62/SQL2025-SSEI-EntDev.exe' + + $script:mediaFile = Save-SqlDscSqlServerMediaFile -Url $url -DestinationPath $env:TEMP -Force -Quiet -ErrorAction 'Stop' + + $mediaFile.Name | Should -Be 'media.iso' + } } - Context 'Mount SQL Server media' -Tag @('Integration_SQL2016', 'Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_PowerBI', 'Integration_SQL2017_RS', 'Integration_SQL2019_RS', 'Integration_SQL2022_RS') { + Context 'Mount SQL Server media' -Tag @('Integration_SQL2016', 'Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025', 'Integration_PowerBI', 'Integration_SQL2017_RS', 'Integration_SQL2019_RS', 'Integration_SQL2022_RS') { It 'Should mount the media to a drive letter' { $mountedImage = Mount-DiskImage -ImagePath $script:mediaFile $mountedImage | Should -BeOfType 'Microsoft.Management.Infrastructure.CimInstance' @@ -191,14 +199,14 @@ Describe 'Prerequisites' { } Context 'Install correct version of module SqlServer' { - It 'Should have the minimum required version of Microsoft.PowerShell.PSResourceGet' -Tag @('Integration_SQL2016', 'Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_PowerBI', 'Integration_SQL2017_RS', 'Integration_SQL2019_RS', 'Integration_SQL2022_RS') { + It 'Should have the minimum required version of Microsoft.PowerShell.PSResourceGet' -Tag @('Integration_SQL2016', 'Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025', 'Integration_PowerBI', 'Integration_SQL2017_RS', 'Integration_SQL2019_RS', 'Integration_SQL2022_RS') { $module = Get-Module -Name 'Microsoft.PowerShell.PSResourceGet' -ListAvailable $module.Count | Should -BeGreaterOrEqual 1 #$module.Version -ge '1.0.4.1' | Should -BeTrue } - It 'Should have a resource repository PSGallery with correct URI' -Tag @('Integration_SQL2016', 'Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_PowerBI', 'Integration_SQL2017_RS', 'Integration_SQL2019_RS', 'Integration_SQL2022_RS') { + It 'Should have a resource repository PSGallery with correct URI' -Tag @('Integration_SQL2016', 'Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025', 'Integration_PowerBI', 'Integration_SQL2017_RS', 'Integration_SQL2019_RS', 'Integration_SQL2022_RS') { $resourceRepository = Get-PSResourceRepository -Name 'PSGallery' $resourceRepository | Should -HaveCount 1 @@ -234,9 +242,24 @@ Describe 'Prerequisites' { $module | Should -HaveCount 1 $module.Version -eq '22.2.0' | Should -BeTrue } + + It 'Should install SqlServer module version 22.4.5.1' -Tag @('Integration_SQL2025') { + #Install-Module -Name 'SqlServer' -RequiredVersion '22.4.5.1' -Force -ErrorAction 'Stop' + $module = Install-PSResource -Name 'SqlServer' -Version '22.4.5.1' -Scope 'AllUsers' -TrustRepository -ErrorAction 'Stop' -Confirm:$false -PassThru + + $module | Should -HaveCount 1 + $module.Version -eq '22.4.5.1' | Should -BeTrue + } + + It 'Should have SqlServer module version 22.4.5.1 available' -Tag @('Integration_SQL2025') { + $module = Get-Module -Name 'SqlServer' -ListAvailable + + $module | Should -HaveCount 1 + $module.Version -eq '22.4.5.1' | Should -BeTrue + } } - Context 'Test PS Remoting to localhost' -Tag @('Integration_SQL2016', 'Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_PowerBI', 'Integration_SQL2017_RS', 'Integration_SQL2019_RS', 'Integration_SQL2022_RS') { + Context 'Test PS Remoting to localhost' -Tag @('Integration_SQL2016', 'Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025', 'Integration_PowerBI', 'Integration_SQL2017_RS', 'Integration_SQL2019_RS', 'Integration_SQL2022_RS') { It 'Should successfully run a command on localhost using PS Remoting' { # This is a simple test to verify that PS Remoting is working. # TODO: This fails on Appveyor, but works locally when debugging on AppVeyor. Investigate why. @@ -246,6 +269,17 @@ Describe 'Prerequisites' { } } + Context 'Ensure TLS 1.2 is enabled' -Tag @('Integration_SQL2025') -Skip { + # SQL Server 2025 installation can fail when TLS 1.2 is disabled: + # https://learn.microsoft.com/en-us/sql/sql-server/sql-server-2025-known-issues?view=sql-server-ver17#sql-server-2025-installation-fails-when-tls-12-is-disabled + It 'Should have TLS 1.2 enabled on the node' -Tag @('Integration_SQL2025') { + # Test-TlsProtocol returns $true when the protocol is enabled. + # Assert for both Server and Client registry keys. + (Test-TlsProtocol -Protocol 'Tls12') | Should -BeTrue + (Test-TlsProtocol -Protocol 'Tls12' -Client) | Should -BeTrue + } + } + Context 'Download correct SQL Server 2017 Reporting Services installation executable' { It 'Should download SQL Server 2017 Reporting Services installation executable' -Tag @('Integration_SQL2017_RS') { # Microsoft SQL Server 2017 Reporting Services (14.0.601.20 - 2023-02-14) - https://www.microsoft.com/en-us/download/details.aspx?id=55252 diff --git a/tests/Integration/Commands/Remove-SqlDscAgentAlert.Integration.Tests.ps1 b/tests/Integration/Commands/Remove-SqlDscAgentAlert.Integration.Tests.ps1 index 9603f4004b..c1452a3c41 100644 --- a/tests/Integration/Commands/Remove-SqlDscAgentAlert.Integration.Tests.ps1 +++ b/tests/Integration/Commands/Remove-SqlDscAgentAlert.Integration.Tests.ps1 @@ -31,7 +31,7 @@ BeforeAll { Import-Module -Name $script:moduleName -ErrorAction 'Stop' } -Describe 'Remove-SqlDscAgentAlert' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe 'Remove-SqlDscAgentAlert' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { # Integration tests are run on the DSCSQLTEST instance $script:sqlServerInstance = 'DSCSQLTEST' diff --git a/tests/Integration/Commands/Remove-SqlDscAgentOperator.Integration.Tests.ps1 b/tests/Integration/Commands/Remove-SqlDscAgentOperator.Integration.Tests.ps1 index 44e61ab514..6eed217159 100644 --- a/tests/Integration/Commands/Remove-SqlDscAgentOperator.Integration.Tests.ps1 +++ b/tests/Integration/Commands/Remove-SqlDscAgentOperator.Integration.Tests.ps1 @@ -40,7 +40,7 @@ AfterAll { Remove-Item -Path 'Env:\SqlServerDscCI' -ErrorAction 'SilentlyContinue' } -Describe 'Remove-SqlDscAgentOperator' -Tag 'Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022' { +Describe 'Remove-SqlDscAgentOperator' -Tag 'Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025' { BeforeAll { $mockSqlAdministratorUserName = 'SqlAdmin' # Using computer name as NetBIOS name throw exception. $mockSqlAdministratorPassword = ConvertTo-SecureString -String 'P@ssw0rd1' -AsPlainText -Force diff --git a/tests/Integration/Commands/Remove-SqlDscAudit.Integration.Tests.ps1 b/tests/Integration/Commands/Remove-SqlDscAudit.Integration.Tests.ps1 index 5f70c703bb..21fb4e0efd 100644 --- a/tests/Integration/Commands/Remove-SqlDscAudit.Integration.Tests.ps1 +++ b/tests/Integration/Commands/Remove-SqlDscAudit.Integration.Tests.ps1 @@ -31,7 +31,7 @@ BeforeAll { Import-Module -Name $script:moduleName -ErrorAction 'Stop' } -Describe 'Remove-SqlDscAudit' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe 'Remove-SqlDscAudit' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { $script:mockInstanceName = 'DSCSQLTEST' $script:mockComputerName = Get-ComputerName diff --git a/tests/Integration/Commands/Remove-SqlDscDatabase.Integration.Tests.ps1 b/tests/Integration/Commands/Remove-SqlDscDatabase.Integration.Tests.ps1 index b77d400b56..2c603266d5 100644 --- a/tests/Integration/Commands/Remove-SqlDscDatabase.Integration.Tests.ps1 +++ b/tests/Integration/Commands/Remove-SqlDscDatabase.Integration.Tests.ps1 @@ -31,7 +31,7 @@ BeforeAll { Import-Module -Name $script:moduleName -ErrorAction 'Stop' } -Describe 'Remove-SqlDscDatabase' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe 'Remove-SqlDscDatabase' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { $script:mockInstanceName = 'DSCSQLTEST' $script:mockComputerName = Get-ComputerName diff --git a/tests/Integration/Commands/Remove-SqlDscLogin.Integration.Tests.ps1 b/tests/Integration/Commands/Remove-SqlDscLogin.Integration.Tests.ps1 index e4831ce2bd..0f27eabb9c 100644 --- a/tests/Integration/Commands/Remove-SqlDscLogin.Integration.Tests.ps1 +++ b/tests/Integration/Commands/Remove-SqlDscLogin.Integration.Tests.ps1 @@ -31,7 +31,7 @@ BeforeAll { Import-Module -Name $script:moduleName -ErrorAction 'Stop' } -Describe 'Remove-SqlDscLogin' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe 'Remove-SqlDscLogin' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { $script:mockInstanceName = 'DSCSQLTEST' diff --git a/tests/Integration/Commands/Remove-SqlDscRole.Integration.Tests.ps1 b/tests/Integration/Commands/Remove-SqlDscRole.Integration.Tests.ps1 index 5c74fc82c5..9f5faff8c1 100644 --- a/tests/Integration/Commands/Remove-SqlDscRole.Integration.Tests.ps1 +++ b/tests/Integration/Commands/Remove-SqlDscRole.Integration.Tests.ps1 @@ -31,7 +31,7 @@ BeforeAll { Import-Module -Name $script:moduleName -ErrorAction 'Stop' } -Describe 'Remove-SqlDscRole' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe 'Remove-SqlDscRole' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { $script:mockInstanceName = 'DSCSQLTEST' $script:mockComputerName = Get-ComputerName diff --git a/tests/Integration/Commands/Remove-SqlDscTraceFlag.Integration.Tests.ps1 b/tests/Integration/Commands/Remove-SqlDscTraceFlag.Integration.Tests.ps1 index 9dcce1350a..7eebad9f89 100644 --- a/tests/Integration/Commands/Remove-SqlDscTraceFlag.Integration.Tests.ps1 +++ b/tests/Integration/Commands/Remove-SqlDscTraceFlag.Integration.Tests.ps1 @@ -31,7 +31,7 @@ BeforeAll { Import-Module -Name $script:moduleName -ErrorAction 'Stop' } -Describe 'Remove-SqlDscTraceFlag' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe 'Remove-SqlDscTraceFlag' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { $script:mockInstanceName = 'DSCSQLTEST' $script:mockComputerName = Get-ComputerName diff --git a/tests/Integration/Commands/Repair-SqlDscServer.Integration.Tests.ps1 b/tests/Integration/Commands/Repair-SqlDscServer.Integration.Tests.ps1 index b21fad0fa9..13a90b883e 100644 --- a/tests/Integration/Commands/Repair-SqlDscServer.Integration.Tests.ps1 +++ b/tests/Integration/Commands/Repair-SqlDscServer.Integration.Tests.ps1 @@ -39,7 +39,7 @@ BeforeAll { SQL Server setup/repair process itself (might also be related to CI environmental factors, like too few resources). #> -Describe 'Repair-SqlDscServer' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') -Skip { +Describe 'Repair-SqlDscServer' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') -Skip { BeforeAll { Write-Verbose -Message ('Running integration test as user ''{0}''.' -f $env:UserName) -Verbose diff --git a/tests/Integration/Commands/Restore-SqlDscDatabase.Integration.Tests.ps1 b/tests/Integration/Commands/Restore-SqlDscDatabase.Integration.Tests.ps1 index 46f2096fc6..a6bab9b2e6 100644 --- a/tests/Integration/Commands/Restore-SqlDscDatabase.Integration.Tests.ps1 +++ b/tests/Integration/Commands/Restore-SqlDscDatabase.Integration.Tests.ps1 @@ -31,7 +31,7 @@ BeforeAll { Import-Module -Name $script:moduleName -ErrorAction 'Stop' } -Describe 'Restore-SqlDscDatabase' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe 'Restore-SqlDscDatabase' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { $script:mockInstanceName = 'DSCSQLTEST' diff --git a/tests/Integration/Commands/Resume-SqlDscDatabase.Integration.Tests.ps1 b/tests/Integration/Commands/Resume-SqlDscDatabase.Integration.Tests.ps1 index 08803c1603..af7acf0f26 100644 --- a/tests/Integration/Commands/Resume-SqlDscDatabase.Integration.Tests.ps1 +++ b/tests/Integration/Commands/Resume-SqlDscDatabase.Integration.Tests.ps1 @@ -31,7 +31,7 @@ BeforeAll { Import-Module -Name $script:moduleName -ErrorAction 'Stop' } -Describe 'Resume-SqlDscDatabase' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe 'Resume-SqlDscDatabase' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { $script:mockInstanceName = 'DSCSQLTEST' $script:mockComputerName = Get-ComputerName diff --git a/tests/Integration/Commands/Revoke-SqlDscServerPermission.Integration.Tests.ps1 b/tests/Integration/Commands/Revoke-SqlDscServerPermission.Integration.Tests.ps1 index e429b236ac..5b85f5bd77 100644 --- a/tests/Integration/Commands/Revoke-SqlDscServerPermission.Integration.Tests.ps1 +++ b/tests/Integration/Commands/Revoke-SqlDscServerPermission.Integration.Tests.ps1 @@ -31,7 +31,7 @@ BeforeAll { Import-Module -Name $script:moduleName -ErrorAction 'Stop' } -Describe 'Revoke-SqlDscServerPermission' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe 'Revoke-SqlDscServerPermission' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { $script:mockInstanceName = 'DSCSQLTEST' diff --git a/tests/Integration/Commands/Save-SqlDscSqlServerMediaFile.Integration.Tests.ps1 b/tests/Integration/Commands/Save-SqlDscSqlServerMediaFile.Integration.Tests.ps1 index 21ea8b49d6..02f4c017ae 100644 --- a/tests/Integration/Commands/Save-SqlDscSqlServerMediaFile.Integration.Tests.ps1 +++ b/tests/Integration/Commands/Save-SqlDscSqlServerMediaFile.Integration.Tests.ps1 @@ -31,7 +31,7 @@ BeforeAll { Import-Module -Name $script:moduleName -ErrorAction 'Stop' } -Describe 'Save-SqlDscSqlServerMediaFile' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe 'Save-SqlDscSqlServerMediaFile' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { # Create a temporary directory for testing downloads $script:testDownloadPath = Join-Path -Path $env:TEMP -ChildPath "SqlDscTestDownloads_$(Get-Random)" diff --git a/tests/Integration/Commands/Set-SqlDscAgentAlert.Integration.Tests.ps1 b/tests/Integration/Commands/Set-SqlDscAgentAlert.Integration.Tests.ps1 index e5db106405..b2658c1a78 100644 --- a/tests/Integration/Commands/Set-SqlDscAgentAlert.Integration.Tests.ps1 +++ b/tests/Integration/Commands/Set-SqlDscAgentAlert.Integration.Tests.ps1 @@ -31,7 +31,7 @@ BeforeAll { Import-Module -Name $script:moduleName -ErrorAction 'Stop' } -Describe 'Set-SqlDscAgentAlert' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe 'Set-SqlDscAgentAlert' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { # Integration tests are run on the DSCSQLTEST instance $script:sqlServerInstance = 'DSCSQLTEST' diff --git a/tests/Integration/Commands/Set-SqlDscAgentOperator.Integration.Tests.ps1 b/tests/Integration/Commands/Set-SqlDscAgentOperator.Integration.Tests.ps1 index 552baa723c..f25463e160 100644 --- a/tests/Integration/Commands/Set-SqlDscAgentOperator.Integration.Tests.ps1 +++ b/tests/Integration/Commands/Set-SqlDscAgentOperator.Integration.Tests.ps1 @@ -40,7 +40,7 @@ AfterAll { Remove-Item -Path 'Env:\SqlServerDscCI' -ErrorAction 'SilentlyContinue' } -Describe 'Set-SqlDscAgentOperator' -Tag 'Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022' { +Describe 'Set-SqlDscAgentOperator' -Tag 'Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025' { BeforeAll { $mockSqlAdministratorUserName = 'SqlAdmin' # Using computer name as NetBIOS name throw exception. $mockSqlAdministratorPassword = ConvertTo-SecureString -String 'P@ssw0rd1' -AsPlainText -Force diff --git a/tests/Integration/Commands/Set-SqlDscAudit.Integration.Tests.ps1 b/tests/Integration/Commands/Set-SqlDscAudit.Integration.Tests.ps1 index 539f11b5e6..26846575fe 100644 --- a/tests/Integration/Commands/Set-SqlDscAudit.Integration.Tests.ps1 +++ b/tests/Integration/Commands/Set-SqlDscAudit.Integration.Tests.ps1 @@ -31,7 +31,7 @@ BeforeAll { Import-Module -Name $script:moduleName -ErrorAction 'Stop' } -Describe 'Set-SqlDscAudit' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe 'Set-SqlDscAudit' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { $script:mockInstanceName = 'DSCSQLTEST' $script:mockComputerName = Get-ComputerName diff --git a/tests/Integration/Commands/Set-SqlDscConfigurationOption.Integration.Tests.ps1 b/tests/Integration/Commands/Set-SqlDscConfigurationOption.Integration.Tests.ps1 index 0419a88bff..a46550ce93 100644 --- a/tests/Integration/Commands/Set-SqlDscConfigurationOption.Integration.Tests.ps1 +++ b/tests/Integration/Commands/Set-SqlDscConfigurationOption.Integration.Tests.ps1 @@ -31,7 +31,7 @@ BeforeAll { Import-Module -Name $script:moduleName -ErrorAction 'Stop' } -Describe 'Set-SqlDscConfigurationOption' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe 'Set-SqlDscConfigurationOption' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { $script:mockInstanceName = 'DSCSQLTEST' diff --git a/tests/Integration/Commands/Set-SqlDscDatabaseDefault.Integration.Tests.ps1 b/tests/Integration/Commands/Set-SqlDscDatabaseDefault.Integration.Tests.ps1 index 740dbec1d1..f2073538ae 100644 --- a/tests/Integration/Commands/Set-SqlDscDatabaseDefault.Integration.Tests.ps1 +++ b/tests/Integration/Commands/Set-SqlDscDatabaseDefault.Integration.Tests.ps1 @@ -31,7 +31,7 @@ BeforeAll { Import-Module -Name $script:moduleName -ErrorAction 'Stop' } -Describe 'Set-SqlDscDatabaseDefault' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe 'Set-SqlDscDatabaseDefault' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { $script:mockInstanceName = 'DSCSQLTEST' $script:mockComputerName = Get-ComputerName diff --git a/tests/Integration/Commands/Set-SqlDscDatabaseOwner.Integration.Tests.ps1 b/tests/Integration/Commands/Set-SqlDscDatabaseOwner.Integration.Tests.ps1 index 1ed838a135..1ebd4560b5 100644 --- a/tests/Integration/Commands/Set-SqlDscDatabaseOwner.Integration.Tests.ps1 +++ b/tests/Integration/Commands/Set-SqlDscDatabaseOwner.Integration.Tests.ps1 @@ -31,7 +31,7 @@ BeforeAll { Import-Module -Name $script:moduleName -ErrorAction 'Stop' } -Describe 'Set-SqlDscDatabaseOwner' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe 'Set-SqlDscDatabaseOwner' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { $script:mockInstanceName = 'DSCSQLTEST' $script:mockComputerName = Get-ComputerName diff --git a/tests/Integration/Commands/Set-SqlDscDatabasePermission.Integration.Tests.ps1 b/tests/Integration/Commands/Set-SqlDscDatabasePermission.Integration.Tests.ps1 index 64cfd51ce8..434f0d2527 100644 --- a/tests/Integration/Commands/Set-SqlDscDatabasePermission.Integration.Tests.ps1 +++ b/tests/Integration/Commands/Set-SqlDscDatabasePermission.Integration.Tests.ps1 @@ -31,7 +31,7 @@ BeforeAll { Import-Module -Name $script:moduleName -ErrorAction 'Stop' } -Describe 'Set-SqlDscDatabasePermission' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe 'Set-SqlDscDatabasePermission' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { $script:mockInstanceName = 'DSCSQLTEST' diff --git a/tests/Integration/Commands/Set-SqlDscDatabaseProperty.Integration.Tests.ps1 b/tests/Integration/Commands/Set-SqlDscDatabaseProperty.Integration.Tests.ps1 index b47680de68..0b132c0ee2 100644 --- a/tests/Integration/Commands/Set-SqlDscDatabaseProperty.Integration.Tests.ps1 +++ b/tests/Integration/Commands/Set-SqlDscDatabaseProperty.Integration.Tests.ps1 @@ -31,7 +31,7 @@ BeforeAll { Import-Module -Name $script:moduleName -ErrorAction 'Stop' } -Describe 'Set-SqlDscDatabaseProperty' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe 'Set-SqlDscDatabaseProperty' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { $script:mockInstanceName = 'DSCSQLTEST' $script:mockComputerName = Get-ComputerName diff --git a/tests/Integration/Commands/Set-SqlDscServerPermission.Integration.Tests.ps1 b/tests/Integration/Commands/Set-SqlDscServerPermission.Integration.Tests.ps1 index 974b0402fa..5e724e7c46 100644 --- a/tests/Integration/Commands/Set-SqlDscServerPermission.Integration.Tests.ps1 +++ b/tests/Integration/Commands/Set-SqlDscServerPermission.Integration.Tests.ps1 @@ -31,7 +31,7 @@ BeforeAll { Import-Module -Name $script:moduleName -ErrorAction 'Stop' } -Describe 'Set-SqlDscServerPermission' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe 'Set-SqlDscServerPermission' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { $script:mockInstanceName = 'DSCSQLTEST' diff --git a/tests/Integration/Commands/Set-SqlDscStartupParameter.Integration.Tests.ps1 b/tests/Integration/Commands/Set-SqlDscStartupParameter.Integration.Tests.ps1 index 199074f5fe..eca509f288 100644 --- a/tests/Integration/Commands/Set-SqlDscStartupParameter.Integration.Tests.ps1 +++ b/tests/Integration/Commands/Set-SqlDscStartupParameter.Integration.Tests.ps1 @@ -32,7 +32,7 @@ BeforeAll { } # cSpell: ignore DSCSQLTEST -Describe 'Set-SqlDscStartupParameter' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe 'Set-SqlDscStartupParameter' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { Write-Verbose -Message ('Running integration test as user ''{0}''.' -f $env:UserName) -Verbose diff --git a/tests/Integration/Commands/Set-SqlDscTraceFlag.Integration.Tests.ps1 b/tests/Integration/Commands/Set-SqlDscTraceFlag.Integration.Tests.ps1 index 792a7fea7a..d5572737dc 100644 --- a/tests/Integration/Commands/Set-SqlDscTraceFlag.Integration.Tests.ps1 +++ b/tests/Integration/Commands/Set-SqlDscTraceFlag.Integration.Tests.ps1 @@ -31,7 +31,7 @@ BeforeAll { Import-Module -Name $script:moduleName -ErrorAction 'Stop' } -Describe 'Set-SqlDscTraceFlag' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe 'Set-SqlDscTraceFlag' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { $script:mockInstanceName = 'DSCSQLTEST' $script:mockServerName = Get-ComputerName diff --git a/tests/Integration/Commands/Suspend-SqlDscDatabase.Integration.Tests.ps1 b/tests/Integration/Commands/Suspend-SqlDscDatabase.Integration.Tests.ps1 index 75a497686a..7f853df958 100644 --- a/tests/Integration/Commands/Suspend-SqlDscDatabase.Integration.Tests.ps1 +++ b/tests/Integration/Commands/Suspend-SqlDscDatabase.Integration.Tests.ps1 @@ -31,7 +31,7 @@ BeforeAll { Import-Module -Name $script:moduleName -ErrorAction 'Stop' } -Describe 'Suspend-SqlDscDatabase' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe 'Suspend-SqlDscDatabase' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { $script:mockInstanceName = 'DSCSQLTEST' $script:mockComputerName = Get-ComputerName diff --git a/tests/Integration/Commands/Test-SqlDscAgentAlertProperty.Integration.Tests.ps1 b/tests/Integration/Commands/Test-SqlDscAgentAlertProperty.Integration.Tests.ps1 index b713317fb0..2027b563fe 100644 --- a/tests/Integration/Commands/Test-SqlDscAgentAlertProperty.Integration.Tests.ps1 +++ b/tests/Integration/Commands/Test-SqlDscAgentAlertProperty.Integration.Tests.ps1 @@ -31,7 +31,7 @@ BeforeAll { Import-Module -Name $script:moduleName -ErrorAction 'Stop' } -Describe 'Test-SqlDscAgentAlertProperty' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022'){ +Describe 'Test-SqlDscAgentAlertProperty' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025'){ BeforeAll { # Integration tests are run on the DSCSQLTEST instance $script:sqlServerInstance = 'DSCSQLTEST' diff --git a/tests/Integration/Commands/Test-SqlDscBackupFile.Integration.Tests.ps1 b/tests/Integration/Commands/Test-SqlDscBackupFile.Integration.Tests.ps1 index 8adbfee484..3159d7385a 100644 --- a/tests/Integration/Commands/Test-SqlDscBackupFile.Integration.Tests.ps1 +++ b/tests/Integration/Commands/Test-SqlDscBackupFile.Integration.Tests.ps1 @@ -31,7 +31,7 @@ BeforeAll { Import-Module -Name $script:moduleName -ErrorAction 'Stop' } -Describe 'Test-SqlDscBackupFile' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe 'Test-SqlDscBackupFile' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { $script:mockInstanceName = 'DSCSQLTEST' $script:mockComputerName = Get-ComputerName diff --git a/tests/Integration/Commands/Test-SqlDscConfigurationOption.Integration.Tests.ps1 b/tests/Integration/Commands/Test-SqlDscConfigurationOption.Integration.Tests.ps1 index 25b23201d0..a5ae5d42b9 100644 --- a/tests/Integration/Commands/Test-SqlDscConfigurationOption.Integration.Tests.ps1 +++ b/tests/Integration/Commands/Test-SqlDscConfigurationOption.Integration.Tests.ps1 @@ -31,7 +31,7 @@ BeforeAll { Import-Module -Name $script:moduleName -ErrorAction 'Stop' } -Describe 'Test-SqlDscConfigurationOption' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe 'Test-SqlDscConfigurationOption' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { $script:mockInstanceName = 'DSCSQLTEST' diff --git a/tests/Integration/Commands/Test-SqlDscDatabaseProperty.Integration.Tests.ps1 b/tests/Integration/Commands/Test-SqlDscDatabaseProperty.Integration.Tests.ps1 index 20817c2c7d..4ce3a884d3 100644 --- a/tests/Integration/Commands/Test-SqlDscDatabaseProperty.Integration.Tests.ps1 +++ b/tests/Integration/Commands/Test-SqlDscDatabaseProperty.Integration.Tests.ps1 @@ -137,7 +137,7 @@ BeforeAll { Import-Module -Name $script:moduleName -ErrorAction 'Stop' } -Describe 'Test-SqlDscDatabaseProperty' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe 'Test-SqlDscDatabaseProperty' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { $script:mockInstanceName = 'DSCSQLTEST' $script:mockComputerName = Get-ComputerName diff --git a/tests/Integration/Commands/Test-SqlDscIsAgentAlert.Integration.Tests.ps1 b/tests/Integration/Commands/Test-SqlDscIsAgentAlert.Integration.Tests.ps1 index f0fe48ab12..a0f0d1031f 100644 --- a/tests/Integration/Commands/Test-SqlDscIsAgentAlert.Integration.Tests.ps1 +++ b/tests/Integration/Commands/Test-SqlDscIsAgentAlert.Integration.Tests.ps1 @@ -31,7 +31,7 @@ BeforeAll { Import-Module -Name $script:moduleName -ErrorAction 'Stop' } -Describe 'Test-SqlDscIsAgentAlert' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022'){ +Describe 'Test-SqlDscIsAgentAlert' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025'){ BeforeAll { # Integration tests are run on the DSCSQLTEST instance $script:sqlServerInstance = 'DSCSQLTEST' diff --git a/tests/Integration/Commands/Test-SqlDscIsAgentOperator.Integration.Tests.ps1 b/tests/Integration/Commands/Test-SqlDscIsAgentOperator.Integration.Tests.ps1 index a35f2e9a7d..62ab86338e 100644 --- a/tests/Integration/Commands/Test-SqlDscIsAgentOperator.Integration.Tests.ps1 +++ b/tests/Integration/Commands/Test-SqlDscIsAgentOperator.Integration.Tests.ps1 @@ -40,7 +40,7 @@ AfterAll { $env:SqlServerDscCI = $null } -Describe 'Test-SqlDscIsAgentOperator' -Tag 'Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022' { +Describe 'Test-SqlDscIsAgentOperator' -Tag 'Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025' { BeforeAll { $mockSqlAdministratorUserName = 'SqlAdmin' # Using computer name as NetBIOS name throw exception. $mockSqlAdministratorPassword = ConvertTo-SecureString -String 'P@ssw0rd1' -AsPlainText -Force diff --git a/tests/Integration/Commands/Test-SqlDscIsDatabase.Integration.Tests.ps1 b/tests/Integration/Commands/Test-SqlDscIsDatabase.Integration.Tests.ps1 index 72a55b4cfb..0eeb4c2fd3 100644 --- a/tests/Integration/Commands/Test-SqlDscIsDatabase.Integration.Tests.ps1 +++ b/tests/Integration/Commands/Test-SqlDscIsDatabase.Integration.Tests.ps1 @@ -31,7 +31,7 @@ BeforeAll { Import-Module -Name $script:moduleName -ErrorAction 'Stop' } -Describe 'Test-SqlDscIsDatabase' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe 'Test-SqlDscIsDatabase' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { $script:mockInstanceName = 'DSCSQLTEST' diff --git a/tests/Integration/Commands/Test-SqlDscIsDatabasePrincipal.Integration.Tests.ps1 b/tests/Integration/Commands/Test-SqlDscIsDatabasePrincipal.Integration.Tests.ps1 index 051239f70f..d9c4dc7215 100644 --- a/tests/Integration/Commands/Test-SqlDscIsDatabasePrincipal.Integration.Tests.ps1 +++ b/tests/Integration/Commands/Test-SqlDscIsDatabasePrincipal.Integration.Tests.ps1 @@ -31,7 +31,7 @@ BeforeAll { Import-Module -Name $script:moduleName -ErrorAction 'Stop' } -Describe 'Test-SqlDscIsDatabasePrincipal' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe 'Test-SqlDscIsDatabasePrincipal' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { $script:mockInstanceName = 'DSCSQLTEST' diff --git a/tests/Integration/Commands/Test-SqlDscIsLogin.Integration.Tests.ps1 b/tests/Integration/Commands/Test-SqlDscIsLogin.Integration.Tests.ps1 index 0a8b544203..3bce73574b 100644 --- a/tests/Integration/Commands/Test-SqlDscIsLogin.Integration.Tests.ps1 +++ b/tests/Integration/Commands/Test-SqlDscIsLogin.Integration.Tests.ps1 @@ -31,7 +31,7 @@ BeforeAll { Import-Module -Name $script:moduleName -ErrorAction 'Stop' } -Describe 'Test-SqlDscIsLogin' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe 'Test-SqlDscIsLogin' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { $script:mockInstanceName = 'DSCSQLTEST' diff --git a/tests/Integration/Commands/Test-SqlDscIsLoginEnabled.Integration.Tests.ps1 b/tests/Integration/Commands/Test-SqlDscIsLoginEnabled.Integration.Tests.ps1 index 540189444b..e7f96045de 100644 --- a/tests/Integration/Commands/Test-SqlDscIsLoginEnabled.Integration.Tests.ps1 +++ b/tests/Integration/Commands/Test-SqlDscIsLoginEnabled.Integration.Tests.ps1 @@ -31,7 +31,7 @@ BeforeAll { Import-Module -Name $script:moduleName -ErrorAction 'Stop' } -Describe 'Test-SqlDscIsLoginEnabled' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe 'Test-SqlDscIsLoginEnabled' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { $script:mockInstanceName = 'DSCSQLTEST' diff --git a/tests/Integration/Commands/Test-SqlDscIsRole.Integration.Tests.ps1 b/tests/Integration/Commands/Test-SqlDscIsRole.Integration.Tests.ps1 index 8cf7b2a315..adf968015e 100644 --- a/tests/Integration/Commands/Test-SqlDscIsRole.Integration.Tests.ps1 +++ b/tests/Integration/Commands/Test-SqlDscIsRole.Integration.Tests.ps1 @@ -31,7 +31,7 @@ BeforeAll { Import-Module -Name $script:moduleName -ErrorAction 'Stop' } -Describe 'Test-SqlDscIsRole' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe 'Test-SqlDscIsRole' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { $script:mockInstanceName = 'DSCSQLTEST' diff --git a/tests/Integration/Commands/Test-SqlDscIsSupportedFeature.Integration.Tests.ps1 b/tests/Integration/Commands/Test-SqlDscIsSupportedFeature.Integration.Tests.ps1 index f7059bdabc..ff9ac2faf8 100644 --- a/tests/Integration/Commands/Test-SqlDscIsSupportedFeature.Integration.Tests.ps1 +++ b/tests/Integration/Commands/Test-SqlDscIsSupportedFeature.Integration.Tests.ps1 @@ -31,10 +31,10 @@ BeforeAll { Import-Module -Name $script:moduleName -ErrorAction 'Stop' } -Describe 'Test-SqlDscIsSupportedFeature' -Tag @('Integration_SQL2016', 'Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe 'Test-SqlDscIsSupportedFeature' -Tag @('Integration_SQL2016', 'Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { Context 'When testing supported features for different SQL Server versions' { It 'Should return $true for SQLENGINE feature across all major versions' { - $testVersions = @('10', '11', '12', '13', '14', '15', '16') + $testVersions = @('10', '11', '12', '13', '14', '15', '16', '17') foreach ($version in $testVersions) { $result = Test-SqlDscIsSupportedFeature -Feature 'SQLENGINE' -ProductVersion $version -ErrorAction 'Stop' @@ -123,6 +123,15 @@ Describe 'Test-SqlDscIsSupportedFeature' -Tag @('Integration_SQL2016', 'Integrat $resultLower | Should -BeTrue } + It 'Should return $false for discontinued features DQ/DQC/MDS in SQL Server 2025 (version 17)' { + $discontinuedFeatures = @('DQ', 'DQC', 'MDS') + + foreach ($feature in $discontinuedFeatures) { + $result = Test-SqlDscIsSupportedFeature -Feature $feature -ProductVersion '17' -ErrorAction 'Stop' + $result | Should -BeFalse -Because "$feature is discontinued in SQL Server 2025" + } + } + It 'Should handle very high version numbers' { $result = Test-SqlDscIsSupportedFeature -Feature 'SQLENGINE' -ProductVersion '999' -ErrorAction 'Stop' $result | Should -BeTrue -Because "SQLENGINE should be supported in future versions" diff --git a/tests/Integration/Commands/Test-SqlDscServerPermission.Integration.Tests.ps1 b/tests/Integration/Commands/Test-SqlDscServerPermission.Integration.Tests.ps1 index 9de28860be..7bc80479cb 100644 --- a/tests/Integration/Commands/Test-SqlDscServerPermission.Integration.Tests.ps1 +++ b/tests/Integration/Commands/Test-SqlDscServerPermission.Integration.Tests.ps1 @@ -31,7 +31,7 @@ BeforeAll { Import-Module -Name $script:moduleName -ErrorAction 'Stop' } -Describe 'Test-SqlDscServerPermission' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe 'Test-SqlDscServerPermission' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { $script:mockInstanceName = 'DSCSQLTEST' diff --git a/tests/Integration/Commands/Uninstall-SqlDscServer.Integration.Tests.ps1 b/tests/Integration/Commands/Uninstall-SqlDscServer.Integration.Tests.ps1 index 1892d0187c..2b792010fc 100644 --- a/tests/Integration/Commands/Uninstall-SqlDscServer.Integration.Tests.ps1 +++ b/tests/Integration/Commands/Uninstall-SqlDscServer.Integration.Tests.ps1 @@ -32,7 +32,7 @@ BeforeAll { } # cSpell: ignore DSCSQLTEST -Describe 'Uninstall-SqlDscServer' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe 'Uninstall-SqlDscServer' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { Write-Verbose -Message ('Running integration test as user ''{0}''.' -f $env:UserName) -Verbose } diff --git a/tests/Integration/Commands/Update-SqlDscServer.Integration.Tests.ps1 b/tests/Integration/Commands/Update-SqlDscServer.Integration.Tests.ps1 index 8240cbe1b8..20da5c646c 100644 --- a/tests/Integration/Commands/Update-SqlDscServer.Integration.Tests.ps1 +++ b/tests/Integration/Commands/Update-SqlDscServer.Integration.Tests.ps1 @@ -31,7 +31,7 @@ BeforeAll { Import-Module -Name $script:moduleName -ErrorAction 'Stop' } -Describe 'Update-SqlDscServer' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe 'Update-SqlDscServer' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { $computerName = Get-ComputerName Write-Verbose -Message ("Running integration test as user '{0}' on computer '{1}'." -f $env:UserName, $computerName) -Verbose diff --git a/tests/Integration/Commands/Update-SqlDscServerEdition.Integration.Tests.ps1 b/tests/Integration/Commands/Update-SqlDscServerEdition.Integration.Tests.ps1 index 289ccc055c..0449d2e303 100644 --- a/tests/Integration/Commands/Update-SqlDscServerEdition.Integration.Tests.ps1 +++ b/tests/Integration/Commands/Update-SqlDscServerEdition.Integration.Tests.ps1 @@ -31,7 +31,7 @@ BeforeAll { Import-Module -Name $script:moduleName -ErrorAction 'Stop' } -Describe 'Update-SqlDscServerEdition' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe 'Update-SqlDscServerEdition' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { $computerName = Get-ComputerName Write-Verbose -Message ("Running integration test as user '{0}' on computer '{1}'." -f $env:UserName, $computerName) -Verbose diff --git a/tests/Integration/Private/ConvertTo-AuditNewParameterSet.Integration.Tests.ps1 b/tests/Integration/Private/ConvertTo-AuditNewParameterSet.Integration.Tests.ps1 index 4490f427f2..d206dd3b5c 100644 --- a/tests/Integration/Private/ConvertTo-AuditNewParameterSet.Integration.Tests.ps1 +++ b/tests/Integration/Private/ConvertTo-AuditNewParameterSet.Integration.Tests.ps1 @@ -37,7 +37,7 @@ AfterAll { $PSDefaultParameterValues.Remove('InModuleScope:ModuleName') } -Describe 'ConvertTo-AuditNewParameterSet' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe 'ConvertTo-AuditNewParameterSet' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { $script:mockInstanceName = 'DSCSQLTEST' $script:mockComputerName = Get-ComputerName diff --git a/tests/Integration/Resources/DSC_SqlAgentAlert.Integration.Tests.ps1 b/tests/Integration/Resources/DSC_SqlAgentAlert.Integration.Tests.ps1 index 50974c753b..fa00c74665 100644 --- a/tests/Integration/Resources/DSC_SqlAgentAlert.Integration.Tests.ps1 +++ b/tests/Integration/Resources/DSC_SqlAgentAlert.Integration.Tests.ps1 @@ -50,7 +50,7 @@ AfterAll { Restore-TestEnvironment -TestEnvironment $script:testEnvironment } -Describe "_Integration" -Tag @('Integration_SQL2016', 'Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe "_Integration" -Tag @('Integration_SQL2016', 'Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { $resourceId = "[$($script:dscResourceFriendlyName)]Integration_Test" } diff --git a/tests/Integration/Resources/DSC_SqlAgentFailsafe.Integration.Tests.ps1 b/tests/Integration/Resources/DSC_SqlAgentFailsafe.Integration.Tests.ps1 index 5ea422cec0..390cadf1e1 100644 --- a/tests/Integration/Resources/DSC_SqlAgentFailsafe.Integration.Tests.ps1 +++ b/tests/Integration/Resources/DSC_SqlAgentFailsafe.Integration.Tests.ps1 @@ -50,7 +50,7 @@ AfterAll { Restore-TestEnvironment -TestEnvironment $script:testEnvironment } -Describe "$($script:dscResourceName)_Integration" -Tag @('Integration_SQL2016', 'Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe "$($script:dscResourceName)_Integration" -Tag @('Integration_SQL2016', 'Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { $resourceId = "[$($script:dscResourceFriendlyName)]Integration_Test" } diff --git a/tests/Integration/Resources/DSC_SqlAgentOperator.Integration.Tests.ps1 b/tests/Integration/Resources/DSC_SqlAgentOperator.Integration.Tests.ps1 index edc19fe850..7532dae44d 100644 --- a/tests/Integration/Resources/DSC_SqlAgentOperator.Integration.Tests.ps1 +++ b/tests/Integration/Resources/DSC_SqlAgentOperator.Integration.Tests.ps1 @@ -50,7 +50,7 @@ AfterAll { Restore-TestEnvironment -TestEnvironment $script:testEnvironment } -Describe "$($script:dscResourceName)_Integration" -Tag @('Integration_SQL2016', 'Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe "$($script:dscResourceName)_Integration" -Tag @('Integration_SQL2016', 'Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { $resourceId = "[$($script:dscResourceFriendlyName)]Integration_Test" } diff --git a/tests/Integration/Resources/DSC_SqlAlwaysOnService.Integration.Tests.ps1 b/tests/Integration/Resources/DSC_SqlAlwaysOnService.Integration.Tests.ps1 index 999d5f5c5d..ad3a99c3c3 100644 --- a/tests/Integration/Resources/DSC_SqlAlwaysOnService.Integration.Tests.ps1 +++ b/tests/Integration/Resources/DSC_SqlAlwaysOnService.Integration.Tests.ps1 @@ -70,7 +70,7 @@ AfterAll { TODO: This has temporarily been disabled as the test is not passing. Tags should be changed to @('Integration_SQL2016', 'Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') #> -Describe "$($script:dscResourceName)_Integration" -Tag 'Skip' { +Describe "$($script:dscResourceName)_Integration" -Skip { BeforeAll { $resourceId = "[$($script:dscResourceFriendlyName)]Integration_Test" } diff --git a/tests/Integration/Resources/DSC_SqlAudit.Integration.Tests.ps1 b/tests/Integration/Resources/DSC_SqlAudit.Integration.Tests.ps1 index de8dcd2b1b..d8f3484852 100644 --- a/tests/Integration/Resources/DSC_SqlAudit.Integration.Tests.ps1 +++ b/tests/Integration/Resources/DSC_SqlAudit.Integration.Tests.ps1 @@ -50,7 +50,7 @@ AfterAll { Restore-TestEnvironment -TestEnvironment $script:testEnvironment } -Describe "$($script:dscResourceName)_Integration" -Tag @('Integration_SQL2016', 'Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe "$($script:dscResourceName)_Integration" -Tag @('Integration_SQL2016', 'Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { $resourceId = "[$($script:dscResourceFriendlyName)]Integration_Test" } diff --git a/tests/Integration/Resources/DSC_SqlDatabase.Integration.Tests.ps1 b/tests/Integration/Resources/DSC_SqlDatabase.Integration.Tests.ps1 index e47b43dbb1..c8af44d544 100644 --- a/tests/Integration/Resources/DSC_SqlDatabase.Integration.Tests.ps1 +++ b/tests/Integration/Resources/DSC_SqlDatabase.Integration.Tests.ps1 @@ -50,7 +50,7 @@ AfterAll { Restore-TestEnvironment -TestEnvironment $script:testEnvironment } -Describe "$($script:dscResourceName)_Integration" -Tag @('Integration_SQL2016', 'Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe "$($script:dscResourceName)_Integration" -Tag @('Integration_SQL2016', 'Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { $resourceId = "[$($script:dscResourceFriendlyName)]Integration_Test" } diff --git a/tests/Integration/Resources/DSC_SqlDatabaseDefaultLocation.Integration.Tests.ps1 b/tests/Integration/Resources/DSC_SqlDatabaseDefaultLocation.Integration.Tests.ps1 index ad97d9ef30..346604c13e 100644 --- a/tests/Integration/Resources/DSC_SqlDatabaseDefaultLocation.Integration.Tests.ps1 +++ b/tests/Integration/Resources/DSC_SqlDatabaseDefaultLocation.Integration.Tests.ps1 @@ -50,7 +50,7 @@ AfterAll { Restore-TestEnvironment -TestEnvironment $script:testEnvironment } -Describe "$($script:dscResourceName)_Integration" -Tag @('Integration_SQL2016', 'Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe "$($script:dscResourceName)_Integration" -Tag @('Integration_SQL2016', 'Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { $resourceId = "[$($script:dscResourceFriendlyName)]Integration_Test" } diff --git a/tests/Integration/Resources/DSC_SqlDatabaseMail.Integration.Tests.ps1 b/tests/Integration/Resources/DSC_SqlDatabaseMail.Integration.Tests.ps1 index de2e53b4c5..b47b78b141 100644 --- a/tests/Integration/Resources/DSC_SqlDatabaseMail.Integration.Tests.ps1 +++ b/tests/Integration/Resources/DSC_SqlDatabaseMail.Integration.Tests.ps1 @@ -50,7 +50,7 @@ AfterAll { Restore-TestEnvironment -TestEnvironment $script:testEnvironment } -Describe "$($script:dscResourceName)_Integration" -Tag @('Integration_SQL2016', 'Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe "$($script:dscResourceName)_Integration" -Tag @('Integration_SQL2016', 'Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { $resourceId = "[$($script:dscResourceFriendlyName)]Integration_Test" } diff --git a/tests/Integration/Resources/DSC_SqlDatabaseObjectPermission.Integration.Tests.ps1 b/tests/Integration/Resources/DSC_SqlDatabaseObjectPermission.Integration.Tests.ps1 index 45b3e44fc2..c328df1a8c 100644 --- a/tests/Integration/Resources/DSC_SqlDatabaseObjectPermission.Integration.Tests.ps1 +++ b/tests/Integration/Resources/DSC_SqlDatabaseObjectPermission.Integration.Tests.ps1 @@ -50,7 +50,7 @@ AfterAll { Restore-TestEnvironment -TestEnvironment $script:testEnvironment } -Describe "$($script:dscResourceName)_Integration" -Tag @('Integration_SQL2016', 'Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe "$($script:dscResourceName)_Integration" -Tag @('Integration_SQL2016', 'Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { $resourceId = "[$($script:dscResourceFriendlyName)]Integration_Test" } diff --git a/tests/Integration/Resources/DSC_SqlDatabasePermission.Integration.Tests.ps1 b/tests/Integration/Resources/DSC_SqlDatabasePermission.Integration.Tests.ps1 index 70fce2930a..7ce3cede48 100644 --- a/tests/Integration/Resources/DSC_SqlDatabasePermission.Integration.Tests.ps1 +++ b/tests/Integration/Resources/DSC_SqlDatabasePermission.Integration.Tests.ps1 @@ -51,7 +51,7 @@ AfterAll { Restore-TestEnvironment -TestEnvironment $script:testEnvironment } -Describe "$($script:dscResourceName)_Integration" -Tag @('Integration_SQL2016', 'Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe "$($script:dscResourceName)_Integration" -Tag @('Integration_SQL2016', 'Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { $resourceId = "[$($script:dscResourceFriendlyName)]Integration_Test" } diff --git a/tests/Integration/Resources/DSC_SqlDatabaseUser.Integration.Tests.ps1 b/tests/Integration/Resources/DSC_SqlDatabaseUser.Integration.Tests.ps1 index fe8a239ad7..4048c38fa6 100644 --- a/tests/Integration/Resources/DSC_SqlDatabaseUser.Integration.Tests.ps1 +++ b/tests/Integration/Resources/DSC_SqlDatabaseUser.Integration.Tests.ps1 @@ -50,7 +50,7 @@ AfterAll { Restore-TestEnvironment -TestEnvironment $script:testEnvironment } -Describe "$($script:dscResourceName)_Integration" -Tag @('Integration_SQL2016', 'Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe "$($script:dscResourceName)_Integration" -Tag @('Integration_SQL2016', 'Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { $resourceId = "[$($script:dscResourceFriendlyName)]Integration_Test" } diff --git a/tests/Integration/Resources/DSC_SqlEndpoint.Integration.Tests.ps1 b/tests/Integration/Resources/DSC_SqlEndpoint.Integration.Tests.ps1 index bba0706669..0ebc78770b 100644 --- a/tests/Integration/Resources/DSC_SqlEndpoint.Integration.Tests.ps1 +++ b/tests/Integration/Resources/DSC_SqlEndpoint.Integration.Tests.ps1 @@ -50,7 +50,7 @@ AfterAll { Restore-TestEnvironment -TestEnvironment $script:testEnvironment } -Describe "$($script:dscResourceName)_Integration" -Tag @('Integration_SQL2016', 'Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe "$($script:dscResourceName)_Integration" -Tag @('Integration_SQL2016', 'Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { $resourceId = "[$($script:dscResourceFriendlyName)]Integration_Test" } diff --git a/tests/Integration/Resources/DSC_SqlLogin.Integration.Tests.ps1 b/tests/Integration/Resources/DSC_SqlLogin.Integration.Tests.ps1 index 8598fc55bc..ff68c7d006 100644 --- a/tests/Integration/Resources/DSC_SqlLogin.Integration.Tests.ps1 +++ b/tests/Integration/Resources/DSC_SqlLogin.Integration.Tests.ps1 @@ -50,7 +50,7 @@ AfterAll { Restore-TestEnvironment -TestEnvironment $script:testEnvironment } -Describe "$($script:dscResourceName)_Integration" -Tag @('Integration_SQL2016', 'Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe "$($script:dscResourceName)_Integration" -Tag @('Integration_SQL2016', 'Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { $resourceId = "[$($script:dscResourceFriendlyName)]Integration_Test" } diff --git a/tests/Integration/Resources/DSC_SqlPermission.Integration.Tests.ps1 b/tests/Integration/Resources/DSC_SqlPermission.Integration.Tests.ps1 index 8a485b1199..0e4dbd20a9 100644 --- a/tests/Integration/Resources/DSC_SqlPermission.Integration.Tests.ps1 +++ b/tests/Integration/Resources/DSC_SqlPermission.Integration.Tests.ps1 @@ -51,7 +51,7 @@ AfterAll { Restore-TestEnvironment -TestEnvironment $script:testEnvironment } -Describe "$($script:dscResourceName)_Integration" -Tag @('Integration_SQL2016', 'Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe "$($script:dscResourceName)_Integration" -Tag @('Integration_SQL2016', 'Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { $resourceId = "[$($script:dscResourceFriendlyName)]Integration_Test" } diff --git a/tests/Integration/Resources/DSC_SqlProtocol.Integration.Tests.ps1 b/tests/Integration/Resources/DSC_SqlProtocol.Integration.Tests.ps1 index efe96c200e..9d0734d0ba 100644 --- a/tests/Integration/Resources/DSC_SqlProtocol.Integration.Tests.ps1 +++ b/tests/Integration/Resources/DSC_SqlProtocol.Integration.Tests.ps1 @@ -50,7 +50,7 @@ AfterAll { Restore-TestEnvironment -TestEnvironment $script:testEnvironment } -Describe "$($script:dscResourceName)_Integration" -Tag @('Integration_SQL2016', 'Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe "$($script:dscResourceName)_Integration" -Tag @('Integration_SQL2016', 'Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { $resourceId = "[$($script:dscResourceFriendlyName)]Integration_Test" } diff --git a/tests/Integration/Resources/DSC_SqlProtocolTcpIp.Integration.Tests.ps1 b/tests/Integration/Resources/DSC_SqlProtocolTcpIp.Integration.Tests.ps1 index 7194dc0047..fb8ed34ada 100644 --- a/tests/Integration/Resources/DSC_SqlProtocolTcpIp.Integration.Tests.ps1 +++ b/tests/Integration/Resources/DSC_SqlProtocolTcpIp.Integration.Tests.ps1 @@ -50,7 +50,7 @@ AfterAll { Restore-TestEnvironment -TestEnvironment $script:testEnvironment } -Describe "$($script:dscResourceName)_Integration" -Tag @('Integration_SQL2016', 'Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe "$($script:dscResourceName)_Integration" -Tag @('Integration_SQL2016', 'Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { $resourceId = "[$($script:dscResourceFriendlyName)]Integration_Test" } diff --git a/tests/Integration/Resources/DSC_SqlReplication.Integration.Tests.ps1 b/tests/Integration/Resources/DSC_SqlReplication.Integration.Tests.ps1 index cb5601048d..b6d225fdcf 100644 --- a/tests/Integration/Resources/DSC_SqlReplication.Integration.Tests.ps1 +++ b/tests/Integration/Resources/DSC_SqlReplication.Integration.Tests.ps1 @@ -50,7 +50,7 @@ AfterAll { Restore-TestEnvironment -TestEnvironment $script:testEnvironment } -Describe "$($script:dscResourceName)_Integration" -Tag @('Integration_SQL2016', 'Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe "$($script:dscResourceName)_Integration" -Tag @('Integration_SQL2016', 'Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { $resourceId = "[$($script:dscResourceFriendlyName)]Integration_Test" } diff --git a/tests/Integration/Resources/DSC_SqlRole.Integration.Tests.ps1 b/tests/Integration/Resources/DSC_SqlRole.Integration.Tests.ps1 index 0cc7eceb83..30f227c349 100644 --- a/tests/Integration/Resources/DSC_SqlRole.Integration.Tests.ps1 +++ b/tests/Integration/Resources/DSC_SqlRole.Integration.Tests.ps1 @@ -50,7 +50,7 @@ AfterAll { Restore-TestEnvironment -TestEnvironment $script:testEnvironment } -Describe "$($script:dscResourceName)_Integration" -Tag @('Integration_SQL2016', 'Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe "$($script:dscResourceName)_Integration" -Tag @('Integration_SQL2016', 'Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { $resourceId = "[$($script:dscResourceFriendlyName)]Integration_Test" } diff --git a/tests/Integration/Resources/DSC_SqlScript.Integration.Tests.ps1 b/tests/Integration/Resources/DSC_SqlScript.Integration.Tests.ps1 index 819387f6df..0280fb4ba4 100644 --- a/tests/Integration/Resources/DSC_SqlScript.Integration.Tests.ps1 +++ b/tests/Integration/Resources/DSC_SqlScript.Integration.Tests.ps1 @@ -50,7 +50,7 @@ AfterAll { Restore-TestEnvironment -TestEnvironment $script:testEnvironment } -Describe "$($script:dscResourceName)_Integration" -Tag @('Integration_SQL2016', 'Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe "$($script:dscResourceName)_Integration" -Tag @('Integration_SQL2016', 'Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { $resourceId = "[$($script:dscResourceFriendlyName)]Integration_Test" } diff --git a/tests/Integration/Resources/DSC_SqlScriptQuery.Integration.Tests.ps1 b/tests/Integration/Resources/DSC_SqlScriptQuery.Integration.Tests.ps1 index 91269d67f8..9914a06454 100644 --- a/tests/Integration/Resources/DSC_SqlScriptQuery.Integration.Tests.ps1 +++ b/tests/Integration/Resources/DSC_SqlScriptQuery.Integration.Tests.ps1 @@ -50,7 +50,7 @@ AfterAll { Restore-TestEnvironment -TestEnvironment $script:testEnvironment } -Describe "$($script:dscResourceName)_Integration" -Tag @('Integration_SQL2016', 'Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe "$($script:dscResourceName)_Integration" -Tag @('Integration_SQL2016', 'Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { $resourceId = "[$($script:dscResourceFriendlyName)]Integration_Test" } diff --git a/tests/Integration/Resources/DSC_SqlSecureConnection.Integration.Tests.ps1 b/tests/Integration/Resources/DSC_SqlSecureConnection.Integration.Tests.ps1 index 6a19a8f6cf..44b7a93c38 100644 --- a/tests/Integration/Resources/DSC_SqlSecureConnection.Integration.Tests.ps1 +++ b/tests/Integration/Resources/DSC_SqlSecureConnection.Integration.Tests.ps1 @@ -64,7 +64,7 @@ AfterAll { Get-Module -Name 'CommonTestHelper' -All | Remove-Module -Force } -Describe "$($script:dscResourceName)_Integration" -Tag @('Integration_SQL2016', 'Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe "$($script:dscResourceName)_Integration" -Tag @('Integration_SQL2016', 'Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { # 'Integration_SQL2025' BeforeAll { $resourceId = "[$($script:dscResourceFriendlyName)]Integration_Test" } diff --git a/tests/Integration/Resources/DSC_SqlServiceAccount.Integration.Tests.ps1 b/tests/Integration/Resources/DSC_SqlServiceAccount.Integration.Tests.ps1 index 5e46f0f367..016420b4d3 100644 --- a/tests/Integration/Resources/DSC_SqlServiceAccount.Integration.Tests.ps1 +++ b/tests/Integration/Resources/DSC_SqlServiceAccount.Integration.Tests.ps1 @@ -59,7 +59,7 @@ AfterAll { Restore-TestEnvironment -TestEnvironment $script:testEnvironment } -Describe "$($script:dscResourceName)_Integration" -Tag @('Integration_SQL2016', 'Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe "$($script:dscResourceName)_Integration" -Tag @('Integration_SQL2016', 'Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { $resourceId = "[$($script:dscResourceFriendlyName)]Integration_Test" } diff --git a/tests/Integration/Resources/DSC_SqlSetup.Integration.Tests.ps1 b/tests/Integration/Resources/DSC_SqlSetup.Integration.Tests.ps1 index 715bc38099..7eb1847564 100644 --- a/tests/Integration/Resources/DSC_SqlSetup.Integration.Tests.ps1 +++ b/tests/Integration/Resources/DSC_SqlSetup.Integration.Tests.ps1 @@ -88,7 +88,12 @@ BeforeAll { The actual download URL can easiest be found in the browser download history. #> - if (Test-ContinuousIntegrationTaskCategory -Category 'Integration_SQL2022', 'Integration_PowerBI') + if (Test-ContinuousIntegrationTaskCategory -Category 'Integration_SQL2025') + { + $script:sqlVersion = '170' + $script:mockSourceDownloadExeUrl = 'https://download.microsoft.com/download/4ba126fc-a6a0-4810-80e9-c0182d3e1f62/SQL2025-SSEI-EntDev.exe' + } + elseif (Test-ContinuousIntegrationTaskCategory -Category 'Integration_SQL2022', 'Integration_PowerBI') { $script:sqlVersion = '160' $script:mockSourceDownloadExeUrl = 'https://download.microsoft.com/download/c/c/9/cc9c6797-383c-4b24-8920-dc057c1de9d3/SQL2022-SSEI-Dev.exe' @@ -174,7 +179,7 @@ AfterAll { Get-Module -Name 'CommonTestHelper' -All | Remove-Module -Force } -Describe "$($script:dscResourceName)_Integration" -Tag @('Integration_SQL2016', 'Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_PowerBI') { +Describe "$($script:dscResourceName)_Integration" -Tag @('Integration_SQL2016', 'Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025', 'Integration_PowerBI') { BeforeAll { $resourceId = "[$($script:dscResourceFriendlyName)]Integration_Test" } @@ -250,6 +255,17 @@ Describe "$($script:dscResourceName)_Integration" -Tag @('Integration_SQL2016', } } + Context 'Ensure TLS 1.2 is enabled' -Tag @('Integration_SQL2025') -Skip { + # SQL Server 2025 installation can fail when TLS 1.2 is disabled: + # https://learn.microsoft.com/en-us/sql/sql-server/sql-server-2025-known-issues?view=sql-server-ver17#sql-server-2025-installation-fails-when-tls-12-is-disabled + It 'Should have TLS 1.2 enabled on the node' -Tag @('Integration_SQL2025') { + # Test-TlsProtocol returns $true when the protocol is enabled. + # Assert for both Server and Client registry keys. + (Test-TlsProtocol -Protocol 'Tls12') | Should -BeTrue + (Test-TlsProtocol -Protocol 'Tls12' -Client) | Should -BeTrue + } + } + Context ('When using configuration <_>') -ForEach @( "$($script:dscResourceName)_InstallDatabaseEngineNamedInstanceAsSystem_Config" ) -Skip:$(if ($env:SKIP_DATABASE_ENGINE_INSTANCE) { $true } else { $false }) { @@ -637,7 +653,7 @@ Describe "$($script:dscResourceName)_Integration" -Tag @('Integration_SQL2016', $resourceCurrentState.FailoverClusterIPAddress | Should -BeNullOrEmpty $resourceCurrentState.FailoverClusterNetworkName | Should -BeNullOrEmpty - if ($script:sqlVersion -in (160)) + if ($script:sqlVersion -in @('160','170')) { <# The features CONN, BC, SDK is no longer supported after SQL Server 2019. @@ -797,7 +813,7 @@ Describe "$($script:dscResourceName)_Integration" -Tag @('Integration_SQL2016', $resourceCurrentState.FailoverClusterIPAddress | Should -BeNullOrEmpty $resourceCurrentState.FailoverClusterNetworkName | Should -BeNullOrEmpty - if ($script:sqlVersion -in (160)) + if ($script:sqlVersion -in @('160','170')) { <# The features CONN, BC, SDK is no longer supported after SQL Server 2019. diff --git a/tests/Integration/Resources/DSC_SqlSetup.config.ps1 b/tests/Integration/Resources/DSC_SqlSetup.config.ps1 index 6aaecea61e..31d99935ee 100644 --- a/tests/Integration/Resources/DSC_SqlSetup.config.ps1 +++ b/tests/Integration/Resources/DSC_SqlSetup.config.ps1 @@ -22,6 +22,25 @@ else #> switch ($script:sqlVersion) { + '170' + { + $versionSpecificData = @{ + SqlServerInstanceIdPrefix = 'MSSQL17' + AnalysisServiceInstanceIdPrefix = 'MSAS17' + IsoImageName = 'SQL2025.iso' + + # Additional variables required as ISO is downloaded via additional EXE + DownloadExeName = 'SQL2025_Download.exe' + DownloadIsoName = 'SQLServer2025-x64-ENU-EntDev.iso' + + # Features CONN, BC, SDK, SNAC_SDK, DREPLAY_CLT, DREPLAY_CTLR are no longer supported in 2025. + SupportedFeatures = 'SQLENGINE,REPLICATION' + + SqlServerModuleVersion = '22.4.5.1' + DbatoolsModuleVersion = '2.0.1' + } + } + '160' { $versionSpecificData = @{ diff --git a/tests/Integration/Resources/DSC_SqlTraceFlag.Integration.Tests.ps1 b/tests/Integration/Resources/DSC_SqlTraceFlag.Integration.Tests.ps1 index 3ae956b550..561508c2f8 100644 --- a/tests/Integration/Resources/DSC_SqlTraceFlag.Integration.Tests.ps1 +++ b/tests/Integration/Resources/DSC_SqlTraceFlag.Integration.Tests.ps1 @@ -50,7 +50,7 @@ AfterAll { Restore-TestEnvironment -TestEnvironment $script:testEnvironment } -Describe "$($script:dscResourceName)_Integration" -Tag @('Integration_SQL2016', 'Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe "$($script:dscResourceName)_Integration" -Tag @('Integration_SQL2016', 'Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { $resourceId = "[$($script:dscResourceFriendlyName)]Integration_Test" } diff --git a/tests/Integration/Resources/DSC_SqlWindowsFirewall.Integration.Tests.ps1 b/tests/Integration/Resources/DSC_SqlWindowsFirewall.Integration.Tests.ps1 index 58ccbbfd6a..d9c0dad58a 100644 --- a/tests/Integration/Resources/DSC_SqlWindowsFirewall.Integration.Tests.ps1 +++ b/tests/Integration/Resources/DSC_SqlWindowsFirewall.Integration.Tests.ps1 @@ -50,7 +50,7 @@ AfterAll { Restore-TestEnvironment -TestEnvironment $script:testEnvironment } -Describe "$($script:dscResourceName)_Integration" -Tag @('Integration_SQL2016', 'Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') { +Describe "$($script:dscResourceName)_Integration" -Tag @('Integration_SQL2016', 'Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { $resourceId = "[$($script:dscResourceFriendlyName)]Integration_Test" } diff --git a/tests/Integration/Resources/DSCv3_SqlDatabase.Integration.Tests.ps1 b/tests/Integration/Resources/DSCv3_SqlDatabase.Integration.Tests.ps1 index 531c7f58ec..16eaa9f5ee 100644 --- a/tests/Integration/Resources/DSCv3_SqlDatabase.Integration.Tests.ps1 +++ b/tests/Integration/Resources/DSCv3_SqlDatabase.Integration.Tests.ps1 @@ -34,7 +34,7 @@ BeforeAll { $script:dscResourceFriendlyName = 'SqlDatabase' } -Describe "$($script:dscResourceFriendlyName)_Integration" -Tag @('Integration_SQL2022') { +Describe "$($script:dscResourceFriendlyName)_Integration" -Tag @('Integration_SQL2022', 'Integration_SQL2025') { BeforeAll { # Output the PowerShell version used in the test Write-Verbose -Message "`nPowerShell version used in integration test:`n$($PSVersionTable | Out-String)" -Verbose diff --git a/tests/TestHelpers/CommonTestHelper.psm1 b/tests/TestHelpers/CommonTestHelper.psm1 index 36556c570d..c0cb7effe7 100644 --- a/tests/TestHelpers/CommonTestHelper.psm1 +++ b/tests/TestHelpers/CommonTestHelper.psm1 @@ -323,6 +323,17 @@ function New-SQLSelfSignedCertificate $env:SqlCertificateThumbprint = $certificate.Thumbprint Write-Verbose -Message ('Session environment variable $env:SqlCertificateThumbprint set to ''{0}''' -f $env:SqlCertificateThumbprint) + # Import the created certificate into the Local Machine Trusted Root store + try + { + Import-PfxCertificate -FilePath $sqlPrivateCertificatePath -Password $sqlPrivateKeyPassword -CertStoreLocation 'Cert:\LocalMachine\Root' -ErrorAction Stop | Out-Null + Write-Verbose -Message ('Imported certificate into Cert:\\LocalMachine\\Root with thumbprint ''{0}''.' -f $certificate.Thumbprint) + } + catch + { + Write-Warning -Message ('Failed to import certificate into trusted root store: {0}' -f $_.Exception.Message) + } + return $certificate } diff --git a/tests/Unit/Public/Get-SqlDscCompatibilityLevel.Tests.ps1 b/tests/Unit/Public/Get-SqlDscCompatibilityLevel.Tests.ps1 index 5ae2dc2dcb..0982cd80c8 100644 --- a/tests/Unit/Public/Get-SqlDscCompatibilityLevel.Tests.ps1 +++ b/tests/Unit/Public/Get-SqlDscCompatibilityLevel.Tests.ps1 @@ -96,6 +96,27 @@ Describe 'Get-SqlDscCompatibilityLevel' -Tag 'Public' { } } + Context 'When SQL Server version is 17 (SQL Server 2025)' { + BeforeAll { + $mockServerObject.VersionMajor = 17 + } + + It 'Should return all supported compatibility levels from 100 to 170' { + $result = Get-SqlDscCompatibilityLevel -ServerObject $mockServerObject + + $result | Should -Contain 'Version100' + $result | Should -Contain 'Version110' + $result | Should -Contain 'Version120' + $result | Should -Contain 'Version130' + $result | Should -Contain 'Version140' + $result | Should -Contain 'Version150' + $result | Should -Contain 'Version160' + $result | Should -Contain 'Version170' + $result | Should -Not -Contain 'Version90' + $result | Should -Not -Contain 'Version80' + } + } + Context 'When SQL Server version is 15 (SQL Server 2019)' { BeforeAll { $mockServerObject.VersionMajor = 15 @@ -184,6 +205,22 @@ Describe 'Get-SqlDscCompatibilityLevel' -Tag 'Public' { } } + Context 'When version is 17.0.1000.0 (SQL Server 2025)' { + It 'Should return all supported compatibility levels from 100 to 170' { + $result = Get-SqlDscCompatibilityLevel -Version '17.0.1000.0' + + $result | Should -Contain 'Version100' + $result | Should -Contain 'Version110' + $result | Should -Contain 'Version120' + $result | Should -Contain 'Version130' + $result | Should -Contain 'Version140' + $result | Should -Contain 'Version150' + $result | Should -Contain 'Version160' + $result | Should -Contain 'Version170' + $result | Should -Not -Contain 'Version90' + } + } + Context 'When version is 15.0.2000.5 (SQL Server 2019)' { It 'Should return all supported compatibility levels from 100 to 150' { $result = Get-SqlDscCompatibilityLevel -Version '15.0.2000.5' diff --git a/tests/Unit/Public/New-SqlDscDatabase.Tests.ps1 b/tests/Unit/Public/New-SqlDscDatabase.Tests.ps1 index 1ad50fdb20..3382615ef9 100644 --- a/tests/Unit/Public/New-SqlDscDatabase.Tests.ps1 +++ b/tests/Unit/Public/New-SqlDscDatabase.Tests.ps1 @@ -128,6 +128,41 @@ Describe 'New-SqlDscDatabase' -Tag 'Public' { $result.IsLedger | Should -BeTrue } + It 'Should create a ledger database on SQL Server 2025 (version 17) with IsLedger set to true' { + # Create a mock server for SQL Server 2025 (version 17) which should also support IsLedger + $mockServerObject2025 = New-Object -TypeName 'Microsoft.SqlServer.Management.Smo.Server' + $mockServerObject2025 | Add-Member -MemberType 'NoteProperty' -Name 'InstanceName' -Value 'TestInstance2025' -Force + $mockServerObject2025 | Add-Member -MemberType 'NoteProperty' -Name 'VersionMajor' -Value 17 -Force + $mockServerObject2025 | Add-Member -MemberType 'ScriptProperty' -Name 'Databases' -Value { + return @{} | Add-Member -MemberType 'ScriptMethod' -Name 'Refresh' -Value { + # Mock implementation + } -PassThru -Force + } -Force + + $result = New-SqlDscDatabase -ServerObject $mockServerObject2025 -Name 'LedgerDatabase2025' -IsLedger -Force + + $result | Should -Not -BeNullOrEmpty + $result.Name | Should -Be 'LedgerDatabase2025' + $result.IsLedger | Should -BeTrue + } + + It 'Should accept CompatibilityLevel Version170 on SQL Server 2025' { + # Mock a SQL Server 2025 server object + $mockServerObject2025 = New-Object -TypeName 'Microsoft.SqlServer.Management.Smo.Server' + $mockServerObject2025 | Add-Member -MemberType 'NoteProperty' -Name 'InstanceName' -Value 'TestInstance2025' -Force + $mockServerObject2025 | Add-Member -MemberType 'NoteProperty' -Name 'VersionMajor' -Value 17 -Force + $mockServerObject2025 | Add-Member -MemberType 'ScriptProperty' -Name 'Databases' -Value { + return @{} | Add-Member -MemberType 'ScriptMethod' -Name 'Refresh' -Value { + # Mock implementation + } -PassThru -Force + } -Force + + $result = New-SqlDscDatabase -ServerObject $mockServerObject2025 -Name 'TestDatabase170' -CompatibilityLevel 'Version170' -Force + + $result | Should -Not -BeNullOrEmpty + $result.CompatibilityLevel | Should -Be 'Version170' + } + It 'Should create a database with additional boolean properties set' { $result = New-SqlDscDatabase -ServerObject $mockServerObject -Name 'TestDatabaseWithProps' -AutoClose -AutoShrink -Force diff --git a/tests/Unit/SqlServerDsc.Common/Public/Connect-Sql.Tests.ps1 b/tests/Unit/SqlServerDsc.Common/Public/Connect-Sql.Tests.ps1 index 0fe0a3836b..38d5c5b6af 100644 --- a/tests/Unit/SqlServerDsc.Common/Public/Connect-Sql.Tests.ps1 +++ b/tests/Unit/SqlServerDsc.Common/Public/Connect-Sql.Tests.ps1 @@ -613,6 +613,7 @@ Describe 'SqlServerDsc.Common\Connect-SQL' -Tag 'ConnectSql' { Add-Member -MemberType NoteProperty -Name ConnectAsUser -Value $false -PassThru | Add-Member -MemberType NoteProperty -Name ConnectAsUserPassword -Value '' -PassThru | Add-Member -MemberType NoteProperty -Name ConnectAsUserName -Value '' -PassThru | + Add-Member -MemberType NoteProperty -Name EncryptConnection -Value $false -PassThru | Add-Member -MemberType NoteProperty -Name StatementTimeout -Value 600 -PassThru | Add-Member -MemberType NoteProperty -Name ConnectTimeout -Value 600 -PassThru | Add-Member -MemberType NoteProperty -Name ApplicationName -Value 'SqlServerDsc' -PassThru | @@ -660,6 +661,7 @@ Describe 'SqlServerDsc.Common\Connect-SQL' -Tag 'ConnectSql' { Add-Member -MemberType NoteProperty -Name ConnectAsUser -Value $false -PassThru | Add-Member -MemberType NoteProperty -Name ConnectAsUserPassword -Value '' -PassThru | Add-Member -MemberType NoteProperty -Name ConnectAsUserName -Value '' -PassThru | + Add-Member -MemberType NoteProperty -Name EncryptConnection -Value $false -PassThru | Add-Member -MemberType NoteProperty -Name StatementTimeout -Value 600 -PassThru | Add-Member -MemberType NoteProperty -Name ConnectTimeout -Value 600 -PassThru | Add-Member -MemberType NoteProperty -Name ApplicationName -Value 'SqlServerDsc' -PassThru |