File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
src/Sql/Sql.Test/ScenarioTests Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 33
33
using CommonMonitor = Microsoft . Azure . Management . Monitor . Version2018_09_01 ;
34
34
using Microsoft . Azure . Management . KeyVault ;
35
35
using Microsoft . Azure . Graph . RBAC ;
36
+ using Microsoft . Azure . Commands . Common . Authentication . Abstractions ;
36
37
37
38
namespace Microsoft . Azure . Commands . ScenarioTest . SqlTests
38
39
{
@@ -85,8 +86,8 @@ protected void RunPowerShellTest(params string[] scripts)
85
86
// Enable undo functionality as well as mock recording
86
87
using ( var context = MockContext . Start ( callingClassType , mockName ) )
87
88
{
88
- SetupManagementClients ( context ) ;
89
89
Helper . SetupEnvironment ( AzureModule . AzureResourceManager ) ;
90
+ SetupManagementClients ( context ) ;
90
91
Helper . SetupModules ( AzureModule . AzureResourceManager ,
91
92
"ScenarioTests\\ Common.ps1" ,
92
93
"ScenarioTests\\ " + GetType ( ) . Name + ".ps1" ,
@@ -159,6 +160,13 @@ protected Microsoft.Azure.Graph.RBAC.Version1_6.GraphRbacManagementClient GetGra
159
160
}
160
161
}
161
162
graphClient . TenantID = tenantId ;
163
+ if ( AzureRmProfileProvider . Instance != null &&
164
+ AzureRmProfileProvider . Instance . Profile != null &&
165
+ AzureRmProfileProvider . Instance . Profile . DefaultContext != null &&
166
+ AzureRmProfileProvider . Instance . Profile . DefaultContext . Tenant != null )
167
+ {
168
+ AzureRmProfileProvider . Instance . Profile . DefaultContext . Tenant . Id = tenantId ;
169
+ }
162
170
return graphClient ;
163
171
}
164
172
You can’t perform that action at this time.
0 commit comments