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

[Storage] Updated tests to support multiple SAS versions #20544

Closed

Conversation

seanmcc-msft
Copy link
Member

No description provided.

@ghost ghost added the Storage Storage Service (Queues, Blobs, Files) label Apr 20, 2021
@seanmcc-msft
Copy link
Member Author

/azp run net - storage - tests

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@@ -532,7 +532,11 @@ private void EnsureState()
Resource = Constants.Sas.Resource.BlobVersion;
}
}
Version = SasQueryParameters.DefaultSasVersion;

if (string.IsNullOrEmpty(Version))
Copy link
Member Author

Choose a reason for hiding this comment

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

This is 1 of 2 logic changes I made in customer-facing code. This if check is present in Data Lake, File Shares, and Queues, but was not present in blob for some reason.

Copy link
Contributor

Choose a reason for hiding this comment

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

This was conscious change here #15972 . Which means we forgot other places earlier. @amnguye please take a look.

new DataLakeSasBuilder(permissions, expiresOn)
{
FileSystemName = Name,
Version = StorageVersionExtensions.ToVersionString(ClientConfiguration.Version)
Copy link
Member Author

Choose a reason for hiding this comment

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

This is the other customer-facing change. Now, the SAS version will match the x-ms-version of the client that generated it. This is necessary to pass the correct sas version into our tests.

Copy link
Member Author

Choose a reason for hiding this comment

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

I also made this change in other client's GenerateSasUri() methods.

@@ -77,7 +77,7 @@ public class DataLakePathClient
/// <summary>
/// <see cref="DataLakeClientConfiguration"/>.
/// </summary>
private readonly DataLakeClientConfiguration _clientConfiguration;
internal readonly DataLakeClientConfiguration _clientConfiguration;
Copy link
Member Author

Choose a reason for hiding this comment

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

TODO undo this.

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed.

@seanmcc-msft
Copy link
Member Author

/azp run net - storage - tests

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@seanmcc-msft seanmcc-msft deleted the feature/storage/sasTests branch December 13, 2021 20:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Storage Storage Service (Queues, Blobs, Files)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants