diff --git a/tests/Remove-DbaAvailabilityGroup.Tests.ps1 b/tests/Remove-DbaAvailabilityGroup.Tests.ps1 index bd354a860f..8c22fb51d9 100644 --- a/tests/Remove-DbaAvailabilityGroup.Tests.ps1 +++ b/tests/Remove-DbaAvailabilityGroup.Tests.ps1 @@ -16,11 +16,12 @@ Describe "$commandname Unit Tests" -Tag 'UnitTests' { Describe "$commandname Integration Tests" -Tag "IntegrationTests" { BeforeAll { $agname = "dbatoolsci_removewholegroup" - $null = New-DbaAvailabilityGroup -Primary $script:instance3 -Name $agname -ClusterType None -FailoverMode Manual -Confirm:$false + $null = New-DbaAvailabilityGroup -Primary $script:instance3 -Name $agname -ClusterType None -FailoverMode Manual -Certificate dbatoolsci_AGCert -Confirm:$false } Context "removes the newly created ag" { It "removes the ag" { - $results = Remove-DbaAvailabilityGroup -SqlInstance $script:instance3 -AvailabilityGroup $agname -Confirm:$false + $results = Remove-DbaAvailabilityGroup -SqlInstance $script:instance3 -AvailabilityGroup $agname -Confirm:$false -WarningVariable warn + $warn | Should -BeNullorEmpty $results.Status | Should -Be 'Removed' $results.AvailabilityGroup | Should -Be $agname } diff --git a/tests/pester.groups.ps1 b/tests/pester.groups.ps1 index 5a373e9670..7815585e77 100644 --- a/tests/pester.groups.ps1 +++ b/tests/pester.groups.ps1 @@ -22,47 +22,32 @@ $TestsRunGroups = @{ ) # do not run on appveyor "appveyor_disabled" = @( - # takes too long - 'Install-DbaSqlWatch', - 'Uninstall-DbaSqlWatch', - 'Get-DbaExecutionPlan', - # Non-useful info from newly started sql servers - 'Get-DbaCpuRingBuffer', - 'Get-DbaLatchStatistic', - # fails on newer version of SMO + # tests that work locally against SQL Server 2022 instances without problems but fail on AppVeyor + 'ConvertTo-DbaXESession', + 'Export-DbaUser', + 'Get-DbaPermission', 'Get-DbaUserPermission', - 'Invoke-DbaBalanceDataFiles', - 'Invoke-DbaWhoisActive', # Works locally aganint a SQL Server 2022 instance without problems. 'Install-DbaDarlingData', - # previous tests that were failing on older versions too + 'Invoke-DbaWhoisActive', 'Remove-DbaAvailabilityGroup', - 'Read-DbaAuditFile', + 'Remove-DbaDatabaseSafely', 'Sync-DbaLoginPermission', - 'Read-DbaXEFile', - 'Stop-DbaXESession', - 'Test-DbaTempDbConfig', - #'New-DbaDbUser', - 'Stop-DbaXESession', + # tests that fail locally against SQL Server 2022 instances and fail on AppVeyor + 'Set-DbaAgentJobStep', 'New-DbaLogin', 'Watch-DbaDbLogin', - 'ConvertTo-DbaXESession', - 'Test-DbaInstanceName', - 'Test-DbaDeprecatedFeature', - 'Remove-DbaDatabaseSafely', - 'Get-DbaDbMasterKey', - 'Get-DbaPermission', - 'Test-DbaManagementObject', + # tests that fail because the command does not work + 'Copy-DbaDbCertificate', 'Export-DbaDacPackage', - 'New-DbaDbTransfer', - 'Get-DbaDbSynonym', - 'Get-DbaDbVirtualLogFile', - 'Get-DbaFile', - 'Get-DbaHelpIndex', - 'Get-DbaExternalProcess', - # just fails too often - 'Test-DbaMaxDop', - 'Test-DbaOptimizeForAdHoc', - 'New-DbaDbSnapshot' + 'Read-DbaAuditFile', + 'Read-DbaXEFile', + # takes too long + 'Install-DbaSqlWatch', + 'Uninstall-DbaSqlWatch', + 'Get-DbaExecutionPlan', + # Non-useful info from newly started sql servers + 'Get-DbaCpuRingBuffer', + 'Get-DbaLatchStatistic' ) # do not run everywhere "disabled" = @()