Skip to content

Conversation

@jiasli
Copy link
Member

@jiasli jiasli commented Feb 4, 2021

#14344, #14532 contains access tokens (credentials) in x-ms-authorization-auxiliary headers.

x-ms-authorization-auxiliary will not be recorded anymore since Azure/azure-python-devtools@8915c3f, added by Azure/azure-python-devtools#46. This change is released in azure-devtools 1.1.0.

Azure CLI didn't take this change until #14477 which bumped azure-devtools to 1.2.0 and was merged after #14344, #14532, so this issue is already fixed. Re-running the test won't record x-ms-authorization-auxiliary anymore.

Actually, if a test is marked as @live_only, no recording should be generated at all! This could be improved in the test framework.

@Juliehzl
Copy link
Contributor

Juliehzl commented Feb 4, 2021

@qwordy You could use LiveSenarioTest instead of ScenarioTest to avoid recording if you only want to run the test in live mode.

class VMCrossTenantUpdateScenarioTest(ScenarioTest):

class VMSSCrossTenantUpdateScenarioTest(LiveScenarioTest):

@ResourceGroupPreparer(name_prefix='cli_test_vmss_update_', location='westus2')
def test_vmss_cross_tenant_update(self, resource_group):
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rename the test name to keep in sync with test_vm_cross_tenant_update:

- test_vmss_update_cross_tenant
+ test_vmss_cross_tenant_update

@qwordy
Copy link
Member

qwordy commented Feb 4, 2021

VMCrossTenantUpdateScenarioTest

It was written by XXJ on 7/29/2020.

@qwordy
Copy link
Member

qwordy commented Feb 4, 2021

I remember there is bug in LiveSenarioTest

@qwordy
Copy link
Member

qwordy commented Feb 4, 2021

@qwordy You could use LiveSenarioTest instead of ScenarioTest to avoid recording if you only want to run the test in live mode.

class VMCrossTenantUpdateScenarioTest(ScenarioTest):

Thank you so much!

@yonzhan yonzhan added this to the S183 milestone Feb 4, 2021
@jiasli jiasli merged commit 5e86395 into Azure:dev Feb 25, 2021
@jiasli jiasli deleted the remove-cred branch February 25, 2021 09:20
@jiasli jiasli mentioned this pull request Mar 16, 2021
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants