{AD} Remove unnecessary logic from MSGraphClientPasswordReplacer
#22783
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Synapse test
src/azure-cli/azure/cli/command_modules/synapse/tests/latest/test_synapse_scenario.py::SynapseScenarioTests::test_workspace_package
uploads a jar file as the request body:azure-cli/src/azure-cli/azure/cli/command_modules/synapse/tests/latest/test_synapse_scenario.py
Lines 2652 to 2657 in 85ef3c7
As the jar is a binary file (
bytes
),_byte_to_str
will fail to decodebytes
asutf-8
:azure-cli/src/azure-cli-testsdk/azure/cli/testsdk/utilities.py
Lines 51 to 52 in cac3f06
causing failure:
Those removed lines came from AD Graph
GraphClientPasswordReplacer
:azure-cli/src/azure-cli-testsdk/azure/cli/testsdk/utilities.py
Lines 123 to 125 in 8fc0912
We don't really know what its functionality and the original "issue" were. VCRPY invokes
GraphClientPasswordReplacer
3 times for each request and the first 2 invocations take place as a pipeline:Perhaps those lines are used to eliminate duplicated replacement operation?
Since the request body of Microsoft Graph API addPassword will never contains a password, that doesn't matter now.
Testing Guide