Skip to content

Commit edd226f

Browse files
authored
Add Track2 mgmt Eventhubs Sanitizer (Azure#23932)
* add cosmos * add recording * Update Azure.ResourceManager.CosmosDB.Tests.csproj * wip * wip * update * restore
1 parent 5af3985 commit edd226f

File tree

3 files changed

+49614
-8203
lines changed

3 files changed

+49614
-8203
lines changed

sdk/eventhub/Azure.ResourceManager.EventHubs/tests/EventHubsManagementClientBase.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ public abstract class EventHubsManagementClientBase : ManagementRecordedTestBase
2828
protected EventHubsManagementClientBase(bool isAsync)
2929
: base(isAsync)
3030
{
31+
Sanitizer = new EventHubsManagementRecordedTestSanitizer();
3132
}
3233

3334
protected void InitializeClients()
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT License.
3+
4+
using Azure.Core.TestFramework;
5+
using Castle.Core.Internal;
6+
7+
namespace Azure.ResourceManager.EventHubs.Tests
8+
{
9+
public class EventHubsManagementRecordedTestSanitizer : RecordedTestSanitizer
10+
{
11+
public EventHubsManagementRecordedTestSanitizer() : base()
12+
{
13+
// Lazy sanitize fields in the request and response bodies
14+
AddJsonPathSanitizer("$..aliasPrimaryConnectionString");
15+
AddJsonPathSanitizer("$..aliasSecondaryConnectionString");
16+
AddJsonPathSanitizer("$..keyName");
17+
}
18+
}
19+
}

0 commit comments

Comments
 (0)