@@ -49,9 +49,6 @@ import (
4949var proposedLeaseIDs = []* string {to .Ptr ("c820a799-76d7-4ee2-6e15-546f19325c2c" ), to .Ptr ("326cc5e1-746e-4af8-4811-a50e6629a8ca" )}
5050
5151func Test (t * testing.T ) {
52- if recording .GetRecordMode () == recording .PlaybackMode {
53- t .Skip ("https://github.com/Azure/azure-sdk-for-go/issues/22869" )
54- }
5552 recordMode := recording .GetRecordMode ()
5653 t .Logf ("Running blockblob Tests in %s mode\n " , recordMode )
5754 if recordMode == recording .LiveMode {
@@ -1174,7 +1171,9 @@ func (s *BlockBlobUnrecordedTestsSuite) TestPutBlobFromUrlWithCPK() {
11741171
11751172 getResp , err := destBlob .GetProperties (context .Background (), & getBlobPropertiesOptions )
11761173 _require .NoError (err )
1177- _require .EqualValues (getResp .EncryptionKeySHA256 , testcommon .TestCPKByValue .EncryptionKeySHA256 )
1174+ if recording .GetRecordMode () != recording .PlaybackMode {
1175+ _require .EqualValues (getResp .EncryptionKeySHA256 , testcommon .TestCPKByValue .EncryptionKeySHA256 )
1176+ }
11781177}
11791178
11801179func (s * BlockBlobUnrecordedTestsSuite ) TestPutBlobFromUrlCPKScope () {
@@ -3093,7 +3092,9 @@ func (s *BlockBlobRecordedTestsSuite) TestGetSetBlobMetadataWithCPK() {
30933092 }
30943093 resp , err := bbClient .SetMetadata (context .Background (), testcommon .BasicMetadata , & setBlobMetadataOptions )
30953094 _require .NoError (err )
3096- _require .EqualValues (resp .EncryptionKeySHA256 , testcommon .TestCPKByValue .EncryptionKeySHA256 )
3095+ if recording .GetRecordMode () != recording .PlaybackMode {
3096+ _require .EqualValues (resp .EncryptionKeySHA256 , testcommon .TestCPKByValue .EncryptionKeySHA256 )
3097+ }
30973098
30983099 // Get blob properties without encryption key should fail the request.
30993100 _ , err = bbClient .GetProperties (context .Background (), nil )
@@ -3187,8 +3188,9 @@ func (s *BlockBlobRecordedTestsSuite) TestBlobSnapshotWithCPK() {
31873188 }
31883189 dResp , err := snapshotURL .DownloadStream (context .Background (), & downloadBlobOptions )
31893190 _require .NoError (err )
3190- _require .EqualValues (* dResp .EncryptionKeySHA256 , * testcommon .TestCPKByValue .EncryptionKeySHA256 )
3191-
3191+ if recording .GetRecordMode () != recording .PlaybackMode {
3192+ _require .EqualValues (* dResp .EncryptionKeySHA256 , * testcommon .TestCPKByValue .EncryptionKeySHA256 )
3193+ }
31923194 _ , err = snapshotURL .Delete (context .Background (), nil )
31933195 _require .NoError (err )
31943196
@@ -4421,7 +4423,9 @@ func (s *BlockBlobRecordedTestsSuite) TestPutBlockAndPutBlockListWithCPK() {
44214423 _require .NotNil (resp .ETag )
44224424 _require .NotNil (resp .LastModified )
44234425 _require .Equal (* resp .IsServerEncrypted , true )
4424- _require .EqualValues (* resp .EncryptionKeySHA256 , * (testcommon .TestCPKByValue .EncryptionKeySHA256 ))
4426+ if recording .GetRecordMode () != recording .PlaybackMode {
4427+ _require .EqualValues (* resp .EncryptionKeySHA256 , * (testcommon .TestCPKByValue .EncryptionKeySHA256 ))
4428+ }
44254429
44264430 // Get blob content without encryption key should fail the request.
44274431 _ , err = bbClient .DownloadStream (context .Background (), nil )
@@ -4787,7 +4791,9 @@ func (s *BlockBlobRecordedTestsSuite) TestUploadBlobWithMD5WithCPK() {
47874791 _require .NoError (err )
47884792 // _require.Equal(uploadResp.RawResponse.StatusCode, 201)
47894793 _require .Equal (* uploadResp .IsServerEncrypted , true )
4790- _require .EqualValues (uploadResp .EncryptionKeySHA256 , testcommon .TestCPKByValue .EncryptionKeySHA256 )
4794+ if recording .GetRecordMode () != recording .PlaybackMode {
4795+ _require .EqualValues (uploadResp .EncryptionKeySHA256 , testcommon .TestCPKByValue .EncryptionKeySHA256 )
4796+ }
47914797
47924798 // Get blob content without encryption key should fail the request.
47934799 _ , err = bbClient .DownloadStream (context .Background (), nil )
@@ -4807,7 +4813,9 @@ func (s *BlockBlobRecordedTestsSuite) TestUploadBlobWithMD5WithCPK() {
48074813 destData , err := io .ReadAll (downloadResp .Body )
48084814 _require .NoError (err )
48094815 _require .EqualValues (destData , srcData )
4810- _require .EqualValues (downloadResp .EncryptionKeySHA256 , testcommon .TestCPKByValue .EncryptionKeySHA256 )
4816+ if recording .GetRecordMode () != recording .PlaybackMode {
4817+ _require .EqualValues (downloadResp .EncryptionKeySHA256 , testcommon .TestCPKByValue .EncryptionKeySHA256 )
4818+ }
48114819}
48124820
48134821func (s * BlockBlobRecordedTestsSuite ) TestUploadBlobWithMD5WithCPKScope () {
0 commit comments