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
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ public async Task Batch_AzureSasCredential()
await using DisposingContainer test = await GetTestContainerAsync();

var serviceClient = GetServiceClient_SharedKey();
var sas = GetAccountSasCredentials().SasToken;
var sas = GetAccountSasCredentials(version: ToSasVersion(_serviceVersion)).SasToken;
var sasServiceClient = InstrumentClient(new BlobServiceClient(serviceClient.Uri, new AzureSasCredential(sas), GetOptions()));
await using TestScenario scenario = Scenario(sasServiceClient);
Uri[] blobs = await scenario.CreateBlobUrisAsync(test.Container, 2);
Expand Down Expand Up @@ -318,7 +318,8 @@ public async Task Delete_ContainerScoped_Basic_ContainerSas()

BlobSasBuilder blobSasBuilder = new BlobSasBuilder(BlobContainerSasPermissions.All, Recording.Now.AddDays(1))
{
BlobContainerName = containerName
BlobContainerName = containerName,
Version = ToSasVersion(_serviceVersion)
};
BlobSasQueryParameters sasQueryParameters = blobSasBuilder.ToSasQueryParameters(GetNewSharedKeyCredentials());
BlobUriBuilder blobUriBuilder = new BlobUriBuilder(scenario.Service.Uri)
Expand Down Expand Up @@ -400,7 +401,8 @@ public async Task Delete_ContainerScoped_Basic_Convenience_ContainerSas()

BlobSasBuilder blobSasBuilder = new BlobSasBuilder(BlobContainerSasPermissions.All, Recording.Now.AddDays(1))
{
BlobContainerName = containerName
BlobContainerName = containerName,
Version = ToSasVersion(_serviceVersion)
};
BlobSasQueryParameters sasQueryParameters = blobSasBuilder.ToSasQueryParameters(GetNewSharedKeyCredentials());
BlobUriBuilder blobUriBuilder = new BlobUriBuilder(scenario.Service.Uri)
Expand Down Expand Up @@ -638,7 +640,8 @@ public async Task SetBlobAccessTier_ContainerScoped_Basic_ContainerSas()

BlobSasBuilder blobSasBuilder = new BlobSasBuilder(BlobContainerSasPermissions.All, Recording.Now.AddDays(1))
{
BlobContainerName = containerName
BlobContainerName = containerName,
Version = ToSasVersion(_serviceVersion)
};
BlobSasQueryParameters sasQueryParameters = blobSasBuilder.ToSasQueryParameters(GetNewSharedKeyCredentials());
BlobUriBuilder blobUriBuilder = new BlobUriBuilder(scenario.Service.Uri)
Expand Down Expand Up @@ -720,7 +723,8 @@ public async Task SetBlobAccessTier_ContainerScoped_Basic_Convenience_ContainerS

BlobSasBuilder blobSasBuilder = new BlobSasBuilder(BlobContainerSasPermissions.All, Recording.Now.AddDays(1))
{
BlobContainerName = containerName
BlobContainerName = containerName,
Version = ToSasVersion(_serviceVersion)
};
BlobSasQueryParameters sasQueryParameters = blobSasBuilder.ToSasQueryParameters(GetNewSharedKeyCredentials());
BlobUriBuilder blobUriBuilder = new BlobUriBuilder(scenario.Service.Uri)
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading