Skip to content

Commit 87084f3

Browse files
authored
Pin storage version in Extension tests (Azure#25463)
1 parent c654069 commit 87084f3

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

sdk/extensions/Azure.Extensions.AspNetCore.DataProtection.Blobs/tests/DataProtectionBlobFunctionalTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public async Task CanAddKeysIndependently()
7575

7676
private async Task<BlobClient> GetBlobClient(string name)
7777
{
78-
var client = new BlobServiceClient(TestEnvironment.BlobStorageEndpoint, TestEnvironment.Credential);
78+
var client = new BlobServiceClient(TestEnvironment.BlobStorageEndpoint, TestEnvironment.Credential, new BlobClientOptions(TestEnvironment.StorageVersion));
7979

8080
var blobContainerClient = client.GetBlobContainerClient("testcontainer");
8181
await blobContainerClient.CreateIfNotExistsAsync();

sdk/extensions/Azure.Extensions.AspNetCore.DataProtection.Blobs/tests/DataProtectionTestEnvironment.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ namespace Azure.Extensions.AspNetCore.DataProtection.Blobs.Tests
1212
public class DataProtectionTestEnvironment: TestEnvironment
1313
{
1414
public Uri BlobStorageEndpoint => new(GetVariable("BLOB_STORAGE_ENDPOINT"));
15+
public BlobClientOptions.ServiceVersion StorageVersion => BlobClientOptions.ServiceVersion.V2019_02_02;
1516

1617
protected override async ValueTask<bool> IsEnvironmentReadyAsync()
1718
{
@@ -20,7 +21,7 @@ protected override async ValueTask<bool> IsEnvironmentReadyAsync()
2021
// Try multiple container and blob names to make sure we hit different blob servers
2122
for (int i = 0; i < 10; i++)
2223
{
23-
var client = new BlobServiceClient(BlobStorageEndpoint, Credential);
24+
var client = new BlobServiceClient(BlobStorageEndpoint, Credential, new BlobClientOptions(StorageVersion));
2425
var container = client.GetBlobContainerClient(Guid.NewGuid().ToString());
2526
await container.CreateIfNotExistsAsync();
2627

0 commit comments

Comments
 (0)