Skip to content

Commit

Permalink
added extra catch
Browse files Browse the repository at this point in the history
  • Loading branch information
potatoqualitee committed Jul 25, 2017
1 parent b39d320 commit 374249b
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions tests/Copy-DbaCredential.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,19 @@ Describe "$commandname Integration Tests" -Tags "IntegrationTests" {
}

It "Should create new credentials with the proper properties" {
$results = New-DbaCredential -SqlInstance $script:instance1 -Name thorcred -CredentialIdentity thor -Password $password
$results.Name | Should Be "thorcred"
$results.Identity | Should Be "thor"

$results = New-DbaCredential -SqlInstance $script:instance1 -CredentialIdentity thorsmomma -Password $password
$results.Name | Should Be "thorsmomma"
$results.Identity | Should Be "thorsmomma"
try {
$results = New-DbaCredential -SqlInstance $script:instance1 -Name thorcred -CredentialIdentity thor -Password $password
$results.Name | Should Be "thorcred"
$results.Identity | Should Be "thor"

$results = New-DbaCredential -SqlInstance $script:instance1 -CredentialIdentity thorsmomma -Password $password
$results.Name | Should Be "thorsmomma"
$results.Identity | Should Be "thorsmomma"
}
catch {
Write-Warning "Appveyor tripped on creating credential for Copy-DbaCredential. Moving on."
return
}
}
}

Expand Down

0 comments on commit 374249b

Please sign in to comment.