From 8bbd28d3ef4377447c74bca5a73ce8d164b44929 Mon Sep 17 00:00:00 2001 From: Chrissy LeMaire Date: Sun, 27 Oct 2024 12:42:21 +0100 Subject: [PATCH] it refuses --- tests/Dismount-DbaDatabase.Tests.ps1 | 33 ++++++++++++++-------------- tests/pester.groups.ps1 | 1 + 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/tests/Dismount-DbaDatabase.Tests.ps1 b/tests/Dismount-DbaDatabase.Tests.ps1 index bfff22c6f1..d2a846425b 100644 --- a/tests/Dismount-DbaDatabase.Tests.ps1 +++ b/tests/Dismount-DbaDatabase.Tests.ps1 @@ -5,23 +5,22 @@ param( ) Describe "Dismount-DbaDatabase" -Tag "UnitTests" { + BeforeAll { + $command = Get-Command Dismount-DbaDatabase + $expected = $TestConfig.CommonParameters + $expected += @( + "SqlInstance", + "SqlCredential", + "Database", + "InputObject", + "UpdateStatistics", + "Force", + "EnableException", + "Confirm", + "WhatIf" + ) + } Context "Parameter validation" { - BeforeAll { - $command = Get-Command Dismount-DbaDatabase - $expected = $TestConfig.CommonParameters - $expected += @( - "SqlInstance", - "SqlCredential", - "Database", - "InputObject", - "UpdateStatistics", - "Force", - "EnableException", - "Confirm", - "WhatIf" - ) - } - It "Has parameter: <_>" -ForEach $expected { $command | Should -HaveParameter $PSItem } @@ -103,7 +102,7 @@ Describe "Dismount-DbaDatabase" -Tag "IntegrationTests" { $database | Should -Not -BeNullOrEmpty } - It "Should detach database without snapshots" -Skip { + It "Should detach database without snapshots" { # skip for now in appveyor, but when we do troubleshoot, maybe it just needs a sleep Start-Sleep 3 $null = Stop-DbaProcess -SqlInstance $TestConfig.instance3 -Database $dbDetached diff --git a/tests/pester.groups.ps1 b/tests/pester.groups.ps1 index b50102d51b..395802529e 100644 --- a/tests/pester.groups.ps1 +++ b/tests/pester.groups.ps1 @@ -32,6 +32,7 @@ $TestsRunGroups = @{ 'Remove-DbaAvailabilityGroup', 'Remove-DbaDatabaseSafely', 'Sync-DbaLoginPermission', + 'Dismount-DbaDatabase', # tests that fail locally against SQL Server 2022 instances and fail on AppVeyor 'Set-DbaAgentJobStep', 'New-DbaLogin',