Skip to content
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

Merged
merged 4 commits into from
Apr 13, 2021

Conversation

lsundaralingam
Copy link
Member

No description provided.

@ghost ghost added the Communication label Apr 8, 2021
@lsundaralingam
Copy link
Member Author

/azp run python - communication - tests

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@lsundaralingam
Copy link
Member Author

/azp run python - communication - tests

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@lsundaralingam lsundaralingam marked this pull request as ready for review April 9, 2021 18:09
@lsundaralingam lsundaralingam changed the title Migrated python identity tests to use ARM template [Communication]: Migrated python identity tests to use ARM template Apr 10, 2021
@@ -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)
Copy link
Contributor

@jbeauregardb jbeauregardb Apr 12, 2021

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

Copy link

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.

Copy link
Member Author

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)
Copy link

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.

Copy link
Contributor

@jbeauregardb jbeauregardb left a 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

@lsundaralingam
Copy link
Member Author

/azp run python - communication - tests

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@lsundaralingam
Copy link
Member Author

/azp run python - communication - tests

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@lsundaralingam lsundaralingam merged commit 1b33479 into Azure:master Apr 13, 2021
iscai-msft added a commit that referenced this pull request Apr 15, 2021
…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)
  ...
@lsundaralingam lsundaralingam deleted the armTemplate branch April 21, 2021 00:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants