Skip to content

Commit 4ea417b

Browse files
committed
Merge pull request #557 from karlaugsten/dev
Add test parameter
2 parents b8923d5 + da8fb23 commit 4ea417b

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

src/ResourceManager/KeyVault/Commands.KeyVault.Test/Scripts/Common.ps1

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,11 @@ Get test key name
2323
#>
2424
function Get-KeyVault([bool] $haspermission=$true)
2525
{
26-
if ($global:testEnv -eq 'BVT' -and $haspermission)
26+
if ($global:testVault -ne "" -and $haspermission)
27+
{
28+
return $global:testVault
29+
}
30+
elseif ($global:testEnv -eq 'BVT' -and $haspermission)
2731
{
2832
return 'powershellbvt'
2933
}

src/ResourceManager/KeyVault/Commands.KeyVault.Test/Scripts/RunKeyVaultTests.ps1

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,10 @@
44
[Parameter(Mandatory=$false,Position=1)]
55
[ValidateSet('ControlPlane','DataPlane', 'All')]
66
[string]$TestMode = 'All',
7-
[Parameter(Mandatory=$false,Position=2, ParameterSetName="DPTests")]
8-
[ValidateSet('BVT','PROD')]
9-
[string]$TestEnvironment = 'PROD',
10-
[Parameter(Mandatory=$false,Position=2, ParameterSetName="CPTests")]
11-
[string]$Location = 'eastus2'
7+
[Parameter(Mandatory=$false,Position=2)]
8+
[string]$Location = 'eastus2',
9+
[Parameter(Mandatory=$false, Position=3)]
10+
[string]$Vault = ""
1211
)
1312

1413
$invocationPath = Split-Path $MyInvocation.MyCommand.Definition;
@@ -26,9 +25,10 @@ $global:passedCount = 0;
2625
$global:passedTests = @()
2726
$global:failedTests = @()
2827
$global:times = @{}
29-
$global:testEnv = $TestEnvironment.ToUpperInvariant()
28+
$global:testEnv = 'PROD';
3029
$global:testns = $TestRunNameSpace
3130
$global:location = $location
31+
$global:testVault = $Vault
3232

3333
function Run-TestProtected
3434
{

0 commit comments

Comments
 (0)