8
8
[string ]$Location = ' eastus2' ,
9
9
[Parameter (Mandatory = $false , Position = 3 )]
10
10
[string ]$Vault = " " ,
11
- [Parameter (Mandatory = $false , Position = 3 )]
12
- [string ]$ResourceGroup = " "
11
+ [Parameter (Mandatory = $false , Position = 4 )]
12
+ [string ]$ResourceGroup = " " ,
13
+ [Parameter (Mandatory = $false , Position = 5 )]
14
+ [bool ]$StandardVaultOnly = $false
13
15
)
14
16
15
17
$invocationPath = Split-Path $MyInvocation.MyCommand.Definition ;
@@ -32,6 +34,7 @@ $global:testns = $TestRunNameSpace
32
34
$global :location = $location
33
35
$global :testVault = $Vault
34
36
$global :resourceGroupName = $ResourceGroup
37
+ $global :standardVaultOnly = $StandardVaultOnly
35
38
36
39
function Run-TestProtected
37
40
{
@@ -76,8 +79,11 @@ function Run-AllControlPlaneTests
76
79
try
77
80
{
78
81
# New-AzureRmKeyVault tests
82
+ if ($global :standardVaultOnly -eq $false )
83
+ {
84
+ Run- TestProtected { Run- VaultTest { Test_CreateNewPremiumVaultEnabledForDeployment } " Test_CreateNewPremiumVaultEnabledForDeployment" } " Test_CreateNewPremiumVaultEnabledForDeployment"
85
+ }
79
86
Run- TestProtected { Run- VaultTest { Test_CreateNewVault } " Test_CreateNewVault" } " Test_CreateNewVault"
80
- Run- TestProtected { Run- VaultTest { Test_CreateNewPremiumVaultEnabledForDeployment } " Test_CreateNewPremiumVaultEnabledForDeployment" } " Test_CreateNewPremiumVaultEnabledForDeployment"
81
87
Run- TestProtected { Run- VaultTest { Test_RecreateVaultFails } " Test_RecreateVaultFails" } " Test_RecreateVaultFails"
82
88
Run- TestProtected { Run- VaultTest { Test_CreateVaultInUnknownResGrpFails } " Test_CreateVaultInUnknownResGrpFails" } " Test_CreateVaultInUnknownResGrpFails"
83
89
Run- TestProtected { Run- VaultTest { Test_CreateVaultPositionalParams } " Test_CreateVaultPositionalParams" } " Test_CreateVaultPositionalParams"
@@ -130,16 +136,22 @@ function Run-AllDataPlaneTests
130
136
# Add-AzureKeyVaultKey tests
131
137
Run- TestProtected { Run- KeyTest {Test_CreateSoftwareKeyWithDefaultAttributes} " Test_CreateSoftwareKeyWithDefaultAttributes" } " Test_CreateSoftwareKeyWithDefaultAttributes"
132
138
Run- TestProtected { Run- KeyTest {Test_CreateSoftwareKeyWithCustomAttributes} " Test_CreateSoftwareKeyWithCustomAttributes" } " Test_CreateSoftwareKeyWithCustomAttributes"
133
- Run- TestProtected { Run- KeyTest {Test_CreateHsmKeyWithDefaultAttributes} " Test_CreateHsmKeyWithDefaultAttributes" } " Test_CreateHsmKeyWithDefaultAttributes"
134
- Run- TestProtected { Run- KeyTest {Test_CreateHsmKeyWithCustomAttributes} " Test_CreateHsmKeyWithCustomAttributes" } " Test_CreateHsmKeyWithCustomAttributes"
139
+
140
+ # All operations involving HSM keys
141
+ if ($global :standardVaultOnly -eq $false )
142
+ {
143
+ Run- TestProtected { Run- KeyTest {Test_CreateHsmKeyWithDefaultAttributes} " Test_CreateHsmKeyWithDefaultAttributes" } " Test_CreateHsmKeyWithDefaultAttributes"
144
+ Run- TestProtected { Run- KeyTest {Test_CreateHsmKeyWithCustomAttributes} " Test_CreateHsmKeyWithCustomAttributes" } " Test_CreateHsmKeyWithCustomAttributes"
145
+ Run- TestProtected { Run- KeyTest {Test_ImportPfxAsHsmWithDefaultAttributes} " Test_ImportPfxAsHsmWithDefaultAttributes" } " Test_ImportPfxAsHsmWithDefaultAttributes"
146
+ Run- TestProtected { Run- KeyTest {Test_ImportPfxAsHsmWithCustomAttributes} " Test_ImportPfxAsHsmWithCustomAttributes" } " Test_ImportPfxAsHsmWithCustomAttributes"
147
+ Run- TestProtected { Run- KeyTest {Test_ImportByokWithDefaultAttributes} " Test_ImportByokWithDefaultAttributes" } " Test_ImportByokWithDefaultAttributes"
148
+ Run- TestProtected { Run- KeyTest {Test_ImportByokWith1024BitKey} " Test_ImportByokWith1024BitKey" } " Test_ImportByokWith1024BitKey"
149
+ Run- TestProtected { Run- KeyTest {Test_ImportByokWithCustomAttributes} " Test_ImportByokWithCustomAttributes" } " Test_ImportByokWithCustomAttributes"
150
+ }
151
+
135
152
Run- TestProtected { Run- KeyTest {Test_ImportPfxWithDefaultAttributes} " Test_ImportPfxWithDefaultAttributes" } " Test_ImportPfxWithDefaultAttributes"
136
153
Run- TestProtected { Run- KeyTest {Test_ImportPfxWith1024BitKey} " Test_ImportPfxWith1024BitKey" } " Test_ImportPfxWith1024BitKey"
137
154
Run- TestProtected { Run- KeyTest {Test_ImportPfxWithCustomAttributes} " Test_ImportPfxWithCustomAttributes" } " Test_ImportPfxWithCustomAttributes"
138
- Run- TestProtected { Run- KeyTest {Test_ImportPfxAsHsmWithDefaultAttributes} " Test_ImportPfxAsHsmWithDefaultAttributes" } " Test_ImportPfxAsHsmWithDefaultAttributes"
139
- Run- TestProtected { Run- KeyTest {Test_ImportPfxAsHsmWithCustomAttributes} " Test_ImportPfxAsHsmWithCustomAttributes" } " Test_ImportPfxAsHsmWithCustomAttributes"
140
- Run- TestProtected { Run- KeyTest {Test_ImportByokWithDefaultAttributes} " Test_ImportByokWithDefaultAttributes" } " Test_ImportByokWithDefaultAttributes"
141
- Run- TestProtected { Run- KeyTest {Test_ImportByokWith1024BitKey} " Test_ImportByokWith1024BitKey" } " Test_ImportByokWith1024BitKey"
142
- Run- TestProtected { Run- KeyTest {Test_ImportByokWithCustomAttributes} " Test_ImportByokWithCustomAttributes" } " Test_ImportByokWithCustomAttributes"
143
155
Run- TestProtected { Run- KeyTest {Test_AddKeyPositionalParameter} " Test_AddKeyPositionalParameter" } " Test_AddKeyPositionalParameter"
144
156
Run- TestProtected { Run- KeyTest {Test_AddKeyAliasParameter} " Test_AddKeyAliasParameter" } " Test_AddKeyAliasParameter"
145
157
Run- TestProtected { Run- KeyTest {Test_ImportNonExistPfxFile} " Test_ImportNonExistPfxFile" } " Test_ImportNonExistPfxFile"
0 commit comments