Skip to content

Commit 65f54ce

Browse files
author
maddieclayton
committed
fix tesT
1 parent 67494e8 commit 65f54ce

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

src/ResourceManager/Aks/Commands.Aks.Test/ScenarioTests/TestController.cs

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,22 +39,23 @@ public void RunPowerShellTest(params string[] scripts)
3939
var callingClassType = TestUtilities.GetCallingClass(2);
4040
var mockName = TestUtilities.GetCurrentMethodName(2);
4141

42+
Dictionary<string, string> d = new Dictionary<string, string>();
43+
d.Add("Microsoft.Features", null);
44+
d.Add("Microsoft.Authorization", null);
45+
var providersToIgnore = new Dictionary<string, string>
46+
{
47+
{"Microsoft.Azure.Management.Resources.ResourceManagementClient", "2017-05-10"}
48+
};
49+
HttpMockServer.Matcher = new PermissiveRecordMatcherWithApiExclusion(false, d, providersToIgnore);
50+
HttpMockServer.RecordsDirectory = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "SessionRecords");
51+
4252
using (var context = MockContext.Start(callingClassType, mockName))
4353
{
4454
SetupManagementClients(context);
4555
var callingClassName = callingClassType
4656
.Split(new[] { "." }, StringSplitOptions.RemoveEmptyEntries)
4757
.Last();
4858

49-
Dictionary<string, string> d = new Dictionary<string, string>();
50-
d.Add("Microsoft.Features", null);
51-
d.Add("Microsoft.Authorization", null);
52-
var providersToIgnore = new Dictionary<string, string>
53-
{
54-
{"Microsoft.Azure.Management.Resources.ResourceManagementClient", "2017-05-10"}
55-
};
56-
HttpMockServer.Matcher = new PermissiveRecordMatcherWithApiExclusion(false, d, providersToIgnore);
57-
5859
helper.SetupEnvironment(AzureModule.AzureResourceManager);
5960
helper.SetupModules(AzureModule.AzureResourceManager,
6061
helper.RMProfileModule,

0 commit comments

Comments
 (0)