-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Conversation
/azp run net - storage - tests |
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)) |
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.
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.
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.
new DataLakeSasBuilder(permissions, expiresOn) | ||
{ | ||
FileSystemName = Name, | ||
Version = StorageVersionExtensions.ToVersionString(ClientConfiguration.Version) |
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.
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.
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.
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; |
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.
TODO undo this.
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.
Fixed.
/azp run net - storage - tests |
Azure Pipelines successfully started running 1 pipeline(s). |
No description provided.