Skip to content
Merged
Prev Previous commit
Next Next commit
update test base to redact phonenumbers in operatorInformation respon…
…se, update test recordings
  • Loading branch information
ericasp16 committed Jul 26, 2023
commit 81bec081382309e190a1632cb823560277509710
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"AssetsRepo": "Azure/azure-sdk-assets",
"AssetsRepoPrefixPath": "java",
"TagPrefix": "java/communication/azure-communication-phonenumbers",
"Tag": "java/communication/azure-communication-phonenumbers_e52a158728"
"Tag": "java/communication/azure-communication-phonenumbers_04198d656b"
}
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,17 @@ protected PhoneNumbersClientBuilder getClientBuilderWithConnectionString(HttpCli

private void addTestProxyMatchers() {
interceptorManager.addMatchers(Arrays.asList(
new CustomMatcher().setHeadersKeyOnlyMatch(Arrays.asList("x-ms-hmac-string-to-sign-base64"))));
new CustomMatcher().setHeadersKeyOnlyMatch(Arrays.asList("x-ms-hmac-string-to-sign-base64", "x-ms-content-sha256"))));

}

private void addTestProxySanitizer() {
// sanitize phone numbers
interceptorManager.addSanitizers(Arrays.asList(
new TestProxySanitizer("(?<=/phoneNumbers/)([^/?]+)", "REDACTED", TestProxySanitizerType.URL),
new TestProxySanitizer("id", null, "REDACTED", TestProxySanitizerType.BODY_KEY),
new TestProxySanitizer("phoneNumber", null, "REDACTED", TestProxySanitizerType.BODY_KEY)));
new TestProxySanitizer("phoneNumber", null, "REDACTED", TestProxySanitizerType.BODY_KEY),
new TestProxySanitizer("$..phoneNumber", null, "REDACTED", TestProxySanitizerType.BODY_KEY)));
}

protected PhoneNumbersClientBuilder getClientBuilderUsingManagedIdentity(HttpClient httpClient) {
Expand Down