-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Communication]: Migrated python identity tests to use ARM template #17890
Conversation
/azp run python - communication - tests |
Azure Pipelines successfully started running 1 pipeline(s). |
e85a1e4
to
d7e40a5
Compare
/azp run python - communication - tests |
Azure Pipelines successfully started running 1 pipeline(s). |
@@ -10,6 +10,7 @@ class URIIdentityReplacer(RecordingProcessor): | |||
def process_request(self, request): | |||
import re | |||
request.uri = re.sub('/identities/([^/?]+)', '/identities/sanitized', request.uri) | |||
request.uri = re.sub('^(.*?)\\.communication.azure.com', 'https://sanitized.communication.azure.com', request.uri) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a way to just replace the regex instead of the whole string? The thing is that we may want to know if we tested against an INT resource or not even when the url was sanitized. As an example an INT URL may be something like: https://resourcename.int.communication.azure.com
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we need to consider the scenario for testing in INT environment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, I updated this to only sanitize the resource.
@@ -10,6 +10,7 @@ class URIIdentityReplacer(RecordingProcessor): | |||
def process_request(self, request): | |||
import re | |||
request.uri = re.sub('/identities/([^/?]+)', '/identities/sanitized', request.uri) | |||
request.uri = re.sub('^(.*?)\\.communication.azure.com', 'https://sanitized.communication.azure.com', request.uri) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we need to consider the scenario for testing in INT environment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Just left a comment regarding INT testing
/azp run python - communication - tests |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run python - communication - tests |
Azure Pipelines successfully started running 1 pipeline(s). |
…into protocol_base * 'master' of https://github.com/Azure/azure-sdk-for-python: (337 commits) [Container Registry] adding blurb about env vars to set (#17976) shared_requirements msrest verison update (#17938) Deprecate Azure-Synapse (#18027) add perf tests (#17519) Increment package version after release of azure-search-documents (#18017) [Communication]: Migrated python identity tests to use ARM template (#17890) [Container Registry] fixing up the test-resources-post script (#17883) [Communication]: Removed error code assertion from unauthorized phone number test (#17955) Add Conda Publishing (#17889) fix search fields (#18014) Sync eng/common directory with azure-sdk-tools for PR 1552 (#18011) [AppConfiguration] fix tests (#17917) updating generated code (#17874) Update document translation sample slug (#17989) update release date (#17988) [Communication] - SDK - Synced SMS and Phone Numbers shared folders (#17985) Remove unnecessary attribute access (#18007) [AutoRelease] t2-healthcareapis-2021-04-12-56802 (#17968) Revert retain. (#18004) Sync eng/common directory with azure-sdk-tools for PR 1553 (#18002) ...
No description provided.