Skip to content

Commit e674342

Browse files
azure-powershell-botazurepowershell
andauthored
Sync tools folder from main branch to generation branch (#23755)
Co-authored-by: azurepowershell <[email protected]>
1 parent 187e295 commit e674342

File tree

5 files changed

+1952
-1761
lines changed

5 files changed

+1952
-1761
lines changed

tools/Az/Az.psd1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ RequiredModules = @(@{ModuleName = 'Az.Accounts'; ModuleVersion = '2.13.2'; },
6363
@{ModuleName = 'Az.ArcResourceBridge'; RequiredVersion = '1.0.0'; },
6464
@{ModuleName = 'Az.Attestation'; RequiredVersion = '2.0.0'; },
6565
@{ModuleName = 'Az.Automanage'; RequiredVersion = '1.0.0'; },
66-
@{ModuleName = 'Az.Automation'; RequiredVersion = '1.9.1'; },
66+
@{ModuleName = 'Az.Automation'; RequiredVersion = '1.10.0'; },
6767
@{ModuleName = 'Az.Batch'; RequiredVersion = '3.5.0'; },
6868
@{ModuleName = 'Az.Billing'; RequiredVersion = '2.0.3'; },
6969
@{ModuleName = 'Az.Cdn'; RequiredVersion = '3.1.1'; },

tools/AzPreview/AzPreview.psd1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ RequiredModules = @(@{ModuleName = 'Az.Accounts'; ModuleVersion = '2.13.2'; },
6666
@{ModuleName = 'Az.ArcResourceBridge'; RequiredVersion = '1.0.0'; },
6767
@{ModuleName = 'Az.Attestation'; RequiredVersion = '2.0.0'; },
6868
@{ModuleName = 'Az.Automanage'; RequiredVersion = '1.0.0'; },
69-
@{ModuleName = 'Az.Automation'; RequiredVersion = '1.9.1'; },
69+
@{ModuleName = 'Az.Automation'; RequiredVersion = '1.10.0'; },
7070
@{ModuleName = 'Az.BareMetal'; RequiredVersion = '0.1.0'; },
7171
@{ModuleName = 'Az.Batch'; RequiredVersion = '3.5.0'; },
7272
@{ModuleName = 'Az.Billing'; RequiredVersion = '2.0.3'; },

tools/Docs/az-ps-latest.csv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ pac10,[ps=true;customSource=https://azpspackage.blob.core.windows.net/docs-relea
1212
pac11,[ps=true;customSource=https://azpspackage.blob.core.windows.net/docs-release/Az.ArcResourceBridge.1.0.0.nupkg;sourceType=sa]Az.ArcResourceBridge,1.0.0
1313
pac12,[ps=true;customSource=https://azpspackage.blob.core.windows.net/docs-release/Az.Attestation.2.0.0.nupkg;sourceType=sa]Az.Attestation,2.0.0
1414
pac13,[ps=true;customSource=https://azpspackage.blob.core.windows.net/docs-release/Az.Automanage.1.0.0.nupkg;sourceType=sa]Az.Automanage,1.0.0
15-
pac14,[ps=true;customSource=https://azpspackage.blob.core.windows.net/docs-release/Az.Automation.1.9.1.nupkg;sourceType=sa]Az.Automation,1.9.1
15+
pac14,[ps=true;customSource=https://azpspackage.blob.core.windows.net/docs-release/Az.Automation.1.10.0.nupkg;sourceType=sa]Az.Automation,1.10.0
1616
pac15,[ps=true;customSource=https://azpspackage.blob.core.windows.net/docs-release/Az.BareMetal.0.1.0.nupkg;sourceType=sa]Az.BareMetal,0.1.0
1717
pac16,[ps=true;customSource=https://azpspackage.blob.core.windows.net/docs-release/Az.Batch.3.5.0.nupkg;sourceType=sa]Az.Batch,3.5.0
1818
pac17,[ps=true;customSource=https://azpspackage.blob.core.windows.net/docs-release/Az.Billing.2.0.3.nupkg;sourceType=sa]Az.Billing,2.0.3

tools/TestFx/Mocks/MockContext.cs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ public T GetServiceClient<T>(TestEnvironment currentEnvironment, bool internalBa
106106
$"Unable to create Service Client because {nameof(T)} authentication token was not acquired during Login.");
107107
}
108108

109-
return GetServiceClientWithCredentials<T>(currentEnvironment, currentEnvironment.TokenInfo[TokenAudience.Management], internalBaseUri, handlers);
109+
return GetServiceClientWithCredentials<T>(currentEnvironment, currentEnvironment.BaseUri, currentEnvironment.TokenInfo[TokenAudience.Management], internalBaseUri, handlers);
110110
}
111111

112112
/// <summary>
@@ -135,7 +135,7 @@ public T GetGraphServiceClient<T>(TestEnvironment currentEnvironment, bool inter
135135
"Unable to create Graph Client because Graph authentication token was not acquired during Login.");
136136
}
137137

138-
return GetServiceClientWithCredentials<T>(currentEnvironment, currentEnvironment.TokenInfo[TokenAudience.Graph], internalBaseUri, handlers);
138+
return GetServiceClientWithCredentials<T>(currentEnvironment, currentEnvironment.Endpoints.GraphUri, currentEnvironment.TokenInfo[TokenAudience.Graph], internalBaseUri, handlers);
139139
}
140140

141141
/// <summary>
@@ -146,14 +146,15 @@ public T GetGraphServiceClient<T>(TestEnvironment currentEnvironment, bool inter
146146
/// <param name="baseUri">Base Uri</param>
147147
/// <param name="handlers">Delegating existingHandlers</param>
148148
/// <returns></returns>
149-
public T GetServiceClientWithCredentials<T>(TestEnvironment currentEnvironment, object credentials, bool internalBaseUri = false, params DelegatingHandler[] handlers) where T : class
149+
public T GetServiceClientWithCredentials<T>(TestEnvironment currentEnvironment, Uri baseUri, object credentials, bool internalBaseUri, params DelegatingHandler[] handlers) where T : class
150150
{
151151
T client;
152152
handlers = AddHandlers(currentEnvironment, handlers);
153153
var constructors = typeof(T).GetConstructors(BindingFlags.Public | BindingFlags.Static | BindingFlags.Instance | BindingFlags.NonPublic);
154154

155+
Uri uri = baseUri ?? currentEnvironment.BaseUri;
155156
ConstructorInfo constructor = null;
156-
if (!internalBaseUri && currentEnvironment.BaseUri != null)
157+
if (!internalBaseUri && uri != null)
157158
{
158159
foreach (var c in constructors)
159160
{
@@ -173,7 +174,7 @@ public T GetServiceClientWithCredentials<T>(TestEnvironment currentEnvironment,
173174
}
174175
client = constructor.Invoke(new object[]
175176
{
176-
currentEnvironment.BaseUri,
177+
uri,
177178
credentials,
178179
handlers
179180
}) as T;

0 commit comments

Comments
 (0)