Skip to content

Commit

Permalink
add live-only tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Yeming Liu committed Jan 26, 2021
1 parent 7f738a8 commit 8d7b888
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/KeyVault/KeyVault.Test/PesterTests/Key.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,15 @@ Describe "Update key" {
Get-AzKeyVaultKey -VaultName $vaultName -Name $keyName -IncludeVersions | Update-AzKeyVaultKey -Enable $true
Get-AzKeyVaultKey -VaultName $vaultName -Name $keyName -IncludeVersions | ForEach-Object { $_.Enabled | Should -BeTrue }
}
}

Describe "Add key" {
It "should throw when key type EC and curve name are not paired" {
{
Add-AzKeyVaultKey -VaultName veakkine-kv -Name PSECImportedKey -KeyFilePath E:\targetBlob.byok -KeyType EC -ErrorAction Stop
} | Should -Throw "CurveName"
{
Add-AzKeyVaultKey -VaultName veakkine-kv -Name PSECImportedKey -KeyFilePath E:\targetBlob.byok -CurveName P-256 -ErrorAction Stop
} | Should -Throw "KeyType"
}
}

0 comments on commit 8d7b888

Please sign in to comment.