{AD} Remove unnecessary logic from MSGraphClientPasswordReplacer#22783
Merged
{AD} Remove unnecessary logic from MSGraphClientPasswordReplacer#22783
MSGraphClientPasswordReplacer#22783Conversation
Collaborator
|
Graph |
wangzelin007
approved these changes
Jun 9, 2022
jsntcy
approved these changes
Jun 9, 2022
MSGraphClientPasswordReplacerMSGraphClientPasswordReplacer
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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_packageuploads 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_strwill fail to decodebytesasutf-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
GraphClientPasswordReplacer3 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