Azure / azure-sdk-for-net

This repository is for active development of the Azure SDK for .NET. For consumers of the SDK we recommend visiting our public developer docs at https://learn.microsoft.com/dotnet/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-net.
MIT License
5.23k stars 4.58k forks source link

[BUG]The JsonPathSanitizers defined in the test do not work #30631

Closed dvbb closed 1 year ago

dvbb commented 2 years ago

Library name and version

Azure.ResourceManager.DataFactory

Describe the bug

The JsonPathSanitizers defined in the test don't work for some reason.

Expected behavior

The defined JsonPathSanitizers will sanitize sensitive information based on the path

Actual behavior

Both the REST API return value and the defined Sanitizer remain unchanged, but the Sanitizer does not work and still retains sensitive information in the record file

Reproduction Steps

  1. azure-sdk-for-net\sdk\datafactory\Azure.ResourceManager.DataFactory\Azure.ResourceManager.DataFactory.sln
  2. Run any cases under LinkedServiceResourceTest.cs
  3. check record files

Environment

No response

azure-sdk commented 2 years ago

Label prediction was below confidence level 0.6 for Model:ServiceLabels: 'ARM:0.2812252,Data Factory:0.1880235,Cognitive - Form Recognizer:0.08751686'

ArthurMa1978 commented 1 year ago

Enable JsonPathSanitizers in the ctor can fix it

ArthurMa1978 commented 1 year ago

The JsonPathSanitizers should be called before any recording happened.