Skip to content

Commit

Permalink
Merge pull request #34 from Azure/dev
Browse files Browse the repository at this point in the history
.
  • Loading branch information
huangpf committed Jun 30, 2015
2 parents e68d101 + 85ec2b7 commit 422520e
Show file tree
Hide file tree
Showing 7 changed files with 589 additions and 127 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,8 @@
<None Include="ScenarioTests\Common.ps1">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="ScenarioTests\KeyVaultManagementTests.ps1">
<None Include="Scripts\ControlPlane\KeyVaultManagementTests.ps1">
<Link>ScenarioTests\KeyVaultManagementTests.ps1</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="SessionRecords\Microsoft.Azure.Commands.KeyVault.Test.ScenarioTests.KeyVaultManagementTests\TestCreateDeleteVaultWithPiping.json">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Get test secret name
#>
function Get-SecretName([string]$suffix)
{
return 'pshts-' + $global:testns+ '-' + $suffix
return 'pshts-' + $global:testns + '-' + $suffix
}


Expand Down Expand Up @@ -240,6 +240,18 @@ function Run-SecretTest ([ScriptBlock] $test, [string] $testName)
}
}

function Run-VaultTest ([ScriptBlock] $test, [string] $testName)
{
try
{
Run-Test $test $testName *>> "$testName.debug_log"
}
finally
{

}
}

function Write-FileReport
{
$fileName = "$global:testEnv"+"$global:testns"+"Summary.debug_log"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# ----------------------------------------------------------------------------------
#
# Copyright Microsoft Corporation
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ----------------------------------------------------------------------------------

<#
.SYNOPSIS
Gets the location for the Website. Default to West US if none found.
#>
function Get-Location
{
$location = Get-AzureLocation | where {$_.Name -eq "Microsoft.KeyVault/vaults"}
if ($location -eq $null)
{
return "East US"
}
else
{
$location.Locations[0]
}
}

<#
.SYNOPSIS
Gets the default location for a provider
#>
function Get-ProviderLocation($provider)
{
$location = Get-AzureLocation | where {$_.Name -eq $provider}
if ($location -eq $null) {
"East US"
} else {
$location.Locations[0]
}
}

Large diffs are not rendered by default.

Loading

0 comments on commit 422520e

Please sign in to comment.