Skip to content

Commit 8217d58

Browse files
fix test (Azure#49576)
1 parent 5594fe1 commit 8217d58

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

sdk/storage/Azure.Storage.Blobs/tests/ClientSideEncryptionTests.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,10 @@ public async Task OpenWriteAsync(ClientSideEncryptionVersion version, long dataS
375375
// compare data
376376
Assert.AreEqual(expectedEncryptedData, encryptedData);
377377

378-
var asBlockBlob = InstrumentClient(disposable.Container.GetBlockBlobClient(blobName));
378+
// can't get a block blob client with CSE enabled. Get fresh client without CSE options.
379+
BlockBlobClient asBlockBlob = InstrumentClient(BlobsClientBuilder.GetServiceClient_SharedKey()
380+
.GetBlobContainerClient(disposable.Container.Name)
381+
.GetBlockBlobClient(blobName));
379382
BlockList list = (await asBlockBlob.GetBlockListAsync()).Value;
380383
if (list.CommittedBlocks.Count() > 1)
381384
{

0 commit comments

Comments
 (0)