Skip to content

Commit 342136e

Browse files
committed
added test to installationtests
1 parent dea4013 commit 342136e

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

tools/InstallationTests/InstallationTest.ps1

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,14 @@ function Test-UpdateStorageAccount
4141
Set-AzureSubscription -SubscriptionName $subscription -CurrentStorageAccountName $accounts[1].StorageAccountName
4242
$storageAccountName = $(Get-AzureStorageContainer)[0].Context.StorageAccountName
4343
Assert-AreEqual $storageAccountName $accounts[1].StorageAccountName
44+
}
45+
46+
function Test-GetBatchAccountWithSubscriptionDataFile
47+
{
48+
param([PSCredential] $credential)
49+
Get-AzureSubscription | Remove-AzureSubscription -Force
50+
$account = Add-AzureAccount -Credential $credential -SubscriptionDataFile "File.txt"
51+
Select-AzureSubscription -SubscriptionId $account.Subscriptions.Split("`r`n")[0] -SubscriptionDataFile "File.txt"
52+
Get-AzureBatchAccount
53+
Add-AzureAccount -Credential $credential
4454
}

tools/InstallationTests/RunInstallationTests.ps1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ Run-TestProtected { Test-UpdateStorageAccount } "Test-UpdateStorageAccount"
107107
$serviceCommands | % { Run-TestProtected $_ $_.ToString() }
108108
Write-Host -ForegroundColor Green "STARTING RESOURCE MANAGER TESTS"
109109
Switch-AzureMode AzureResourceManager > $null
110+
Run-TestProtected { Test-GetBatchAccountWithSubscriptionDataFile $credential} "Test-GetBatchAccountWithSubscriptionDataFile"
110111
$resourceCommands | % { Run-TestProtected $_ $_.ToString() }
111112
Write-Host
112113
Write-Host -ForegroundColor Green "$global:passedCount / $global:totalCount Installation Tests Pass"

0 commit comments

Comments
 (0)