Skip to content

Commit 2ab7917

Browse files
author
Hovsep
committed
Merge pull request #1912 from hovsepm/dev
[#115201881] Fix for "Select-AzureSubscription wipes CurrentStorageAccount field" bug
2 parents 60517b4 + a3bfecb commit 2ab7917

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

src/ServiceManagement/Services/Commands.Test/Commands.Test.csproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -415,6 +415,9 @@
415415
<None Include="SessionRecords\Microsoft.Azure.Commands.Test.Profile.NewAzureProfileTests\TestMakeRdfeCallWithCreatedProfile.json">
416416
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
417417
</None>
418+
<None Include="SessionRecords\Microsoft.Azure.Commands.Test.Profile.SelectAzureSubscriptionTests\StorageAccountIsNotCleaned.json">
419+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
420+
</None>
418421
</ItemGroup>
419422
<ItemGroup>
420423
<ProjectReference Include="..\..\..\Common\Commands.Common.Authentication\Commands.Common.Authentication.csproj">

src/ServiceManagement/Services/Commands.Test/Profile/SelectAzureSubscriptionTests.ps1

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,7 @@ Tests creating new azure profile with access token
1919
function Test-StorageAccountIsNotCleaned
2020
{
2121
Set-AzureSubscription -SubscriptionId 2c224e7e-3ef5-431d-a57b-e71f4662e3a6 -CurrentStorageAccount teststorage1220
22-
Select-AzureSubscription -SubscriptionId 2c224e7e-3ef5-431d-a57b-e71f4662e3a6
23-
$subscription = Get-AzureSubscription -SubscriptionId 2c224e7e-3ef5-431d-a57b-e71f4662e3a6
24-
$storageContainer = Get-AzureStorageContainer
25-
Assert-NotNull $($subscription.CurrentStorageAccountName)
26-
Assert-NotNull $($storageContainer)
22+
Select-AzureSubscription -SubscriptionId 2c224e7e-3ef5-431d-a57b-e71f4662e3a6
23+
$subscription = Get-AzureSubscription -SubscriptionId 2c224e7e-3ef5-431d-a57b-e71f4662e3a6
24+
Assert-NotNull $($subscription.CurrentStorageAccountName)
2725
}

0 commit comments

Comments
 (0)