File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -23,13 +23,20 @@ Describe "$commandname Integration Tests" -Tag "IntegrationTests" {
23
23
Remove-DbaDatabase - SqlInstance $script :instance2 - Database $db1 - Confirm:$false
24
24
$null = Get-DbaDatabase - SqlInstance $script :instance2 - Database $db1 | Remove-DbaDatabase - Confirm:$false
25
25
$null = $server.Query (" CREATE DATABASE $db1 " )
26
+
27
+ Get-DbaEndpoint - SqlInstance $script :instance2 - Type DatabaseMirroring | Remove-DbaEndpoint - Confirm:$false
28
+ New-DbaEndpoint - SqlInstance $script :instance2 - Name dbatoolsci_MirroringEndpoint - Type DatabaseMirroring - Port 5022 - Owner sa
29
+ Get-DbaEndpoint - SqlInstance $script :instance3 - Type DatabaseMirroring | Remove-DbaEndpoint - Confirm:$false
30
+ New-DbaEndpoint - SqlInstance $script :instance3 - Name dbatoolsci_MirroringEndpoint - Type DatabaseMirroring - Port 5023 - Owner sa
26
31
}
27
32
AfterAll {
33
+ $null = Remove-DbaDbMirror - SqlInstance $script :instance2 , $script :instance3 - Database $db1 - Confirm:$false
28
34
$null = Remove-DbaDatabase - Confirm:$false - SqlInstance $script :instance2 , $script :instance3 - Database $db1 - ErrorAction SilentlyContinue
29
35
}
30
36
31
37
It " returns success" {
32
- $results = Invoke-DbaDbMirroring - Primary $script :instance2 - Mirror $script :instance3 - Database $db1 - Confirm:$false - Force - SharedPath C:\temp
38
+ $results = Invoke-DbaDbMirroring - Primary $script :instance2 - Mirror $script :instance3 - Database $db1 - Confirm:$false - Force - SharedPath C:\temp - WarningVariable warn
39
+ $warn | Should - BeNullOrEmpty
33
40
$results.Status | Should - Be ' Success'
34
41
}
35
42
}
Original file line number Diff line number Diff line change @@ -34,9 +34,6 @@ $TestsRunGroups = @{
34
34
' Invoke-DbaBalanceDataFiles' ,
35
35
' Invoke-DbaWhoisActive' , # Works locally aganint a SQL Server 2022 instance without problems.
36
36
' Install-DbaDarlingData' ,
37
- # impossible to do within one server
38
- # "the partner server name must be distinct"
39
- ' Invoke-DbaDbMirroring' ,
40
37
# previous tests that were failing on older versions too
41
38
' Remove-DbaAvailabilityGroup' ,
42
39
' Read-DbaAuditFile' ,
You can’t perform that action at this time.
0 commit comments