Update tests to work with new test proxy #22869
Labels
Client
This issue points to a problem in the data-plane of the library.
Mgmt
This issue is related to a management-plane library.
test-proxy
Anything relating to test-proxy requests or issues.
test-reliability
Issue that causes tests to be unreliable
New versions of the test proxy include a set of sanitizers enabled by default during recording and playback. These sanitizers can break tests by replacing values used to match recordings and values that tests require to match a known constant or format. In playback mode the affected tests are skipped with a message referencing this issue. They still run as before in live and recording modes. If skipped tests cause a pipeline to fail because the test suite no longer reaches the module's coverage goal, you can temporarily adjust that goal in eng/config.json.
Updating these tests means recording them with test proxy version 1.0.0-dev.20240508.1 or later and modifying them to work with newly sanitized values. If your tests call
recording.StartTestProxy
, you'll get the right proxy version automatically by basing your changes onmain
. If you need to replace one of the new sanitizers to record a different value or a test requires a real value and you're certain that value isn't a secret, you can call recording.RemoveRegisteredSanitizers to remove default sanitizers by their IDs e.g. "AZSDK3493". Sanitizers and their IDs are listed here. When uncertain whether something is secret, prefer the sanitized value. Note also thatsdk/internal
v1.6.0 and v1.7.0 add these registered sanitizers and don't allow removing them so if you must remove one, first upgrade tosdk/internal
v1.8.0.Modules having at least one affected test are listed below.
Data plane:
Management plane:
The text was updated successfully, but these errors were encountered: