@@ -31,33 +31,25 @@ Describe $CommandName -Tag IntegrationTests {
3131
3232 $loginName = " dbatoolsci_comparelogin_$ ( Get-Random ) "
3333
34- $null = New-DbaLogin - SqlInstance $TestConfig.instance2 - Login $loginName - SecurePassword (ConvertTo-SecureString " Password1234!" - AsPlainText - Force)
34+ $null = New-DbaLogin - SqlInstance $TestConfig.InstanceMulti2 - Login $loginName - SecurePassword (ConvertTo-SecureString " Password1234!" - AsPlainText - Force)
3535
3636 $PSDefaultParameterValues.Remove (" *-Dba*:EnableException" )
3737 }
3838
3939 AfterAll {
4040 $PSDefaultParameterValues [" *-Dba*:EnableException" ] = $true
4141
42- $null = Remove-DbaLogin - SqlInstance $TestConfig.instance2 - Login $loginName - Confirm:$false - ErrorAction SilentlyContinue
43- $null = Remove-DbaLogin - SqlInstance $TestConfig.instance1 - Login $loginName - Confirm:$false - ErrorAction SilentlyContinue
42+ $null = Remove-DbaLogin - SqlInstance $TestConfig.InstanceMulti2 - Login $loginName
4443
4544 $PSDefaultParameterValues.Remove (" *-Dba*:EnableException" )
4645 }
4746
4847 Context " When comparing logins between instances" {
4948 It " Returns a result with a DestinationOnly login" {
50- $result = Compare-DbaLogin - Source $TestConfig.instance1 - Destination $TestConfig.instance2 - Login $loginName
49+ $result = Compare-DbaLogin - Source $TestConfig.InstanceMulti1 - Destination $TestConfig.InstanceMulti2 - Login $loginName
5150 $result | Should -Not - BeNullOrEmpty
52- $result.Status | Should - Be " DestinationOnly"
53- }
54-
55- It " Returns correct properties on the result object" {
56- $result = Compare-DbaLogin - Source $TestConfig.instance1 - Destination $TestConfig.instance2 - Login $loginName
5751 $result.LoginName | Should - Be $loginName
58- $result.SourceServer | Should -Not - BeNullOrEmpty
59- $result.DestinationServer | Should -Not - BeNullOrEmpty
60- $result.LoginType | Should -Not - BeNullOrEmpty
52+ $result.Status | Should - Be " DestinationOnly"
6153 }
6254 }
6355}
0 commit comments