Skip to content

SqlServerDsc: Update tests to Pester 6 syntax where supported - #2465

Merged
johlju merged 23 commits into
dsccommunity:mainfrom
johlju:f/pester-6-attempt-2
Jul 10, 2026
Merged

SqlServerDsc: Update tests to Pester 6 syntax where supported#2465
johlju merged 23 commits into
dsccommunity:mainfrom
johlju:f/pester-6-attempt-2

Conversation

@johlju

@johlju johlju commented Jun 28, 2026

Copy link
Copy Markdown
Member

Pull Request (PR) description

  • SqlServerDsc
    • Update tests to Pester 6 syntax where supported.

This Pull Request (PR) fixes the following issues

None.

Task list

  • Added an entry to the change log under the Unreleased section of the
    file CHANGELOG.md. Entry should say what was changed and how that
    affects users (if applicable), and reference the issue being resolved
    (if applicable).
  • Resource documentation updated in the resource's README.md.
  • Resource parameter descriptions updated in schema.mof.
  • Comment-based help updated, including parameter descriptions.
  • Localization strings updated.
  • Examples updated.
  • Unit tests updated. See DSC Community Testing Guidelines.
  • Integration tests updated (where possible). See DSC Community Testing Guidelines.
  • Code changes adheres to DSC Community Style Guidelines.

This change is Reviewable

@coderabbitai

coderabbitai Bot commented Jun 28, 2026

Copy link
Copy Markdown

Important

Review skipped

Too many files!

This PR contains 438 files, which is 288 over the limit of 150.

To get a review, narrow the scope:
• coderabbit review --type committed # exclude uncommitted changes
• coderabbit review --dir # limit to a subdirectory
• coderabbit review --base # compare against a closer base

Upgrade to a paid plan to raise the limit.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 44df396b-470b-4c2d-b667-b2e28193c922

📥 Commits

Reviewing files that changed from the base of the PR and between 439f419 and ae19a13.

📒 Files selected for processing (438)
  • .github/instructions/dsc-community-style-guidelines-unit-tests.instructions.md
  • CHANGELOG.md
  • build.yaml
  • tests/Integration/Commands/Add-SqlDscFileGroup.Integration.Tests.ps1
  • tests/Integration/Commands/Add-SqlDscRSUrlReservation.Integration.Tests.ps1
  • tests/Integration/Commands/Add-SqlDscTraceFlag.Integration.Tests.ps1
  • tests/Integration/Commands/Assert-SqlDscAgentOperator.Integration.Tests.ps1
  • tests/Integration/Commands/Assert-SqlDscLogin.Integration.Tests.ps1
  • tests/Integration/Commands/Backup-SqlDscDatabase.Integration.Tests.ps1
  • tests/Integration/Commands/Backup-SqlDscRSEncryptionKey.Integration.Tests.ps1
  • tests/Integration/Commands/Connect-SqlDscDatabaseEngine.Integration.Tests.ps1
  • tests/Integration/Commands/ConvertFrom-SqlDscDatabasePermission.Integration.Tests.ps1
  • tests/Integration/Commands/ConvertFrom-SqlDscServerPermission.Integration.Tests.ps1
  • tests/Integration/Commands/ConvertTo-SqlDscDataFile.Integration.Tests.ps1
  • tests/Integration/Commands/ConvertTo-SqlDscDatabasePermission.Integration.Tests.ps1
  • tests/Integration/Commands/ConvertTo-SqlDscEditionName.Integration.Tests.ps1
  • tests/Integration/Commands/ConvertTo-SqlDscFileGroup.Integration.Tests.ps1
  • tests/Integration/Commands/ConvertTo-SqlDscServerPermission.Integration.Tests.ps1
  • tests/Integration/Commands/Deny-SqlDscServerPermission.Integration.Tests.ps1
  • tests/Integration/Commands/Disable-SqlDscAgentOperator.Integration.Tests.ps1
  • tests/Integration/Commands/Disable-SqlDscAudit.Integration.Tests.ps1
  • tests/Integration/Commands/Disable-SqlDscDatabaseSnapshotIsolation.Integration.Tests.ps1
  • tests/Integration/Commands/Disable-SqlDscLogin.Integration.Tests.ps1
  • tests/Integration/Commands/Disable-SqlDscRsSecureConnection.Integration.Tests.ps1
  • tests/Integration/Commands/Disconnect-SqlDscDatabaseEngine.Integration.Tests.ps1
  • tests/Integration/Commands/Enable-SqlDscAgentOperator.Integration.Tests.ps1
  • tests/Integration/Commands/Enable-SqlDscAudit.Integration.Tests.ps1
  • tests/Integration/Commands/Enable-SqlDscDatabaseSnapshotIsolation.Integration.Tests.ps1
  • tests/Integration/Commands/Enable-SqlDscLogin.Integration.Tests.ps1
  • tests/Integration/Commands/Enable-SqlDscRsSecureConnection.Integration.Tests.ps1
  • tests/Integration/Commands/Get-SqlDscAgentAlert.Integration.Tests.ps1
  • tests/Integration/Commands/Get-SqlDscAgentOperator.Integration.Tests.ps1
  • tests/Integration/Commands/Get-SqlDscAudit.Integration.Tests.ps1
  • tests/Integration/Commands/Get-SqlDscBackupFileList.Integration.Tests.ps1
  • tests/Integration/Commands/Get-SqlDscCompatibilityLevel.Integration.Tests.ps1
  • tests/Integration/Commands/Get-SqlDscConfigurationOption.Integration.Tests.ps1
  • tests/Integration/Commands/Get-SqlDscDatabase.Integration.Tests.ps1
  • tests/Integration/Commands/Get-SqlDscDatabasePermission.Integration.Tests.ps1
  • tests/Integration/Commands/Get-SqlDscDateTime.Integration.Tests.ps1
  • tests/Integration/Commands/Get-SqlDscInstalledInstance.Integration.Tests.ps1
  • tests/Integration/Commands/Get-SqlDscLogin.Integration.Tests.ps1
  • tests/Integration/Commands/Get-SqlDscManagedComputer.Integration.Tests.ps1
  • tests/Integration/Commands/Get-SqlDscManagedComputerInstance.Integration.Tests.ps1
  • tests/Integration/Commands/Get-SqlDscManagedComputerService.Integration.Tests.ps1
  • tests/Integration/Commands/Get-SqlDscPreferredModule.Integration.Tests.ps1
  • tests/Integration/Commands/Get-SqlDscRSConfigFile.Integration.Tests.ps1
  • tests/Integration/Commands/Get-SqlDscRSConfiguration.Integration.Tests.ps1
  • tests/Integration/Commands/Get-SqlDscRSDatabaseInstallation.Integration.Tests.ps1
  • tests/Integration/Commands/Get-SqlDscRSExecutionLog.Integration.Tests.ps1
  • tests/Integration/Commands/Get-SqlDscRSIPAddress.Integration.Tests.ps1
  • tests/Integration/Commands/Get-SqlDscRSLogPath.Integration.Tests.ps1
  • tests/Integration/Commands/Get-SqlDscRSPackage.Integration.Tests.ps1
  • tests/Integration/Commands/Get-SqlDscRSServiceAccount.Integration.Tests.ps1
  • tests/Integration/Commands/Get-SqlDscRSSetupConfiguration.Integration.Tests.ps1
  • tests/Integration/Commands/Get-SqlDscRSSslCertificate.Integration.Tests.ps1
  • tests/Integration/Commands/Get-SqlDscRSSslCertificateBinding.Integration.Tests.ps1
  • tests/Integration/Commands/Get-SqlDscRSUrl.Integration.Tests.ps1
  • tests/Integration/Commands/Get-SqlDscRSUrlReservation.Integration.Tests.ps1
  • tests/Integration/Commands/Get-SqlDscRole.Integration.Tests.ps1
  • tests/Integration/Commands/Get-SqlDscServerPermission.Integration.Tests.ps1
  • tests/Integration/Commands/Get-SqlDscServerProtocol.Integration.Tests.ps1
  • tests/Integration/Commands/Get-SqlDscServerProtocolName.Integration.Tests.ps1
  • tests/Integration/Commands/Get-SqlDscServerProtocolTcpIp.Integration.Tests.ps1
  • tests/Integration/Commands/Get-SqlDscSetupLog.Integration.Tests.ps1
  • tests/Integration/Commands/Get-SqlDscStartupParameter.Integration.Tests.ps1
  • tests/Integration/Commands/Get-SqlDscTraceFlag.Integration.Tests.ps1
  • tests/Integration/Commands/Grant-SqlDscServerPermission.Integration.Tests.ps1
  • tests/Integration/Commands/Import-SqlDscPreferredModule.Integration.Tests.ps1
  • tests/Integration/Commands/Initialize-SqlDscRS.Integration.Tests.ps1
  • tests/Integration/Commands/Initialize-SqlDscRebuildDatabase.Integration.Tests.ps1
  • tests/Integration/Commands/Install-SqlDscFailoverCluster.Integration.Tests.ps1
  • tests/Integration/Commands/Install-SqlDscPowerBIReportServer.Integration.Tests.ps1
  • tests/Integration/Commands/Install-SqlDscReportingService.Integration.Tests.ps1
  • tests/Integration/Commands/Install-SqlDscServer.Integration.Tests.ps1
  • tests/Integration/Commands/Invoke-SqlDscQuery.Integration.Tests.ps1
  • tests/Integration/Commands/Invoke-SqlDscScalarQuery.Integration.Tests.ps1
  • tests/Integration/Commands/Mid.ServiceAccountChange.Secure.RS.Integration.Tests.ps1
  • tests/Integration/Commands/New-SqlDscAgentAlert.Integration.Tests.ps1
  • tests/Integration/Commands/New-SqlDscAgentOperator.Integration.Tests.ps1
  • tests/Integration/Commands/New-SqlDscAudit.Integration.Tests.ps1
  • tests/Integration/Commands/New-SqlDscDataFile.Integration.Tests.ps1
  • tests/Integration/Commands/New-SqlDscDatabase.Integration.Tests.ps1
  • tests/Integration/Commands/New-SqlDscDatabaseSnapshot.Integration.Tests.ps1
  • tests/Integration/Commands/New-SqlDscFileGroup.Integration.Tests.ps1
  • tests/Integration/Commands/New-SqlDscLogin.Integration.Tests.ps1
  • tests/Integration/Commands/New-SqlDscRole.Integration.Tests.ps1
  • tests/Integration/Commands/Post.Certificate.RS.Integration.Tests.ps1
  • tests/Integration/Commands/Post.Initialization.RS.Integration.Tests.ps1
  • tests/Integration/Commands/Post.ServiceAccountChange.PowerBI.RS.Integration.Tests.ps1
  • tests/Integration/Commands/Post.ServiceAccountChange.SQL2017.RS.Integration.Tests.ps1
  • tests/Integration/Commands/Post.ServiceAccountChange.SQL2019-2022.RS.Integration.Tests.ps1
  • tests/Integration/Commands/Post.ServiceAccountChange.Secure.RS.Integration.Tests.ps1
  • tests/Integration/Commands/PostInstallationConfiguration.Integration.Tests.ps1
  • tests/Integration/Commands/Pre.ServiceAccountChange.Secure.RS.Integration.Tests.ps1
  • tests/Integration/Commands/Pre.Set-SqlDscRSUrlReservation.Integration.Tests.ps1
  • tests/Integration/Commands/Prerequisites.Integration.Tests.ps1
  • tests/Integration/Commands/Prerequisites.RSDB.Integration.Tests.ps1
  • tests/Integration/Commands/Remove-SqlDscAgentAlert.Integration.Tests.ps1
  • tests/Integration/Commands/Remove-SqlDscAgentOperator.Integration.Tests.ps1
  • tests/Integration/Commands/Remove-SqlDscAudit.Integration.Tests.ps1
  • tests/Integration/Commands/Remove-SqlDscDatabase.Integration.Tests.ps1
  • tests/Integration/Commands/Remove-SqlDscLogin.Integration.Tests.ps1
  • tests/Integration/Commands/Remove-SqlDscRSUrlReservation.Integration.Tests.ps1
  • tests/Integration/Commands/Remove-SqlDscRole.Integration.Tests.ps1
  • tests/Integration/Commands/Remove-SqlDscTraceFlag.Integration.Tests.ps1
  • tests/Integration/Commands/Repair-SqlDscPowerBIReportServer.Integration.Tests.ps1
  • tests/Integration/Commands/Repair-SqlDscReportingService.Integration.Tests.ps1
  • tests/Integration/Commands/Repair-SqlDscServer.Integration.Tests.ps1
  • tests/Integration/Commands/Request-SqlDscRSDatabaseRightsScript.Integration.Tests.ps1
  • tests/Integration/Commands/Request-SqlDscRSDatabaseScript.Integration.Tests.ps1
  • tests/Integration/Commands/Request-SqlDscRSDatabaseUpgradeScript.Integration.Tests.ps1
  • tests/Integration/Commands/Restore-SqlDscDatabase.Integration.Tests.ps1
  • tests/Integration/Commands/Restore-SqlDscRSEncryptionKey.Integration.Tests.ps1
  • tests/Integration/Commands/Resume-SqlDscDatabase.Integration.Tests.ps1
  • tests/Integration/Commands/Revoke-SqlDscServerPermission.Integration.Tests.ps1
  • tests/Integration/Commands/Save-SqlDscSqlServerMediaFile.Integration.Tests.ps1
  • tests/Integration/Commands/Set-SqlDscAgentAlert.Integration.Tests.ps1
  • tests/Integration/Commands/Set-SqlDscAgentOperator.Integration.Tests.ps1
  • tests/Integration/Commands/Set-SqlDscAudit.Integration.Tests.ps1
  • tests/Integration/Commands/Set-SqlDscConfigurationOption.Integration.Tests.ps1
  • tests/Integration/Commands/Set-SqlDscDatabaseDefault.Integration.Tests.ps1
  • tests/Integration/Commands/Set-SqlDscDatabaseOwner.Integration.Tests.ps1
  • tests/Integration/Commands/Set-SqlDscDatabasePermission.Integration.Tests.ps1
  • tests/Integration/Commands/Set-SqlDscDatabaseProperty.Integration.Tests.ps1
  • tests/Integration/Commands/Set-SqlDscRSDatabaseTimeout.Integration.Tests.ps1
  • tests/Integration/Commands/Set-SqlDscRSServiceAccount.Integration.Tests.ps1
  • tests/Integration/Commands/Set-SqlDscRSSslCertificateBinding.Integration.Tests.ps1
  • tests/Integration/Commands/Set-SqlDscRSUrlReservation.Integration.Tests.ps1
  • tests/Integration/Commands/Set-SqlDscRSVirtualDirectory.Integration.Tests.ps1
  • tests/Integration/Commands/Set-SqlDscServerPermission.Integration.Tests.ps1
  • tests/Integration/Commands/Set-SqlDscStartupParameter.Integration.Tests.ps1
  • tests/Integration/Commands/Set-SqlDscTraceFlag.Integration.Tests.ps1
  • tests/Integration/Commands/Start-SqlDscRSWebService.Integration.Tests.ps1
  • tests/Integration/Commands/Start-SqlDscRSWindowsService.Integration.Tests.ps1
  • tests/Integration/Commands/Stop-SqlDscRSWebService.Integration.Tests.ps1
  • tests/Integration/Commands/Stop-SqlDscRSWindowsService.Integration.Tests.ps1
  • tests/Integration/Commands/Suspend-SqlDscDatabase.Integration.Tests.ps1
  • tests/Integration/Commands/Test-SqlDscAgentAlertProperty.Integration.Tests.ps1
  • tests/Integration/Commands/Test-SqlDscBackupFile.Integration.Tests.ps1
  • tests/Integration/Commands/Test-SqlDscConfigurationOption.Integration.Tests.ps1
  • tests/Integration/Commands/Test-SqlDscDatabaseProperty.Integration.Tests.ps1
  • tests/Integration/Commands/Test-SqlDscIsAgentAlert.Integration.Tests.ps1
  • tests/Integration/Commands/Test-SqlDscIsAgentOperator.Integration.Tests.ps1
  • tests/Integration/Commands/Test-SqlDscIsDatabase.Integration.Tests.ps1
  • tests/Integration/Commands/Test-SqlDscIsDatabasePrincipal.Integration.Tests.ps1
  • tests/Integration/Commands/Test-SqlDscIsLogin.Integration.Tests.ps1
  • tests/Integration/Commands/Test-SqlDscIsLoginEnabled.Integration.Tests.ps1
  • tests/Integration/Commands/Test-SqlDscIsRole.Integration.Tests.ps1
  • tests/Integration/Commands/Test-SqlDscIsSupportedFeature.Integration.Tests.ps1
  • tests/Integration/Commands/Test-SqlDscRSInitialized.Integration.Tests.ps1
  • tests/Integration/Commands/Test-SqlDscRSInstalled.Integration.Tests.ps1
  • tests/Integration/Commands/Test-SqlDscServerPermission.Integration.Tests.ps1
  • tests/Integration/Commands/Uninstall-SqlDscPowerBIReportServer.Integration.Tests.ps1
  • tests/Integration/Commands/Uninstall-SqlDscReportingService.Integration.Tests.ps1
  • tests/Integration/Commands/Uninstall-SqlDscServer.Integration.Tests.ps1
  • tests/Integration/Private/ConvertTo-AuditNewParameterSet.Integration.Tests.ps1
  • tests/Integration/Resources/DSC_SqlAgentAlert.Integration.Tests.ps1
  • tests/Integration/Resources/DSC_SqlAgentFailsafe.Integration.Tests.ps1
  • tests/Integration/Resources/DSC_SqlAgentOperator.Integration.Tests.ps1
  • tests/Integration/Resources/DSC_SqlAlwaysOnService.Integration.Tests.ps1
  • tests/Integration/Resources/DSC_SqlAudit.Integration.Tests.ps1
  • tests/Integration/Resources/DSC_SqlDatabase.Integration.Tests.ps1
  • tests/Integration/Resources/DSC_SqlDatabaseDefaultLocation.Integration.Tests.ps1
  • tests/Integration/Resources/DSC_SqlDatabaseMail.Integration.Tests.ps1
  • tests/Integration/Resources/DSC_SqlDatabaseObjectPermission.Integration.Tests.ps1
  • tests/Integration/Resources/DSC_SqlDatabasePermission.Integration.Tests.ps1
  • tests/Integration/Resources/DSC_SqlDatabaseUser.Integration.Tests.ps1
  • tests/Integration/Resources/DSC_SqlEndpoint.Integration.Tests.ps1
  • tests/Integration/Resources/DSC_SqlLogin.Integration.Tests.ps1
  • tests/Integration/Resources/DSC_SqlPermission.Integration.Tests.ps1
  • tests/Integration/Resources/DSC_SqlProtocol.Integration.Tests.ps1
  • tests/Integration/Resources/DSC_SqlProtocolTcpIp.Integration.Tests.ps1
  • tests/Integration/Resources/DSC_SqlRS.Integration.Tests.ps1
  • tests/Integration/Resources/DSC_SqlRSSetup.Integration.Tests.ps1
  • tests/Integration/Resources/DSC_SqlRS_Default.Integration.Tests.ps1
  • tests/Integration/Resources/DSC_SqlReplication.Integration.Tests.ps1
  • tests/Integration/Resources/DSC_SqlRole.Integration.Tests.ps1
  • tests/Integration/Resources/DSC_SqlScript.Integration.Tests.ps1
  • tests/Integration/Resources/DSC_SqlScriptQuery.Integration.Tests.ps1
  • tests/Integration/Resources/DSC_SqlSecureConnection.Integration.Tests.ps1
  • tests/Integration/Resources/DSC_SqlServiceAccount.Integration.Tests.ps1
  • tests/Integration/Resources/DSC_SqlSetup.Integration.Tests.ps1
  • tests/Integration/Resources/DSC_SqlTraceFlag.Integration.Tests.ps1
  • tests/Integration/Resources/DSC_SqlWindowsFirewall.Integration.Tests.ps1
  • tests/Integration/Resources/DSCv3_SqlDatabase.Integration.Tests.ps1
  • tests/Integration/Resources/DSCv3_SqlRSSetup.Integration.Tests.ps1
  • tests/QA/ScriptAnalyzer.Tests.ps1
  • tests/QA/module.tests.ps1
  • tests/Unit/Classes/BackupFileSpec.Tests.ps1
  • tests/Unit/Classes/DatabaseFileGroupSpec.Tests.ps1
  • tests/Unit/Classes/DatabaseFileSpec.Tests.ps1
  • tests/Unit/Classes/DatabasePermission.Tests.ps1
  • tests/Unit/Classes/ServerPermission.Tests.ps1
  • tests/Unit/Classes/SqlAgentAlert.Tests.ps1
  • tests/Unit/Classes/SqlAudit.Tests.ps1
  • tests/Unit/Classes/SqlDatabase.Tests.ps1
  • tests/Unit/Classes/SqlDatabasePermission.Tests.ps1
  • tests/Unit/Classes/SqlPermission.Tests.ps1
  • tests/Unit/Classes/SqlRSSetup.Tests.ps1
  • tests/Unit/Classes/SqlReason.Tests.ps1
  • tests/Unit/Classes/SqlResourceBase.Tests.ps1
  • tests/Unit/Classes/StartupParameters.Tests.ps1
  • tests/Unit/DSC_SqlAG.Tests.ps1
  • tests/Unit/DSC_SqlAGDatabase.Tests.ps1
  • tests/Unit/DSC_SqlAGListener.Tests.ps1
  • tests/Unit/DSC_SqlAGReplica.Tests.ps1
  • tests/Unit/DSC_SqlAgentFailsafe.Tests.ps1
  • tests/Unit/DSC_SqlAgentOperator.Tests.ps1
  • tests/Unit/DSC_SqlAlias.Tests.ps1
  • tests/Unit/DSC_SqlAlwaysOnService.Tests.ps1
  • tests/Unit/DSC_SqlConfiguration.Tests.ps1
  • tests/Unit/DSC_SqlDatabaseDefaultLocation.Tests.ps1
  • tests/Unit/DSC_SqlDatabaseMail.Tests.ps1
  • tests/Unit/DSC_SqlDatabaseObjectPermission.Tests.ps1
  • tests/Unit/DSC_SqlDatabaseRole.Tests.ps1
  • tests/Unit/DSC_SqlDatabaseUser.Tests.ps1
  • tests/Unit/DSC_SqlEndpoint.Tests.ps1
  • tests/Unit/DSC_SqlEndpointPermission.Tests.ps1
  • tests/Unit/DSC_SqlLogin.Tests.ps1
  • tests/Unit/DSC_SqlMaxDop.Tests.ps1
  • tests/Unit/DSC_SqlMemory.Tests.ps1
  • tests/Unit/DSC_SqlProtocol.Tests.ps1
  • tests/Unit/DSC_SqlProtocolTcpIp.Tests.ps1
  • tests/Unit/DSC_SqlRS.Tests.ps1
  • tests/Unit/DSC_SqlReplication.Tests.ps1
  • tests/Unit/DSC_SqlRole.Tests.ps1
  • tests/Unit/DSC_SqlScript.Tests.ps1
  • tests/Unit/DSC_SqlScriptQuery.Tests.ps1
  • tests/Unit/DSC_SqlSecureConnection.Tests.ps1
  • tests/Unit/DSC_SqlServiceAccount.Tests.ps1
  • tests/Unit/DSC_SqlSetup.Tests.ps1
  • tests/Unit/DSC_SqlTraceFlag.Tests.ps1
  • tests/Unit/DSC_SqlWaitForAG.Tests.ps1
  • tests/Unit/DSC_SqlWindowsFirewall.Tests.ps1
  • tests/Unit/Private/Assert-Feature.Tests.ps1
  • tests/Unit/Private/Assert-ManagedServiceType.Tests.ps1
  • tests/Unit/Private/Assert-SetupActionProperties.Tests.ps1
  • tests/Unit/Private/ConvertFrom-ManagedServiceType.Tests.ps1
  • tests/Unit/Private/ConvertTo-AuditNewParameterSet.Tests.ps1
  • tests/Unit/Private/ConvertTo-EscapedQueryString.Tests.ps1
  • tests/Unit/Private/ConvertTo-FormattedParameterDescription.Tests.ps1
  • tests/Unit/Private/ConvertTo-ManagedServiceType.Tests.ps1
  • tests/Unit/Private/ConvertTo-RedactedText.Tests.ps1
  • tests/Unit/Private/ConvertTo-SqlString.Tests.ps1
  • tests/Unit/Private/Get-AgentAlertObject.Tests.ps1
  • tests/Unit/Private/Get-AgentOperatorObject.Tests.ps1
  • tests/Unit/Private/Get-CommandParameter.Tests.ps1
  • tests/Unit/Private/Get-OperatingSystem.Tests.ps1
  • tests/Unit/Private/Get-RSServiceState.Tests.ps1
  • tests/Unit/Private/Get-SMOModuleCalculatedVersion.Tests.ps1
  • tests/Unit/Private/Invoke-ReportServerSetupAction.Tests.ps1
  • tests/Unit/Private/Invoke-RsCimMethod.Tests.ps1
  • tests/Unit/Private/Invoke-SetupAction.Tests.ps1
  • tests/Unit/Public/Add-SqlDscFileGroup.Tests.ps1
  • tests/Unit/Public/Add-SqlDscNode.Tests.ps1
  • tests/Unit/Public/Add-SqlDscRSSslCertificateBinding.Tests.ps1
  • tests/Unit/Public/Add-SqlDscRSUrlReservation.Tests.ps1
  • tests/Unit/Public/Add-SqlDscTraceFlag.Tests.ps1
  • tests/Unit/Public/Assert-SqlDscAgentOperator.Tests.ps1
  • tests/Unit/Public/Assert-SqlDscLogin.Tests.ps1
  • tests/Unit/Public/Backup-SqlDscDatabase.Tests.ps1
  • tests/Unit/Public/Backup-SqlDscRSEncryptionKey.Tests.ps1
  • tests/Unit/Public/Complete-SqlDscFailoverCluster.Tests.ps1
  • tests/Unit/Public/Complete-SqlDscImage.Tests.ps1
  • tests/Unit/Public/Connect-SqlDscDatabaseEngine.Tests.ps1
  • tests/Unit/Public/ConvertFrom-SqlDscDatabasePermission.Tests.ps1
  • tests/Unit/Public/ConvertFrom-SqlDscServerPermission.Tests.ps1
  • tests/Unit/Public/ConvertTo-SqlDscDataFile.Tests.ps1
  • tests/Unit/Public/ConvertTo-SqlDscDatabasePermission.Tests.ps1
  • tests/Unit/Public/ConvertTo-SqlDscEditionName.Tests.ps1
  • tests/Unit/Public/ConvertTo-SqlDscFileGroup.Tests.ps1
  • tests/Unit/Public/ConvertTo-SqlDscServerPermission.Tests.ps1
  • tests/Unit/Public/Deny-SqlDscServerPermission.Tests.ps1
  • tests/Unit/Public/Disable-SqlDscAgentOperator.Tests.ps1
  • tests/Unit/Public/Disable-SqlDscAudit.Tests.ps1
  • tests/Unit/Public/Disable-SqlDscDatabaseSnapshotIsolation.Tests.ps1
  • tests/Unit/Public/Disable-SqlDscLogin.Tests.ps1
  • tests/Unit/Public/Disable-SqlDscRsSecureConnection.Tests.ps1
  • tests/Unit/Public/Disconnect-SqlDscDatabaseEngine.Tests.ps1
  • tests/Unit/Public/Enable-SqlDscAgentOperator.Tests.ps1
  • tests/Unit/Public/Enable-SqlDscAudit.Tests.ps1
  • tests/Unit/Public/Enable-SqlDscDatabaseSnapshotIsolation.Tests.ps1
  • tests/Unit/Public/Enable-SqlDscLogin.Tests.ps1
  • tests/Unit/Public/Enable-SqlDscRsSecureConnection.Tests.ps1
  • tests/Unit/Public/Get-SqlDscAgentAlert.Tests.ps1
  • tests/Unit/Public/Get-SqlDscAgentOperator.Tests.ps1
  • tests/Unit/Public/Get-SqlDscAudit.Tests.ps1
  • tests/Unit/Public/Get-SqlDscBackupFileList.Tests.ps1
  • tests/Unit/Public/Get-SqlDscCompatibilityLevel.Tests.ps1
  • tests/Unit/Public/Get-SqlDscConfigurationOption.Tests.ps1
  • tests/Unit/Public/Get-SqlDscDatabase.Tests.ps1
  • tests/Unit/Public/Get-SqlDscDatabasePermission.Tests.ps1
  • tests/Unit/Public/Get-SqlDscDateTime.Tests.ps1
  • tests/Unit/Public/Get-SqlDscInstalledInstance.Tests.ps1
  • tests/Unit/Public/Get-SqlDscLogin.Tests.ps1
  • tests/Unit/Public/Get-SqlDscManagedComputer.Tests.ps1
  • tests/Unit/Public/Get-SqlDscManagedComputerInstance.Tests.ps1
  • tests/Unit/Public/Get-SqlDscManagedComputerService.Tests.ps1
  • tests/Unit/Public/Get-SqlDscPreferredModule.Tests.ps1
  • tests/Unit/Public/Get-SqlDscRSConfigFile.Tests.ps1
  • tests/Unit/Public/Get-SqlDscRSConfiguration.Tests.ps1
  • tests/Unit/Public/Get-SqlDscRSDatabaseInstallation.Tests.ps1
  • tests/Unit/Public/Get-SqlDscRSExecutionLog.Tests.ps1
  • tests/Unit/Public/Get-SqlDscRSIPAddress.Tests.ps1
  • tests/Unit/Public/Get-SqlDscRSLogPath.Tests.ps1
  • tests/Unit/Public/Get-SqlDscRSPackage.Tests.ps1
  • tests/Unit/Public/Get-SqlDscRSServiceAccount.Tests.ps1
  • tests/Unit/Public/Get-SqlDscRSSetupConfiguration.Tests.ps1
  • tests/Unit/Public/Get-SqlDscRSSslCertificate.Tests.ps1
  • tests/Unit/Public/Get-SqlDscRSSslCertificateBinding.Tests.ps1
  • tests/Unit/Public/Get-SqlDscRSUrl.Tests.ps1
  • tests/Unit/Public/Get-SqlDscRSUrlReservation.Tests.ps1
  • tests/Unit/Public/Get-SqlDscRSVersion.Tests.ps1
  • tests/Unit/Public/Get-SqlDscRSWebPortalApplicationName.Tests.ps1
  • tests/Unit/Public/Get-SqlDscRole.Tests.ps1
  • tests/Unit/Public/Get-SqlDscServerPermission.Tests.ps1
  • tests/Unit/Public/Get-SqlDscServerProtocol.Tests.ps1
  • tests/Unit/Public/Get-SqlDscServerProtocolName.Tests.ps1
  • tests/Unit/Public/Get-SqlDscServerProtocolTcpIp.Tests.ps1
  • tests/Unit/Public/Get-SqlDscSetupLog.Tests.ps1
  • tests/Unit/Public/Get-SqlDscStartupParameter.Tests.ps1
  • tests/Unit/Public/Get-SqlDscTraceFlag.Tests.ps1
  • tests/Unit/Public/Grant-SqlDscServerPermission.Tests.ps1
  • tests/Unit/Public/Import-SqlDscPreferredModule.Tests.ps1
  • tests/Unit/Public/Initialize-SqlDscFailoverCluster.Tests.ps1
  • tests/Unit/Public/Initialize-SqlDscImage.Tests.ps1
  • tests/Unit/Public/Initialize-SqlDscRS.Tests.ps1
  • tests/Unit/Public/Initialize-SqlDscRebuildDatabase.Tests.ps1
  • tests/Unit/Public/Install-SqlDscFailoverCluster.Tests.ps1
  • tests/Unit/Public/Install-SqlDscPowerBIReportServer.Tests.ps1
  • tests/Unit/Public/Install-SqlDscReportingService.Tests.ps1
  • tests/Unit/Public/Install-SqlDscServer.Tests.ps1
  • tests/Unit/Public/Invoke-SqlDscQuery.Tests.ps1
  • tests/Unit/Public/Invoke-SqlDscScalarQuery.Tests.ps1
  • tests/Unit/Public/New-SqlDscAgentAlert.Tests.ps1
  • tests/Unit/Public/New-SqlDscAgentOperator.Tests.ps1
  • tests/Unit/Public/New-SqlDscAudit.Tests.ps1
  • tests/Unit/Public/New-SqlDscDataFile.Tests.ps1
  • tests/Unit/Public/New-SqlDscDatabase.Tests.ps1
  • tests/Unit/Public/New-SqlDscDatabaseSnapshot.Tests.ps1
  • tests/Unit/Public/New-SqlDscFileGroup.Tests.ps1
  • tests/Unit/Public/New-SqlDscLogin.Tests.ps1
  • tests/Unit/Public/New-SqlDscRSEncryptionKey.Tests.ps1
  • tests/Unit/Public/New-SqlDscRole.Tests.ps1
  • tests/Unit/Public/Remove-SqlDscAgentAlert.Tests.ps1
  • tests/Unit/Public/Remove-SqlDscAgentOperator.Tests.ps1
  • tests/Unit/Public/Remove-SqlDscAudit.Tests.ps1
  • tests/Unit/Public/Remove-SqlDscDatabase.Tests.ps1
  • tests/Unit/Public/Remove-SqlDscLogin.Tests.ps1
  • tests/Unit/Public/Remove-SqlDscNode.Tests.ps1
  • tests/Unit/Public/Remove-SqlDscRSEncryptedInformation.Tests.ps1
  • tests/Unit/Public/Remove-SqlDscRSEncryptionKey.Tests.ps1
  • tests/Unit/Public/Remove-SqlDscRSSslCertificateBinding.Tests.ps1
  • tests/Unit/Public/Remove-SqlDscRSUnattendedExecutionAccount.Tests.ps1
  • tests/Unit/Public/Remove-SqlDscRSUrlReservation.Tests.ps1
  • tests/Unit/Public/Remove-SqlDscRole.Tests.ps1
  • tests/Unit/Public/Remove-SqlDscTraceFlag.Tests.ps1
  • tests/Unit/Public/Repair-SqlDscPowerBIReportServer.Tests.ps1
  • tests/Unit/Public/Repair-SqlDscReportingService.Tests.ps1
  • tests/Unit/Public/Repair-SqlDscServer.Tests.ps1
  • tests/Unit/Public/Request-SqlDscRSDatabaseRightsScript.Tests.ps1
  • tests/Unit/Public/Request-SqlDscRSDatabaseScript.Tests.ps1
  • tests/Unit/Public/Request-SqlDscRSDatabaseUpgradeScript.Tests.ps1
  • tests/Unit/Public/Restart-SqlDscRSService.Tests.ps1
  • tests/Unit/Public/Restore-SqlDscDatabase.Tests.ps1
  • tests/Unit/Public/Restore-SqlDscRSEncryptionKey.Tests.ps1
  • tests/Unit/Public/Resume-SqlDscDatabase.Tests.ps1
  • tests/Unit/Public/Revoke-SqlDscServerPermission.Tests.ps1
  • tests/Unit/Public/Save-SqlDscSqlServerMediaFile.Tests.ps1
  • tests/Unit/Public/Set-SqlDscAgentAlert.Tests.ps1
  • tests/Unit/Public/Set-SqlDscAgentOperator.Tests.ps1
  • tests/Unit/Public/Set-SqlDscAudit.Tests.ps1
  • tests/Unit/Public/Set-SqlDscConfigurationOption.Tests.ps1
  • tests/Unit/Public/Set-SqlDscDatabaseDefault.Tests.ps1
  • tests/Unit/Public/Set-SqlDscDatabaseOwner.Tests.ps1
  • tests/Unit/Public/Set-SqlDscDatabasePermission.Tests.ps1
  • tests/Unit/Public/Set-SqlDscDatabaseProperty.Tests.ps1
  • tests/Unit/Public/Set-SqlDscRSDatabaseConnection.Tests.ps1
  • tests/Unit/Public/Set-SqlDscRSDatabaseTimeout.Tests.ps1
  • tests/Unit/Public/Set-SqlDscRSServiceAccount.Tests.ps1
  • tests/Unit/Public/Set-SqlDscRSSmtpConfiguration.Tests.ps1
  • tests/Unit/Public/Set-SqlDscRSSslCertificateBinding.Tests.ps1
  • tests/Unit/Public/Set-SqlDscRSUnattendedExecutionAccount.Tests.ps1
  • tests/Unit/Public/Set-SqlDscRSUrlReservation.Tests.ps1
  • tests/Unit/Public/Set-SqlDscRSVirtualDirectory.Tests.ps1
  • tests/Unit/Public/Set-SqlDscServerPermission.Tests.ps1
  • tests/Unit/Public/Set-SqlDscStartupParameter.Tests.ps1
  • tests/Unit/Public/Set-SqlDscTraceFlag.Tests.ps1
  • tests/Unit/Public/Start-SqlDscRSWebService.Tests.ps1
  • tests/Unit/Public/Start-SqlDscRSWindowsService.Tests.ps1
  • tests/Unit/Public/Stop-SqlDscRSWebService.Tests.ps1
  • tests/Unit/Public/Stop-SqlDscRSWindowsService.Tests.ps1
  • tests/Unit/Public/Suspend-SqlDscDatabase.Tests.ps1
  • tests/Unit/Public/Test-SqlDscAgentAlertProperty.Tests.ps1
  • tests/Unit/Public/Test-SqlDscBackupFile.Tests.ps1
  • tests/Unit/Public/Test-SqlDscConfigurationOption.Tests.ps1
  • tests/Unit/Public/Test-SqlDscDatabaseProperty.Tests.ps1
  • tests/Unit/Public/Test-SqlDscIsAgentAlert.Tests.ps1
  • tests/Unit/Public/Test-SqlDscIsAgentOperator.Tests.ps1
  • tests/Unit/Public/Test-SqlDscIsDatabase.Tests.ps1
  • tests/Unit/Public/Test-SqlDscIsDatabasePrincipal.Tests.ps1
  • tests/Unit/Public/Test-SqlDscIsLogin.Tests.ps1
  • tests/Unit/Public/Test-SqlDscIsLoginEnabled.Tests.ps1
  • tests/Unit/Public/Test-SqlDscIsRole.Tests.ps1
  • tests/Unit/Public/Test-SqlDscIsSupportedFeature.Tests.ps1
  • tests/Unit/Public/Test-SqlDscRSAccessible.Tests.ps1
  • tests/Unit/Public/Test-SqlDscRSInitialized.Tests.ps1
  • tests/Unit/Public/Test-SqlDscRSInstalled.Tests.ps1
  • tests/Unit/Public/Test-SqlDscServerPermission.Tests.ps1
  • tests/Unit/Public/Uninstall-SqlDscPowerBIReportServer.Tests.ps1
  • tests/Unit/Public/Uninstall-SqlDscReportingService.Tests.ps1
  • tests/Unit/Public/Uninstall-SqlDscServer.Tests.ps1
  • tests/Unit/Public/Update-SqlDscServer.Tests.ps1
  • tests/Unit/Public/Update-SqlDscServerEdition.Tests.ps1
  • tests/Unit/SqlServerDsc.AnalyzerRules.Tests.ps1
  • tests/Unit/SqlServerDsc.Common/Public/Connect-Sql.Tests.ps1
  • tests/Unit/SqlServerDsc.Common/Public/Connect-SqlAnalysis.Tests.ps1
  • tests/Unit/SqlServerDsc.Common/Public/Connect-UncPath.Tests.ps1
  • tests/Unit/SqlServerDsc.Common/Public/ConvertTo-ServerInstanceName.Tests.ps1
  • tests/Unit/SqlServerDsc.Common/Public/Copy-ItemWithRobocopy.Tests.ps1
  • tests/Unit/SqlServerDsc.Common/Public/Disconnect-UncPath.Tests.ps1
  • tests/Unit/SqlServerDsc.Common/Public/Find-ExceptionByNumber.Tests.ps1
  • tests/Unit/SqlServerDsc.Common/Public/Get-PrimaryReplicaServerObject.Tests.ps1
  • tests/Unit/SqlServerDsc.Common/Public/Get-ServiceAccount.Tests.ps1
  • tests/Unit/SqlServerDsc.Common/Public/Get-SqlInstanceMajorVersion.Tests.ps1
  • tests/Unit/SqlServerDsc.Common/Public/Invoke-InstallationMediaCopy.Tests.ps1
  • tests/Unit/SqlServerDsc.Common/Public/Invoke-SqlScript.Tests.ps1
  • tests/Unit/SqlServerDsc.Common/Public/Restart-SqlClusterService.Tests.ps1
  • tests/Unit/SqlServerDsc.Common/Public/Restart-SqlService.Tests.ps1
  • tests/Unit/SqlServerDsc.Common/Public/Split-FullSqlInstanceName.Tests.ps1
  • tests/Unit/SqlServerDsc.Common/Public/Start-SqlSetupProcess.Tests.ps1
  • tests/Unit/SqlServerDsc.Common/Public/Test-ActiveNode.Tests.ps1
  • tests/Unit/SqlServerDsc.Common/Public/Test-AvailabilityReplicaSeedingModeAutomatic.Tests.ps1
  • tests/Unit/SqlServerDsc.Common/Public/Test-ClusterPermissions.Tests.ps1
  • tests/Unit/SqlServerDsc.Common/Public/Test-FeatureFlag.Tests.ps1
  • tests/Unit/SqlServerDsc.Common/Public/Test-ImpersonatePermissions.Tests.ps1
  • tests/Unit/SqlServerDsc.Common/Public/Test-LoginEffectivePermissions.Tests.ps1
  • tests/Unit/SqlServerDsc.Common/Public/Update-AvailabilityGroupReplica.Tests.ps1

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Jun 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94%. Comparing base (439f419) to head (ae19a13).

Additional details and impacted files

Impacted file tree graph

@@          Coverage Diff          @@
##            main   #2465   +/-   ##
=====================================
- Coverage     94%     94%   -1%     
=====================================
  Files        227     227           
  Lines      10871   10871           
=====================================
- Hits       10235   10234    -1     
- Misses       636     637    +1     
Flag Coverage Δ
unit 94% <ø> (-1%) ⬇️
see 1 file with indirect coverage changes
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

johlju added 22 commits July 8, 2026 13:27
… Should-NotInvoke

- Changed all instances of 'Should:ModuleName' to 'Should-Invoke:ModuleName' and 'Should-NotInvoke:ModuleName' in various test scripts.
- Updated BeforeAll and AfterAll blocks in the following test files:
  - Test-SqlDscIsLogin.Tests.ps1
  - Test-SqlDscIsLoginEnabled.Tests.ps1
  - Test-SqlDscIsRole.Tests.ps1
  - Test-SqlDscIsSupportedFeature.Tests.ps1
  - Test-SqlDscRSAccessible.Tests.ps1
  - Test-SqlDscRSInitialized.Tests.ps1
  - Test-SqlDscRSInstalled.Tests.ps1
  - Test-SqlDscServerPermission.Tests.ps1
  - Uninstall-SqlDscPowerBIReportServer.Tests.ps1
  - Uninstall-SqlDscReportingService.Tests.ps1
  - Uninstall-SqlDscServer.Tests.ps1
  - Update-SqlDscServer.Tests.ps1
  - Update-SqlDscServerEdition.Tests.ps1
  - Connect-Sql.Tests.ps1
  - Connect-SqlAnalysis.Tests.ps1
  - Connect-UncPath.Tests.ps1
  - ConvertTo-ServerInstanceName.Tests.ps1
  - Copy-ItemWithRobocopy.Tests.ps1
  - Disconnect-UncPath.Tests.ps1
  - Find-ExceptionByNumber.Tests.ps1
  - Get-PrimaryReplicaServerObject.Tests.ps1
  - Get-ServiceAccount.Tests.ps1
  - Get-SqlInstanceMajorVersion.Tests.ps1
  - Invoke-InstallationMediaCopy.Tests.ps1
  - Invoke-SqlScript.Tests.ps1
  - Restart-SqlClusterService.Tests.ps1
  - Restart-SqlService.Tests.ps1
  - Split-FullSqlInstanceName.Tests.ps1
  - Start-SqlSetupProcess.Tests.ps1
  - Test-ActiveNode.Tests.ps1
  - Test-AvailabilityReplicaSeedingModeAutomatic.Tests.ps1
  - Test-ClusterPermissions.Tests.ps1
  - Test-FeatureFlag.Tests.ps1
  - Test-ImpersonatePermissions.Tests.ps1
  - Test-LoginEffectivePermissions.Tests.ps1
  - Update-AvailabilityGroupReplica.Tests.ps1
- Updated all test scripts to replace references of `$script:dscModuleName` with `$script:moduleName` for the `Should-Invoke` and `Should-NotInvoke` parameters in the `BeforeAll` block.
…e:ModuleName' and 'Should-NotInvoke:ModuleName' for consistency with Pester 6
…datory checks

- Updated tests for various SQL DSC commands to replace direct checks for mandatory attributes with Should-All { $_ | Should-BeTrue } for better readability and consistency.
- Ensured that non-mandatory parameters are checked using Should-All { $_ | Should-BeFalse } where applicable.
- This change applies to tests across multiple files including Disable-SqlDscDatabaseSnapshotIsolation, Enable-SqlDscLogin, Get-SqlDscAgentAlert, and others.
…consistency

- Updated multiple unit test files to replace the use of inline script blocks with -FilterScript in assertions for parameter attributes.
- Ensured that mandatory and non-mandatory parameter checks are consistently using the same validation method across various test files.
- This change improves readability and maintains a uniform approach to parameter validation in the tests.
…ssertions

- Updated parameter handling in multiple test scripts to use 'Should:ModuleName' instead of 'Should-Invoke:ModuleName' and 'Should-NotInvoke:ModuleName'.
- Replaced 'Should -MatchExactly' assertions with 'Should-MatchString -CaseSensitive' for better clarity and consistency in tests.
- Adjusted various test cases to ensure proper invocation and parameter filtering for SQL setup processes.
- Enhanced type checking in tests to ensure expected object types are returned.
- Cleaned up redundant code and improved readability across multiple test files.
…sertions and update type checks for consistency
@johlju
johlju force-pushed the f/pester-6-attempt-2 branch from a9232be to 6db6510 Compare July 8, 2026 11:37
@johlju
johlju marked this pull request as ready for review July 8, 2026 13:30
@johlju
johlju requested a review from a team as a code owner July 8, 2026 13:30

@johlju johlju left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

@johlju reviewed 438 files and all commit messages, and made 1 comment.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on johlju).

@johlju
johlju merged commit 37ec7d0 into dsccommunity:main Jul 10, 2026
40 checks passed
@johlju
johlju deleted the f/pester-6-attempt-2 branch July 10, 2026 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant