File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
src/ResourceManager/Profile/Commands.Profile.Test Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -22,16 +22,20 @@ function Test-LoadProfileModule
22
22
$global :pushedProfileModule = $ (Get-Module AzureRM.Profile).Path
23
23
Remove-Module AzureRM.Profile
24
24
try {
25
- Register-PSRepository - Name " ProfileModuleTest" - SourceLocation (Resolve-Path .\).Path - InstallationPolicy Trusted
25
+ Register-PSRepository - Name " ProfileModuleTest" - SourceLocation (Resolve-Path .\FakeModuleRepo ).Path - InstallationPolicy Trusted
26
26
try {
27
27
Install-Module AzureRM.ApiManagement - Scope CurrentUser - Repository ProfileModuleTest - RequiredVersion 998.9 .8
28
28
$global :buffer = Import-Module $global :pushedProfileModule 2>&1 3>&1 | Out-String
29
29
Write-Warning $global :buffer
30
30
Assert-True { $global :buffer -Like " *AzureRM.ApiManagement 998.9.8 is not compatible with AzureRM.Profile*" }
31
+ } catch [system.exception ] {
32
+ Write-Error $_ - ErrorAction Continue
31
33
} finally {
32
34
Uninstall-Module AzureRM.ApiManagement - ErrorAction Ignore
33
35
Uninstall-Module AzureRM.Profile - ErrorAction Ignore
34
36
}
37
+ } catch [system.exception ] {
38
+ Write-Error $_ - ErrorAction Continue
35
39
} finally {
36
40
Unregister-PSRepository - Name " ProfileModuleTest"
37
41
}
You can’t perform that action at this time.
0 commit comments