Skip to content

Commit df405c1

Browse files
author
Hovsep Mkrtchyan
committed
Addressed feedback
1 parent 64cb8ca commit df405c1

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

src/Common/Commands.ResourceManager.Common/RMProfileClient.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,15 @@ public AzureContext SetCurrentContext(string subscriptionId, string tenantId)
8787
_profile.Context.Account,
8888
_profile.Context.Environment,
8989
new AzureTenant() { Id = new Guid(tenantId) });
90+
91+
if (_profile.Context.Account != null)
92+
{
93+
_profile.Context.Account.Properties[AzureAccount.Property.Tenants] = tenantId;
94+
}
95+
if (_profile.Context.Subscription != null)
96+
{
97+
_profile.Context.Subscription.Properties[AzureSubscription.Property.Tenants] = tenantId;
98+
}
9099
}
91100

92101
if(!string.IsNullOrWhiteSpace(subscriptionId))

src/Common/Commands.ResourceManager.Profile.Test/Commands.ResourceManager.Profile.Test.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,6 @@
183183
</ItemGroup>
184184
<ItemGroup>
185185
<Compile Include="AzureRMProfileTests.cs" />
186-
<Compile Include="ContextCmdletTests.Live.cs" />
187186
<Compile Include="MockSubscriptionClientFactory.cs" />
188187
<Compile Include="ProfileController.cs" />
189188
<Compile Include="SubscriptionCmdletTests.cs" />

0 commit comments

Comments
 (0)