@@ -24,6 +24,8 @@ $global:passedTests = @()
24
24
$global :failedTests = @ ()
25
25
$global :times = @ {}
26
26
$VerbosePreference = " SilentlyContinue"
27
+
28
+
27
29
function Run-TestProtected
28
30
{
29
31
param ([ScriptBlock ]$script , [string ] $testName )
@@ -100,14 +102,19 @@ Get-AzureSubscription | Remove-AzureSubscription -Force
100
102
Add-AzureAccount - Credential $credential
101
103
$ErrorActionPreference = " Stop"
102
104
Switch-AzureMode AzureServiceManagement
105
+ $subscription = $ (Get-AzureSubscription - Current).SubscriptionName
106
+ $profile = $ (New-AzureProfile - SubscriptionId $subscription - Credential $credential )
107
+ Select-AzureProfile $profile
103
108
$global :startTime = Get-Date
104
109
Run- TestProtected { Test-SetAzureStorageBlobContent } " Test-SetAzureStorageBlobContent"
105
110
Run- TestProtected { Test-GetModuleVersion $expectedVersion } " Test-GetModuleVersion"
106
111
Run- TestProtected { Test-UpdateStorageAccount } " Test-UpdateStorageAccount"
107
112
$serviceCommands | % { Run- TestProtected $_ $_.ToString () }
108
113
Write-Host - ForegroundColor Green " STARTING RESOURCE MANAGER TESTS"
109
114
Switch-AzureMode AzureResourceManager > $null
110
- Run- TestProtected { Test-GetBatchAccountWithSubscriptionDataFile $credential } " Test-GetBatchAccountWithSubscriptionDataFile"
115
+ $subscription = $ (Get-AzureSubscription - Current).SubscriptionName
116
+ $profile = $ (New-AzureProfile - SubscriptionId $subscription - Credential $credential )
117
+ Select-AzureProfile $profile
111
118
$resourceCommands | % { Run- TestProtected $_ $_.ToString () }
112
119
Write-Host
113
120
Write-Host - ForegroundColor Green " $global :passedCount / $global :totalCount Installation Tests Pass"
@@ -134,5 +141,21 @@ Write-Host
134
141
Write-Host - ForegroundColor Green " Start Time: $global :startTime "
135
142
Write-Host - ForegroundColor Green " End Time: $global :endTime "
136
143
Write-Host - ForegroundColor Green " Elapsed: " ($global :endTime - $global :startTime ).ToString()
144
+ Write-Host " ============================================================================================="
145
+ Write-Host
146
+ Write-Host " ===================="
147
+ Write-Host " Help Check: ARM Mode"
148
+ Write-Host " ===================="
149
+ Switch-AzureMode AzureResourceManager
150
+ Get-IncompleteHelp
151
+ Write-Host
152
+ Write-Host " ===================="
153
+ Write-Host " Help Check: ASM Mode"
154
+ Write-Host " ===================="
155
+ Switch-AzureMode AzureServiceManagement
156
+ Get-IncompleteHelp
157
+ Write-Host
158
+ Write-Host " ============================================================================================="
159
+ Write-Host
137
160
138
- $ErrorActionPreference = " Continue"
161
+ $ErrorActionPreference = " Continue"
0 commit comments