diff --git a/sdk/storage/storage-blob/recordings/browsers/blobclient/recording_undelete.json b/sdk/storage/storage-blob/recordings/browsers/blobclient/recording_undelete.json index 5946ba3f6da3..3f45c6e312ca 100644 --- a/sdk/storage/storage-blob/recordings/browsers/blobclient/recording_undelete.json +++ b/sdk/storage/storage-blob/recordings/browsers/blobclient/recording_undelete.json @@ -2,7 +2,7 @@ "recordings": [ { "method": "PUT", - "url": "https://fakestorageaccount.blob.core.windows.net/container158224824523309081", + "url": "https://fakestorageaccount.blob.core.windows.net/container158501883196502913", "query": { "restype": "container" }, @@ -10,35 +10,35 @@ "status": 201, "response": "", "responseHeaders": { - "content-length": "0", - "date": "Fri, 21 Feb 2020 01:24:06 GMT", - "etag": "\"0x8D7B66CBE88E848\"", - "last-modified": "Fri, 21 Feb 2020 01:24:06 GMT", + "date": "Tue, 24 Mar 2020 03:00:32 GMT", + "etag": "\"0x8D7CF9F84D998D9\"", + "last-modified": "Tue, 24 Mar 2020 03:00:33 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "bf6ad9ca-0bd6-4a26-91a0-e045b77c94f9", - "x-ms-request-id": "04e05e2b-201e-005b-5d55-e8663e000000", - "x-ms-version": "2019-02-02" + "transfer-encoding": "chunked", + "x-ms-client-request-id": "5e37e0a1-2dec-45de-9cec-d47b4bef440f", + "x-ms-request-id": "681a670c-c01e-0016-3e88-0128a1000000", + "x-ms-version": "2019-12-12" } }, { "method": "PUT", - "url": "https://fakestorageaccount.blob.core.windows.net/container158224824523309081/blob158224824671508312", + "url": "https://fakestorageaccount.blob.core.windows.net/container158501883196502913/blob158501883327901608", "query": {}, "requestBody": "Hello World", "status": 201, "response": "", "responseHeaders": { - "content-length": "0", "content-md5": "sQqNsWTgdUEFt6mb5y4/5Q==", - "date": "Fri, 21 Feb 2020 01:24:06 GMT", - "etag": "\"0x8D7B66CBEE395E7\"", - "last-modified": "Fri, 21 Feb 2020 01:24:07 GMT", + "date": "Tue, 24 Mar 2020 03:00:33 GMT", + "etag": "\"0x8D7CF9F85227D9F\"", + "last-modified": "Tue, 24 Mar 2020 03:00:33 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "9c2acef0-075c-400f-aeaa-148f23a8b076", + "transfer-encoding": "chunked", + "x-ms-client-request-id": "d78071ef-9904-4c65-a690-ca26faaafbc4", "x-ms-content-crc64": "YeJLfssylmU=", - "x-ms-request-id": "04e05ffb-201e-005b-0e55-e8663e000000", + "x-ms-request-id": "681a6743-c01e-0016-6488-0128a1000000", "x-ms-request-server-encrypted": "true", - "x-ms-version": "2019-02-02" + "x-ms-version": "2019-12-12" } }, { @@ -50,59 +50,59 @@ }, "requestBody": null, "status": 200, - "response": "1.0truetruetruetrue51.0truetruetrue31.0truetruetrue4DELETE,GET,HEAD,MERGE,POST,OPTIONS,PUT,PATCH***86400GETexample.com**8888GETexample.com**8888GETexample.com**8888GETexample.com**8888true7false", + "response": "1.0falsefalsefalsefalse1.0truetruetrue71.0falsefalsePATCH,PUT,OPTIONS,POST,MERGE,HEAD,GET,DELETE***86400true7falsefalse", "responseHeaders": { "content-type": "application/xml", - "date": "Fri, 21 Feb 2020 01:24:07 GMT", + "date": "Tue, 24 Mar 2020 03:00:33 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "transfer-encoding": "chunked", - "x-ms-client-request-id": "0095d87f-969b-45e8-a5e7-2fb3cb07ce99", - "x-ms-request-id": "04e06183-201e-005b-7755-e8663e000000", - "x-ms-version": "2019-02-02" + "x-ms-client-request-id": "f27dc6c8-b785-4090-a02e-bf84f041ed44", + "x-ms-request-id": "681a6796-c01e-0016-1788-0128a1000000", + "x-ms-version": "2019-12-12" } }, { "method": "DELETE", - "url": "https://fakestorageaccount.blob.core.windows.net/container158224824523309081/blob158224824671508312", + "url": "https://fakestorageaccount.blob.core.windows.net/container158501883196502913/blob158501883327901608", "query": {}, "requestBody": null, "status": 202, "response": "", "responseHeaders": { - "content-length": "0", - "date": "Fri, 21 Feb 2020 01:24:08 GMT", + "date": "Tue, 24 Mar 2020 03:00:34 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "b19e4da3-13c8-4692-ac74-17371e07d97e", + "transfer-encoding": "chunked", + "x-ms-client-request-id": "ba7cd3cc-2a67-4484-8ac4-1461a8448f36", "x-ms-delete-type-permanent": "false", - "x-ms-request-id": "04e06321-201e-005b-7255-e8663e000000", - "x-ms-version": "2019-02-02" + "x-ms-request-id": "681a67e2-c01e-0016-4b88-0128a1000000", + "x-ms-version": "2019-12-12" } }, { "method": "GET", - "url": "https://fakestorageaccount.blob.core.windows.net/container158224824523309081", + "url": "https://fakestorageaccount.blob.core.windows.net/container158501883196502913", "query": { "maxresults": "1", - "include": "deleted", + "include": "deleted,versions", "restype": "container", "comp": "list" }, "requestBody": null, "status": 200, - "response": "1blob158224824671508312trueFri, 21 Feb 2020 01:24:07 GMTFri, 21 Feb 2020 01:24:07 GMT0x8D7B66CBEE395E711application/octet-streamsQqNsWTgdUEFt6mb5y4/5Q==BlockBlobHottruetrueFri, 21 Feb 2020 01:24:08 GMT6", + "response": "1blob158501883327901608trueTue, 24 Mar 2020 03:00:33 GMTTue, 24 Mar 2020 03:00:33 GMT0x8D7CF9F85227D9F11application/octet-streamsQqNsWTgdUEFt6mb5y4/5Q==BlockBlobHottruetrueTue, 24 Mar 2020 03:00:34 GMT6", "responseHeaders": { "content-type": "application/xml", - "date": "Fri, 21 Feb 2020 01:24:08 GMT", + "date": "Tue, 24 Mar 2020 03:00:34 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "transfer-encoding": "chunked", - "x-ms-client-request-id": "982eed10-dfb6-4497-b900-b7f4427960c7", - "x-ms-request-id": "04e064b0-201e-005b-6455-e8663e000000", - "x-ms-version": "2019-02-02" + "x-ms-client-request-id": "335575ab-7333-4bd2-bfcc-46c7127b38b7", + "x-ms-request-id": "681a6828-c01e-0016-7688-0128a1000000", + "x-ms-version": "2019-12-12" } }, { "method": "PUT", - "url": "https://fakestorageaccount.blob.core.windows.net/container158224824523309081/blob158224824671508312", + "url": "https://fakestorageaccount.blob.core.windows.net/container158501883196502913/blob158501883327901608", "query": { "comp": "undelete" }, @@ -110,38 +110,38 @@ "status": 200, "response": "", "responseHeaders": { - "content-length": "0", - "date": "Fri, 21 Feb 2020 01:24:09 GMT", + "date": "Tue, 24 Mar 2020 03:00:35 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "e841edde-f7b6-41df-ae08-8e997a24d0c0", - "x-ms-request-id": "04e066a7-201e-005b-3f55-e8663e000000", - "x-ms-version": "2019-02-02" + "transfer-encoding": "chunked", + "x-ms-client-request-id": "1ce86e16-572a-48f7-8c52-c7174883d339", + "x-ms-request-id": "681a6871-c01e-0016-2088-0128a1000000", + "x-ms-version": "2019-12-12" } }, { "method": "GET", - "url": "https://fakestorageaccount.blob.core.windows.net/container158224824523309081", + "url": "https://fakestorageaccount.blob.core.windows.net/container158501883196502913", "query": { - "include": "deleted", + "include": "deleted,versions", "restype": "container", "comp": "list" }, "requestBody": null, "status": 200, - "response": "blob158224824671508312Fri, 21 Feb 2020 01:24:07 GMTFri, 21 Feb 2020 01:24:07 GMT0x8D7B66CBEE395E711application/octet-streamsQqNsWTgdUEFt6mb5y4/5Q==BlockBlobHottrueunlockedavailabletrue", + "response": "blob158501883327901608Tue, 24 Mar 2020 03:00:33 GMTTue, 24 Mar 2020 03:00:33 GMT0x8D7CF9F85227D9F11application/octet-streamsQqNsWTgdUEFt6mb5y4/5Q==BlockBlobHottrueunlockedavailabletrue", "responseHeaders": { "content-type": "application/xml", - "date": "Fri, 21 Feb 2020 01:24:09 GMT", + "date": "Tue, 24 Mar 2020 03:00:35 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "transfer-encoding": "chunked", - "x-ms-client-request-id": "7bb4a9b0-be37-4508-bfc7-8f635e449a0c", - "x-ms-request-id": "04e06877-201e-005b-6755-e8663e000000", - "x-ms-version": "2019-02-02" + "x-ms-client-request-id": "e3425de5-cd19-4700-95b7-65324f83ac7e", + "x-ms-request-id": "681a68b3-c01e-0016-4d88-0128a1000000", + "x-ms-version": "2019-12-12" } }, { "method": "DELETE", - "url": "https://fakestorageaccount.blob.core.windows.net/container158224824523309081", + "url": "https://fakestorageaccount.blob.core.windows.net/container158501883196502913", "query": { "restype": "container" }, @@ -149,20 +149,21 @@ "status": 202, "response": "", "responseHeaders": { - "content-length": "0", - "date": "Fri, 21 Feb 2020 01:24:10 GMT", + "date": "Tue, 24 Mar 2020 03:00:36 GMT", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "b53b190a-1dd0-49f0-a1ad-0424eef6ae0a", - "x-ms-request-id": "04e06b0d-201e-005b-5755-e8663e000000", - "x-ms-version": "2019-02-02" + "transfer-encoding": "chunked", + "x-ms-client-request-id": "b0330c72-d807-4a84-bae3-d81d4ba6e65a", + "x-ms-request-id": "681a68f7-c01e-0016-7688-0128a1000000", + "x-ms-version": "2019-12-12" } } ], "uniqueTestInfo": { "uniqueName": { - "container": "container158224824523309081", - "blob": "blob158224824671508312" + "container": "container158501883196502913", + "blob": "blob158501883327901608" }, "newDate": {} - } + }, + "hash": "9955cdc24f7740b2a708b4ab74d2601f" } \ No newline at end of file diff --git a/sdk/storage/storage-blob/recordings/node/blobclient/recording_undelete.js b/sdk/storage/storage-blob/recordings/node/blobclient/recording_undelete.js index 5b29a6c9f41c..dd517efdb035 100644 --- a/sdk/storage/storage-blob/recordings/node/blobclient/recording_undelete.js +++ b/sdk/storage/storage-blob/recordings/node/blobclient/recording_undelete.js @@ -1,60 +1,62 @@ let nock = require('nock'); -module.exports.testInfo = {"uniqueName":{"container":"container158224819242602498","blob":"blob158224819384806465"},"newDate":{}} +module.exports.hash = "4b2d62f655814eebf5c7065e3e0abe19"; + +module.exports.testInfo = {"uniqueName":{"container":"container158501877471701789","blob":"blob158501877599206974"},"newDate":{}} nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container158224819242602498') + .put('/container158501877471701789') .query(true) .reply(201, "", [ - 'Content-Length', - '0', + 'Transfer-Encoding', + 'chunked', 'Last-Modified', - 'Fri, 21 Feb 2020 01:23:13 GMT', + 'Tue, 24 Mar 2020 02:59:35 GMT', 'ETag', - '"0x8D7B66C9F05446C"', + '"0x8D7CF9F62B3E84F"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '16a15905-f01e-0048-4755-e84232000000', + '700eb905-b01e-0020-0588-01a5c1000000', 'x-ms-client-request-id', - '0701b4e0-e23c-4571-b062-a811c675cc23', + 'b214e4df-c810-4499-9125-9747306b8258', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Fri, 21 Feb 2020 01:23:12 GMT' + 'Tue, 24 Mar 2020 02:59:35 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container158224819242602498/blob158224819384806465', "Hello World") + .put('/container158501877471701789/blob158501877599206974', "Hello World") .reply(201, "", [ - 'Content-Length', - '0', + 'Transfer-Encoding', + 'chunked', 'Content-MD5', 'sQqNsWTgdUEFt6mb5y4/5Q==', 'Last-Modified', - 'Fri, 21 Feb 2020 01:23:14 GMT', + 'Tue, 24 Mar 2020 02:59:36 GMT', 'ETag', - '"0x8D7B66C9FB99A69"', + '"0x8D7CF9F62D9DF53"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'f1569be6-a01e-0008-2155-e8450a000000', + '700eb921-b01e-0020-1188-01a5c1000000', 'x-ms-client-request-id', - '1d217bd0-430b-4927-92e8-c9e983188d6e', + '6bf10953-d471-4765-8698-2f8a72220d82', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'x-ms-content-crc64', 'YeJLfssylmU=', 'x-ms-request-server-encrypted', 'true', 'Date', - 'Fri, 21 Feb 2020 01:23:14 GMT' + 'Tue, 24 Mar 2020 02:59:36 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) .get('/') .query(true) - .reply(200, "1.0truetruetruetrue51.0truetruetrue31.0truetruetrue4DELETE,GET,HEAD,MERGE,POST,OPTIONS,PUT,PATCH***86400GETexample.com**8888GETexample.com**8888GETexample.com**8888GETexample.com**8888true7false", [ + .reply(200, "1.0falsefalsefalsefalse1.0truetruetrue71.0falsefalsePATCH,PUT,OPTIONS,POST,MERGE,HEAD,GET,DELETE***86400true7falsefalse", [ 'Transfer-Encoding', 'chunked', 'Content-Type', @@ -62,42 +64,42 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '1206a6c6-601e-0017-1555-e8f60e000000', + '700eb92e-b01e-0020-1888-01a5c1000000', 'x-ms-client-request-id', - 'a54eeccd-225e-4712-8fc2-a0ecd57f1cca', + '5d24c616-5071-4003-917c-3077e1e7dbb5', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Access-Control-Expose-Headers', 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,Content-Length,Date,Transfer-Encoding', 'Access-Control-Allow-Origin', '*', 'Date', - 'Fri, 21 Feb 2020 01:23:15 GMT' + 'Tue, 24 Mar 2020 02:59:36 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/container158224819242602498/blob158224819384806465') + .delete('/container158501877471701789/blob158501877599206974') .reply(202, "", [ - 'Content-Length', - '0', + 'Transfer-Encoding', + 'chunked', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '4317385a-801e-0052-2355-e823ed000000', + '700eb945-b01e-0020-2688-01a5c1000000', 'x-ms-client-request-id', - '74edeedb-f29f-4143-bc94-24d1ce31e039', + '8cb27e45-844c-475b-b607-97d315268c50', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'x-ms-delete-type-permanent', 'false', 'Date', - 'Fri, 21 Feb 2020 01:23:16 GMT' + 'Tue, 24 Mar 2020 02:59:36 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .get('/container158224819242602498') + .get('/container158501877471701789') .query(true) - .reply(200, "1blob158224819384806465trueFri, 21 Feb 2020 01:23:14 GMTFri, 21 Feb 2020 01:23:14 GMT0x8D7B66C9FB99A6911application/octet-streamsQqNsWTgdUEFt6mb5y4/5Q==BlockBlobHottruetrueFri, 21 Feb 2020 01:23:17 GMT6", [ + .reply(200, "1blob158501877599206974trueTue, 24 Mar 2020 02:59:36 GMTTue, 24 Mar 2020 02:59:36 GMT0x8D7CF9F62D9DF5311application/octet-streamsQqNsWTgdUEFt6mb5y4/5Q==BlockBlobHottruetrueTue, 24 Mar 2020 02:59:36 GMT6", [ 'Transfer-Encoding', 'chunked', 'Content-Type', @@ -105,41 +107,41 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '16a15f77-f01e-0048-0455-e84232000000', + '700eb95e-b01e-0020-3288-01a5c1000000', 'x-ms-client-request-id', - '9ee5fb28-702d-4320-9897-bb38ddd5bf82', + '30d3af48-4b56-47c8-9d5a-2c3229b30017', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Access-Control-Expose-Headers', 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,Content-Type,Content-Length,Date,Transfer-Encoding', 'Access-Control-Allow-Origin', '*', 'Date', - 'Fri, 21 Feb 2020 01:23:16 GMT' + 'Tue, 24 Mar 2020 02:59:36 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/container158224819242602498/blob158224819384806465') + .put('/container158501877471701789/blob158501877599206974') .query(true) .reply(200, "", [ - 'Content-Length', - '0', + 'Transfer-Encoding', + 'chunked', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '4317393f-801e-0052-7755-e823ed000000', + '700eb976-b01e-0020-3f88-01a5c1000000', 'x-ms-client-request-id', - '9b5fb2c2-879c-4747-88cb-05d2adbde60e', + 'bd930e1b-6345-4c14-adff-152086897948', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Fri, 21 Feb 2020 01:23:16 GMT' + 'Tue, 24 Mar 2020 02:59:37 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .get('/container158224819242602498') + .get('/container158501877471701789') .query(true) - .reply(200, "blob158224819384806465Fri, 21 Feb 2020 01:23:14 GMTFri, 21 Feb 2020 01:23:14 GMT0x8D7B66C9FB99A6911application/octet-streamsQqNsWTgdUEFt6mb5y4/5Q==BlockBlobHottrueunlockedavailabletrue", [ + .reply(200, "blob158501877599206974Tue, 24 Mar 2020 02:59:36 GMTTue, 24 Mar 2020 02:59:36 GMT0x8D7CF9F62D9DF5311application/octet-streamsQqNsWTgdUEFt6mb5y4/5Q==BlockBlobHottrueunlockedavailabletrue", [ 'Transfer-Encoding', 'chunked', 'Content-Type', @@ -147,33 +149,33 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '16a16073-f01e-0048-6355-e84232000000', + '700eb98e-b01e-0020-4f88-01a5c1000000', 'x-ms-client-request-id', - '7231eea9-7bf1-40a0-a359-811726cc6404', + '56a91a00-9001-4d3d-9b8a-b27d4b76899f', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Access-Control-Expose-Headers', 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,Content-Type,Content-Length,Date,Transfer-Encoding', 'Access-Control-Allow-Origin', '*', 'Date', - 'Fri, 21 Feb 2020 01:23:17 GMT' + 'Tue, 24 Mar 2020 02:59:37 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/container158224819242602498') + .delete('/container158501877471701789') .query(true) .reply(202, "", [ - 'Content-Length', - '0', + 'Transfer-Encoding', + 'chunked', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '16a16113-f01e-0048-7355-e84232000000', + '700eb99d-b01e-0020-5988-01a5c1000000', 'x-ms-client-request-id', - '500e08dc-9fa1-487c-91d0-3ca0ac351314', + 'b42f7831-4621-4161-aea7-63c7f45e0669', 'x-ms-version', - '2019-02-02', + '2019-12-12', 'Date', - 'Fri, 21 Feb 2020 01:23:17 GMT' + 'Tue, 24 Mar 2020 02:59:37 GMT' ]); diff --git a/sdk/storage/storage-blob/test/blobclient.spec.ts b/sdk/storage/storage-blob/test/blobclient.spec.ts index 73a5806aba62..04d31e680a34 100644 --- a/sdk/storage/storage-blob/test/blobclient.spec.ts +++ b/sdk/storage/storage-blob/test/blobclient.spec.ts @@ -8,7 +8,8 @@ import { bodyToString, getBSU, getSASConnectionStringFromEnvironment, - recorderEnvSetup + recorderEnvSetup, + isBlobVersioningDisabled, } from "./utils"; import { record, delay } from "@azure/test-utils-recorder"; import { @@ -247,7 +248,8 @@ describe("BlobClient", () => { const iter = containerClient .listBlobsFlat({ - includeDeleted: true + includeDeleted: true, + includeVersions: true, // Need this when blob versioning is turned on. }) .byPage({ maxPageSize: 1 }); @@ -267,7 +269,7 @@ describe("BlobClient", () => { assert.ok( result.segment.blobItems, - "Expect non empty result from list blobs({ includeDeleted: true }) with page size of 1." + "Expect non empty result from list blobs({ includeDeleted: true, includeVersions: true }) with page size of 1." ); assert.equal( @@ -281,13 +283,16 @@ describe("BlobClient", () => { "Expect a valid element in result array from list blobs({ includeDeleted: true }) with page size of 1." ); - assert.ok(result.segment.blobItems![0].deleted, "Expect that the blob is marked for deletion"); + if (isBlobVersioningDisabled()) { + assert.ok(result.segment.blobItems![0].deleted, "Expect that the blob is marked for deletion"); + } await blobClient.undelete(); const iter2 = containerClient .listBlobsFlat({ - includeDeleted: true + includeDeleted: true, + includeVersions: true, // Need this when blob versioning is turned on. }) .byPage();