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

Take care of sas token inputs for storage blob copy source with query char #6074

Merged
merged 3 commits into from
Apr 11, 2018

Conversation

williexu
Copy link
Contributor

@williexu williexu commented Apr 10, 2018


Fixes: #6073

This checklist is used to make sure that common guidelines for a pull request are followed.

  • The PR has modified HISTORY.rst describing any customer-facing, functional changes. Note that this does not include changes only to help content. (see Modifying change log).

@williexu williexu added the Storage az storage label Apr 10, 2018
@williexu williexu requested a review from troydai April 10, 2018 18:21
@promptws
Copy link

View a preview at https://prompt.ws/r/Azure/azure-cli/6074
This is an experimental preview for @microsoft users.


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

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?

Copy link
Contributor Author

@williexu williexu Apr 10, 2018

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 {}',
Copy link
Contributor Author

@williexu williexu Apr 10, 2018

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.

@williexu williexu merged commit d17098b into Azure:dev Apr 11, 2018
@williexu williexu deleted the sas branch July 11, 2018 17:31
@haroldrandom haroldrandom added the Storage az storage label Oct 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Storage az storage
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[storage copy start] --source-sas argument does not allow sas token inputs with starting query char '?'
4 participants