Skip to content

Commit d437d06

Browse files
committed
Updating inner matcher for records in ACR tests
1 parent 7193b89 commit d437d06

File tree

1 file changed

+9
-0
lines changed
  • src/ResourceManager/ContainerRegistry/Commands.ContainerRegistry.Test/ScenarioTests

1 file changed

+9
-0
lines changed

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
using Microsoft.WindowsAzure.Commands.ScenarioTest;
2525
using TestEnvironmentFactory = Microsoft.Rest.ClientRuntime.Azure.TestFramework.TestEnvironmentFactory;
2626
using TestUtilities = Microsoft.Rest.ClientRuntime.Azure.TestFramework.TestUtilities;
27+
using System.Collections.Generic;
2728

2829
namespace Microsoft.Azure.Commands.ContainerRegistry.Test.ScenarioTests
2930
{
@@ -63,6 +64,14 @@ public void RunPowerShellTest(params string[] scripts)
6364
var callingClassType = TestUtilities.GetCallingClass(2);
6465
var mockName = TestUtilities.GetCurrentMethodName(2);
6566

67+
Dictionary<string, string> d = new Dictionary<string, string>();
68+
d.Add("Microsoft.Resources", null);
69+
d.Add("Microsoft.Features", null);
70+
d.Add("Microsoft.Authorization", null);
71+
d.Add("Microsoft.Compute", null);
72+
var providersToIgnore = new Dictionary<string, string>();
73+
providersToIgnore.Add("Microsoft.Azure.Management.Resources.ResourceManagementClient", "2016-02-01");
74+
HttpMockServer.Matcher = new PermissiveRecordMatcherWithApiExclusion(true, d, providersToIgnore);
6675
HttpMockServer.RecordsDirectory = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "SessionRecords");
6776
using (MockContext context = MockContext.Start(callingClassType, mockName))
6877
{

0 commit comments

Comments
 (0)