{Test} Fix resource group deletion for cross tenant tests#19166
Merged
zhoxing-ms merged 2 commits intoAzure:devfrom Aug 9, 2021
Merged
{Test} Fix resource group deletion for cross tenant tests#19166zhoxing-ms merged 2 commits intoAzure:devfrom
zhoxing-ms merged 2 commits intoAzure:devfrom
Conversation
Juliehzl
reviewed
Aug 9, 2021
| 'rg': another_resource_group, | ||
| 'aux_tenant': '72f988bf-86f1-41af-91ab-2d7cd011db47' | ||
| }) | ||
| self.cmd('group create -g {rg} --location {location} --subscription {aux_sub}', |
Contributor
There was a problem hiding this comment.
delete previous resource group create command?
kairu-ms
approved these changes
Aug 9, 2021
Collaborator
|
fix cross tenant tests |
jsntcy
reviewed
Aug 9, 2021
| 'ext_rg': another_resource_group, | ||
| }) | ||
|
|
||
| self.cmd('group create -l eastus -n {ext_rg} --subscription {ext_sub}') |
Member
There was a problem hiding this comment.
Unnecessary to create rg again as you create it in ResourceGroupPreparer
jsntcy
reviewed
Aug 9, 2021
| 'rg': another_resource_group, | ||
| 'aux_tenant': '72f988bf-86f1-41af-91ab-2d7cd011db47' | ||
| }) | ||
| self.cmd('group create -g {rg} --location {location} --subscription {aux_sub}', |
Member
Juliehzl
approved these changes
Aug 9, 2021
Contributor
Juliehzl
left a comment
There was a problem hiding this comment.
LGTM. a small suggestion is that we can make aux sub as global variable and used by all tests.
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
Related PR: #19159
Use
@ResourceGroupPreparer(... ,subscription=cross_tenant_subscrption)to ensure that the cross account resource group will be deleted after the test is completed.Testing Guide
History Notes
[Component Name 1] BREAKING CHANGE: az command a: Make some customer-facing breaking change.
[Component Name 2] az command b: Add some customer-facing feature.
This checklist is used to make sure that common guidelines for a pull request are followed.
The PR title and description has followed the guideline in Submitting Pull Requests.
I adhere to the Command Guidelines.
I adhere to the Error Handling Guidelines.