-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Take care of sas token inputs for storage blob copy
source with query char
#6074
Conversation
View a preview at https://prompt.ws/r/Azure/azure-cli/6074 |
|
||
target_container = self.create_container(account_info) | ||
self.storage_cmd('storage blob copy start -b dst -c {} --source-blob src --sas-token {} --source-container {}', | ||
account_info, target_container, sas, source_container) |
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.
Does this actually test the sas? The storage_cmd
append storage account and key to the command, won't it disrupt the intention of this test?
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.
You're right, the validator for the "regular" destination storage account arguments can/does parse the '?' from the sas token argument.
When the validator for the source sas copies the token from the destination, it receives the parsed token without the query parameter.
I'll change this test to use the --source-sas
argument.
sas = '?' + sas | ||
|
||
target_container = self.create_container(account_info) | ||
self.storage_cmd('storage blob copy start -b dst -c {} --source-blob src --source-sas {} --source-container {}', |
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.
@troydai changed this test to use specify a sas token specifically for the source. Thanks for the catch.
Fixes: #6073
This checklist is used to make sure that common guidelines for a pull request are followed.