diff --git a/sdk/storage/storage-file-datalake/CHANGELOG.md b/sdk/storage/storage-file-datalake/CHANGELOG.md index c912b1838bd3..2020f74660fa 100644 --- a/sdk/storage/storage-file-datalake/CHANGELOG.md +++ b/sdk/storage/storage-file-datalake/CHANGELOG.md @@ -2,6 +2,7 @@ ## 12.3.0-beta.2 (Unreleased) +- Bug fix - `DataLakePathClient.move()` now supports source and destination authenticated with SAS. Fixed bug [12758](https://github.com/Azure/azure-sdk-for-js/issues/12758). - Now you can get the functionality of the root directory via the `DataLakeDirectoryClient` created via `FileSystemClient.getDirectoryClient("")`. Fixed bug [12813](https://github.com/Azure/azure-sdk-for-js/issues/12813). ## 12.3.0-beta.1 (2020-12-09) diff --git a/sdk/storage/storage-file-datalake/recordings/node/datalakepathclient_nodejs_only/recording_move.js b/sdk/storage/storage-file-datalake/recordings/node/datalakepathclient_nodejs_only/recording_move.js index 24f6f135ac72..0bd38d2b08a7 100644 --- a/sdk/storage/storage-file-datalake/recordings/node/datalakepathclient_nodejs_only/recording_move.js +++ b/sdk/storage/storage-file-datalake/recordings/node/datalakepathclient_nodejs_only/recording_move.js @@ -1,125 +1,138 @@ let nock = require('nock'); -module.exports.testInfo = {"uniqueName":{"filesystem":"filesystem157534405149607972","file":"file157534405269504768","destfile":"destfile157534405451104406"},"newDate":{}} +module.exports.hash = "cccf92d5105cee4cff0965d96594f51a"; + +module.exports.testInfo = {"uniqueName":{"filesystem":"filesystem160875819333308281","file":"file160875819343107060","destfile":"destfile160875819398501948"},"newDate":{}} nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/filesystem157534405149607972') + .put('/filesystem160875819333308281') .query(true) - .reply(201, "", [ 'Content-Length', + .reply(201, "", [ + 'Content-Length', '0', 'Last-Modified', - 'Tue, 03 Dec 2019 03:28:14 GMT', + 'Wed, 23 Dec 2020 21:16:33 GMT', 'ETag', - '"0x8D777A0D49A07E1"', + '"0x8D8A788062E79DD"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '12b84299-601e-0050-1289-a95a96000000', + '0f5921c7-301e-0070-6b70-d9b64b000000', 'x-ms-client-request-id', - '9339cfa2-45ba-48e2-93fa-b5385a550e3a', + 'a711e17c-0b7b-49c1-8448-a5aebd2e39d1', 'x-ms-version', - '2019-02-02', + '2020-02-10', 'Date', - 'Tue, 03 Dec 2019 03:28:13 GMT' ]); + 'Wed, 23 Dec 2020 21:16:33 GMT' +]); nock('https://fakestorageaccount.dfs.core.windows.net:443', {"encodedQueryParams":true}) - .put('/filesystem157534405149607972/file157534405269504768') + .put('/filesystem160875819333308281/file160875819343107060') .query(true) - .reply(201, "", [ 'Last-Modified', - 'Tue, 03 Dec 2019 03:28:15 GMT', + .reply(201, "", [ + 'Last-Modified', + 'Wed, 23 Dec 2020 21:16:33 GMT', 'ETag', - '"0x8D777A0D5517D43"', + '"0x8D8A788066791C7"', 'Server', 'Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '9378508d-601f-0072-5d89-a934a0000000', + 'd00c93ca-c01f-0008-2a70-d9defc000000', 'x-ms-version', - '2019-02-02', + '2020-04-08', 'x-ms-client-request-id', - '49ddf61a-67ec-4fa6-ac18-d72736413642', + '5ae7534e-6e4c-4bdd-a3fe-9992649d41da', 'Date', - 'Tue, 03 Dec 2019 03:28:14 GMT', + 'Wed, 23 Dec 2020 21:16:33 GMT', 'Content-Length', - '0' ]); + '0' +]); nock('https://fakestorageaccount.dfs.core.windows.net:443', {"encodedQueryParams":true}) - .patch('/filesystem157534405149607972/file157534405269504768', "Hello World") + .patch('/filesystem160875819333308281/file160875819343107060', "Hello World") .query(true) - .reply(202, "", [ 'Server', + .reply(202, "", [ + 'Server', 'Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-server-encrypted', 'true', 'x-ms-request-id', - '9378508f-601f-0072-5f89-a934a0000000', + 'd00c93cb-c01f-0008-2b70-d9defc000000', 'x-ms-version', - '2019-02-02', + '2020-04-08', 'x-ms-client-request-id', - '175fb79f-e8a8-450c-bdc3-5e7fcff2291d', + 'b269731b-9ef5-4f91-9f6d-5bad3673ad0d', 'Date', - 'Tue, 03 Dec 2019 03:28:15 GMT', + 'Wed, 23 Dec 2020 21:16:33 GMT', 'Content-Length', - '0' ]); + '0' +]); nock('https://fakestorageaccount.dfs.core.windows.net:443', {"encodedQueryParams":true}) - .patch('/filesystem157534405149607972/file157534405269504768') + .patch('/filesystem160875819333308281/file160875819343107060') .query(true) - .reply(200, "", [ 'Last-Modified', - 'Tue, 03 Dec 2019 03:28:16 GMT', + .reply(200, "", [ + 'Last-Modified', + 'Wed, 23 Dec 2020 21:16:33 GMT', 'ETag', - '"0x8D777A0D5B9630F"', + '"0x8D8A788068398AF"', 'Server', 'Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-server-encrypted', - 'true', + 'false', 'x-ms-request-id', - '93785090-601f-0072-6089-a934a0000000', + 'd00c93cc-c01f-0008-2c70-d9defc000000', 'x-ms-version', - '2019-02-02', + '2020-04-08', 'x-ms-client-request-id', - '7b515614-17d7-4aaa-9601-d429c42f9967', + '9fc1bdf6-aca8-428f-8569-ca49e03d8799', 'Date', - 'Tue, 03 Dec 2019 03:28:15 GMT', + 'Wed, 23 Dec 2020 21:16:33 GMT', 'Content-Length', - '0' ]); + '0' +]); nock('https://fakestorageaccount.dfs.core.windows.net:443', {"encodedQueryParams":true}) - .put('/filesystem157534405149607972/destfile157534405451104406') + .put('/filesystem160875819333308281/destfile160875819398501948') .query(true) - .reply(201, "", [ 'Server', + .reply(201, "", [ + 'Server', 'Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '3afde93a-b01f-007b-0989-a92e2e000000', + 'd00c93cd-c01f-0008-2d70-d9defc000000', 'x-ms-version', - '2019-02-02', + '2020-04-08', 'x-ms-client-request-id', - '079f3063-e188-4187-93d1-596e0c758be1', + 'a4c79561-132a-414d-a297-796aacb8c3a9', 'Date', - 'Tue, 03 Dec 2019 03:28:16 GMT', + 'Wed, 23 Dec 2020 21:16:33 GMT', 'Content-Length', - '0' ]); + '0' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .head('/filesystem157534405149607972/destfile157534405451104406') - .reply(200, "", [ 'Content-Length', + .head('/filesystem160875819333308281/destfile160875819398501948') + .reply(200, "", [ + 'Content-Length', '11', 'Content-Type', 'application/octet-stream', 'Last-Modified', - 'Tue, 03 Dec 2019 03:28:16 GMT', + 'Wed, 23 Dec 2020 21:16:33 GMT', 'Accept-Ranges', 'bytes', 'ETag', - '"0x8D777A0D5B9630F"', + '"0x8D8A788068398AF"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '6f55f2d3-201e-005c-2189-a9b467000000', + '0f592304-301e-0070-1270-d9b64b000000', 'x-ms-client-request-id', - '1567be0a-e00b-496a-bfa5-227e43e0bd70', + '09fc6322-3ed1-4600-b0f3-3b8c51ce5eca', 'x-ms-version', - '2019-02-02', + '2020-02-10', 'x-ms-creation-time', - 'Tue, 03 Dec 2019 03:28:15 GMT', + 'Wed, 23 Dec 2020 21:16:33 GMT', 'x-ms-lease-status', 'unlocked', 'x-ms-lease-state', @@ -132,25 +145,24 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'Hot', 'x-ms-access-tier-inferred', 'true', - 'Access-Control-Expose-Headers', - 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,Content-Type,Last-Modified,ETag,x-ms-creation-time,x-ms-lease-status,x-ms-lease-state,x-ms-blob-type,x-ms-server-encrypted,x-ms-access-tier,x-ms-access-tier-inferred,Accept-Ranges,Content-Length,Date,Transfer-Encoding', - 'Access-Control-Allow-Origin', - '*', 'Date', - 'Tue, 03 Dec 2019 03:28:17 GMT' ]); + 'Wed, 23 Dec 2020 21:16:34 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/filesystem157534405149607972') + .delete('/filesystem160875819333308281') .query(true) - .reply(202, "", [ 'Content-Length', + .reply(202, "", [ + 'Content-Length', '0', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '12b85194-601e-0050-0489-a95a96000000', + '0f592320-301e-0070-2970-d9b64b000000', 'x-ms-client-request-id', - '97055e6f-6a9c-4a70-8915-a6b6e451f958', + 'ff5c6be6-c7a7-4f22-b91b-c2f2ad3c45f6', 'x-ms-version', - '2019-02-02', + '2020-02-10', 'Date', - 'Tue, 03 Dec 2019 03:28:17 GMT' ]); + 'Wed, 23 Dec 2020 21:16:34 GMT' +]); diff --git a/sdk/storage/storage-file-datalake/recordings/node/datalakepathclient_nodejs_only/recording_move_cross_file_system.js b/sdk/storage/storage-file-datalake/recordings/node/datalakepathclient_nodejs_only/recording_move_cross_file_system.js index 3df885f42a42..53d48a29e767 100644 --- a/sdk/storage/storage-file-datalake/recordings/node/datalakepathclient_nodejs_only/recording_move_cross_file_system.js +++ b/sdk/storage/storage-file-datalake/recordings/node/datalakepathclient_nodejs_only/recording_move_cross_file_system.js @@ -1,145 +1,160 @@ let nock = require('nock'); -module.exports.testInfo = {"uniqueName":{"filesystem":"filesystem157534405709907645","file":"file157534405823601937","destfilesystem":"destfilesystem157534405995609393","destfile":"destfile157534406110101314"},"newDate":{}} +module.exports.hash = "c54ace82d6a2a45e00996ff9e1122d9c"; + +module.exports.testInfo = {"uniqueName":{"filesystem":"filesystem160875819522606002","file":"file160875819547601592","destfilesystem":"destfilesystem160875819578708956","destfile":"destfile160875819588108512"},"newDate":{}} nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/filesystem157534405709907645') + .put('/filesystem160875819522606002') .query(true) - .reply(201, "", [ 'Content-Length', + .reply(201, "", [ + 'Content-Length', '0', 'Last-Modified', - 'Tue, 03 Dec 2019 03:28:19 GMT', + 'Wed, 23 Dec 2020 21:16:35 GMT', 'ETag', - '"0x8D777A0D7EF6727"', + '"0x8D8A788074F6116"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '545ddc6f-501e-0094-0389-a92550000000', + '0f592465-301e-0070-4770-d9b64b000000', 'x-ms-client-request-id', - '3625bc20-05e5-40bb-b2a9-9814ff8f0d89', + '47897eff-ad35-49c2-b60c-20f411057437', 'x-ms-version', - '2019-02-02', + '2020-02-10', 'Date', - 'Tue, 03 Dec 2019 03:28:18 GMT' ]); + 'Wed, 23 Dec 2020 21:16:35 GMT' +]); nock('https://fakestorageaccount.dfs.core.windows.net:443', {"encodedQueryParams":true}) - .put('/filesystem157534405709907645/file157534405823601937') + .put('/filesystem160875819522606002/file160875819547601592') .query(true) - .reply(201, "", [ 'Last-Modified', - 'Tue, 03 Dec 2019 03:28:20 GMT', + .reply(201, "", [ + 'Last-Modified', + 'Wed, 23 Dec 2020 21:16:35 GMT', 'ETag', - '"0x8D777A0D89F107C"', + '"0x8D8A7880777DE68"', 'Server', 'Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'f061c761-401f-0065-4a89-a9f4c3000000', + 'd00c93d4-c01f-0008-3470-d9defc000000', 'x-ms-version', - '2019-02-02', + '2020-04-08', 'x-ms-client-request-id', - 'cbf87ed6-3259-482c-b8b0-ebcefa66ef09', + 'f20fbb0a-0368-439e-8fbd-2bcd8991a9bb', 'Date', - 'Tue, 03 Dec 2019 03:28:20 GMT', + 'Wed, 23 Dec 2020 21:16:35 GMT', 'Content-Length', - '0' ]); + '0' +]); nock('https://fakestorageaccount.dfs.core.windows.net:443', {"encodedQueryParams":true}) - .patch('/filesystem157534405709907645/file157534405823601937', "Hello World") + .patch('/filesystem160875819522606002/file160875819547601592', "Hello World") .query(true) - .reply(202, "", [ 'Server', + .reply(202, "", [ + 'Server', 'Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-server-encrypted', 'true', 'x-ms-request-id', - 'f061c762-401f-0065-4b89-a9f4c3000000', + 'd00c93d5-c01f-0008-3570-d9defc000000', 'x-ms-version', - '2019-02-02', + '2020-04-08', 'x-ms-client-request-id', - '61c92eb5-6402-42f0-85b8-f16adccfc5df', + '6599f91b-e0aa-427f-9149-5d010d0afd7c', 'Date', - 'Tue, 03 Dec 2019 03:28:20 GMT', + 'Wed, 23 Dec 2020 21:16:35 GMT', 'Content-Length', - '0' ]); + '0' +]); nock('https://fakestorageaccount.dfs.core.windows.net:443', {"encodedQueryParams":true}) - .patch('/filesystem157534405709907645/file157534405823601937') + .patch('/filesystem160875819522606002/file160875819547601592') .query(true) - .reply(200, "", [ 'Last-Modified', - 'Tue, 03 Dec 2019 03:28:21 GMT', + .reply(200, "", [ + 'Last-Modified', + 'Wed, 23 Dec 2020 21:16:35 GMT', 'ETag', - '"0x8D777A0D8F87B61"', + '"0x8D8A7880797C82E"', 'Server', 'Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-server-encrypted', - 'true', + 'false', 'x-ms-request-id', - 'f061c763-401f-0065-4c89-a9f4c3000000', + 'd00c93d6-c01f-0008-3670-d9defc000000', 'x-ms-version', - '2019-02-02', + '2020-04-08', 'x-ms-client-request-id', - '4bdc585a-a305-4a9a-87e0-46ad39e68feb', + 'bc8af479-8851-468b-9822-3d6602779143', 'Date', - 'Tue, 03 Dec 2019 03:28:20 GMT', + 'Wed, 23 Dec 2020 21:16:35 GMT', 'Content-Length', - '0' ]); + '0' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/destfilesystem157534405995609393') + .put('/destfilesystem160875819578708956') .query(true) - .reply(201, "", [ 'Content-Length', + .reply(201, "", [ + 'Content-Length', '0', 'Last-Modified', - 'Tue, 03 Dec 2019 03:28:22 GMT', + 'Wed, 23 Dec 2020 21:16:35 GMT', 'ETag', - '"0x8D777A0D9A5272E"', + '"0x8D8A78807A4E282"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '2797d14b-901e-006c-7189-a9ee4d000000', + '0f592544-301e-0070-0870-d9b64b000000', 'x-ms-client-request-id', - '669682e3-e608-42f5-96c8-775ed706f422', + '4688ca6a-621f-4e0e-8585-e08d98c99042', 'x-ms-version', - '2019-02-02', + '2020-02-10', 'Date', - 'Tue, 03 Dec 2019 03:28:21 GMT' ]); + 'Wed, 23 Dec 2020 21:16:35 GMT' +]); nock('https://fakestorageaccount.dfs.core.windows.net:443', {"encodedQueryParams":true}) - .put('/destfilesystem157534405995609393/destfile157534406110101314') + .put('/destfilesystem160875819578708956/destfile160875819588108512') .query(true) - .reply(201, "", [ 'Server', + .reply(201, "", [ + 'Server', 'Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '5e79ffff-201f-0075-2d89-a9c225000000', + 'd00c93d9-c01f-0008-3870-d9defc000000', 'x-ms-version', - '2019-02-02', + '2020-04-08', 'x-ms-client-request-id', - '9894b7e8-a252-4a6c-862a-9d16d63956ce', + '6c9590f8-de08-40d4-8f0e-7c6b114c758d', 'Date', - 'Tue, 03 Dec 2019 03:28:22 GMT', + 'Wed, 23 Dec 2020 21:16:35 GMT', 'Content-Length', - '0' ]); + '0' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .head('/destfilesystem157534405995609393/destfile157534406110101314') - .reply(200, "", [ 'Content-Length', + .head('/destfilesystem160875819578708956/destfile160875819588108512') + .reply(200, "", [ + 'Content-Length', '11', 'Content-Type', 'application/octet-stream', 'Last-Modified', - 'Tue, 03 Dec 2019 03:28:21 GMT', + 'Wed, 23 Dec 2020 21:16:35 GMT', 'Accept-Ranges', 'bytes', 'ETag', - '"0x8D777A0D8F87B61"', + '"0x8D8A7880797C82E"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'f4e2a6b5-f01e-001a-2389-a96af1000000', + '0f592595-301e-0070-4f70-d9b64b000000', 'x-ms-client-request-id', - '32ede787-2a2d-4cf1-bb20-fe1a52eb953e', + '63c9de85-9a57-40aa-8fa8-ebf27458a784', 'x-ms-version', - '2019-02-02', + '2020-02-10', 'x-ms-creation-time', - 'Tue, 03 Dec 2019 03:28:20 GMT', + 'Wed, 23 Dec 2020 21:16:35 GMT', 'x-ms-lease-status', 'unlocked', 'x-ms-lease-state', @@ -152,41 +167,42 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'Hot', 'x-ms-access-tier-inferred', 'true', - 'Access-Control-Expose-Headers', - 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,Content-Type,Last-Modified,ETag,x-ms-creation-time,x-ms-lease-status,x-ms-lease-state,x-ms-blob-type,x-ms-server-encrypted,x-ms-access-tier,x-ms-access-tier-inferred,Accept-Ranges,Content-Length,Date,Transfer-Encoding', - 'Access-Control-Allow-Origin', - '*', 'Date', - 'Tue, 03 Dec 2019 03:28:24 GMT' ]); + 'Wed, 23 Dec 2020 21:16:36 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/destfilesystem157534405995609393') + .delete('/destfilesystem160875819578708956') .query(true) - .reply(202, "", [ 'Content-Length', + .reply(202, "", [ + 'Content-Length', '0', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '2797d7b0-901e-006c-0789-a9ee4d000000', + '0f5925b3-301e-0070-6a70-d9b64b000000', 'x-ms-client-request-id', - '99fe4931-a681-45e1-be77-fc627232b2f8', + '545781a4-a1a7-45ec-bb15-f8bbb3224e51', 'x-ms-version', - '2019-02-02', + '2020-02-10', 'Date', - 'Tue, 03 Dec 2019 03:28:24 GMT' ]); + 'Wed, 23 Dec 2020 21:16:36 GMT' +]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/filesystem157534405709907645') + .delete('/filesystem160875819522606002') .query(true) - .reply(202, "", [ 'Content-Length', + .reply(202, "", [ + 'Content-Length', '0', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '545dea52-501e-0094-5789-a92550000000', + '0f5925d6-301e-0070-0970-d9b64b000000', 'x-ms-client-request-id', - '71b4083c-5e23-4303-b6a1-13efc270478a', + '49055d75-7803-48b7-85fc-4938ac475d9a', 'x-ms-version', - '2019-02-02', + '2020-02-10', 'Date', - 'Tue, 03 Dec 2019 03:28:24 GMT' ]); + 'Wed, 23 Dec 2020 21:16:36 GMT' +]); diff --git a/sdk/storage/storage-file-datalake/recordings/node/datalakepathclient_nodejs_only/recording_move_should_encode_source.js b/sdk/storage/storage-file-datalake/recordings/node/datalakepathclient_nodejs_only/recording_move_should_encode_source.js index 8459e3af3816..20ab4a5f0abf 100644 --- a/sdk/storage/storage-file-datalake/recordings/node/datalakepathclient_nodejs_only/recording_move_should_encode_source.js +++ b/sdk/storage/storage-file-datalake/recordings/node/datalakepathclient_nodejs_only/recording_move_should_encode_source.js @@ -2,58 +2,54 @@ let nock = require('nock'); module.exports.hash = "bbbe3478a6107a88f4363774690113fb"; -module.exports.testInfo = {"uniqueName":{"filesystem":"filesystem160318532322204557","file":"file160318532455004626"," a+'%20%2F%2B%27%%25%2520.txt":" a+'%20%2F%2B%27%%25%2520.txt160318532815701593"},"newDate":{}} +module.exports.testInfo = {"uniqueName":{"filesystem":"filesystem160875819432408614","file":"file160875819442107627"," a+'%20%2F%2B%27%%25%2520.txt":" a+'%20%2F%2B%27%%25%2520.txt160875819471100791"},"newDate":{}} nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .put('/filesystem160318532322204557') + .put('/filesystem160875819432408614') .query(true) .reply(201, "", [ 'Content-Length', '0', 'Last-Modified', - 'Tue, 20 Oct 2020 09:15:24 GMT', + 'Wed, 23 Dec 2020 21:16:34 GMT', 'ETag', - '"0x8D874D8AD65A86C"', + '"0x8D8A78806C5CBEF"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '22bb9b3a-b01e-007b-01c1-a62e2e000000', + '0f592344-301e-0070-4870-d9b64b000000', 'x-ms-client-request-id', - '8e5f4f06-577c-4878-987b-c29fd3ddbc1a', + '014ae343-33e7-428f-9ff6-060644ede402', 'x-ms-version', '2020-02-10', 'Date', - 'Tue, 20 Oct 2020 09:15:23 GMT', - 'Connection', - 'close' + 'Wed, 23 Dec 2020 21:16:34 GMT' ]); nock('https://fakestorageaccount.dfs.core.windows.net:443', {"encodedQueryParams":true}) - .put('/filesystem160318532322204557/file160318532455004626') + .put('/filesystem160875819432408614/file160875819442107627') .query(true) .reply(201, "", [ 'Last-Modified', - 'Tue, 20 Oct 2020 09:15:25 GMT', + 'Wed, 23 Dec 2020 21:16:34 GMT', 'ETag', - '"0x8D874D8AE222DBC"', + '"0x8D8A78806D64C17"', 'Server', 'Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '7e360084-501f-003e-09c1-a6f3bf000000', + 'd00c93cf-c01f-0008-2f70-d9defc000000', 'x-ms-version', - '2020-02-10', + '2020-04-08', 'x-ms-client-request-id', - '8a786d95-38f8-407a-95db-41e06c97a24d', + 'f9c00f3e-9dcd-4347-9ae9-303fb11b23e0', 'Date', - 'Tue, 20 Oct 2020 09:15:25 GMT', - 'Connection', - 'close', + 'Wed, 23 Dec 2020 21:16:34 GMT', 'Content-Length', '0' ]); nock('https://fakestorageaccount.dfs.core.windows.net:443', {"encodedQueryParams":true}) - .patch('/filesystem160318532322204557/file160318532455004626', "Hello World") + .patch('/filesystem160875819432408614/file160875819442107627', "Hello World") .query(true) .reply(202, "", [ 'Server', @@ -61,88 +57,82 @@ nock('https://fakestorageaccount.dfs.core.windows.net:443', {"encodedQueryParams 'x-ms-request-server-encrypted', 'true', 'x-ms-request-id', - 'feb52e7f-c01f-003b-5ac1-a607c0000000', + 'd00c93d0-c01f-0008-3070-d9defc000000', 'x-ms-version', - '2020-02-10', + '2020-04-08', 'x-ms-client-request-id', - '64176e06-eac8-42b1-98e5-e562e7c6e330', + 'c9047658-b2f1-49b2-b2a9-d4f7da2fdf1f', 'Date', - 'Tue, 20 Oct 2020 09:15:25 GMT', - 'Connection', - 'close', + 'Wed, 23 Dec 2020 21:16:34 GMT', 'Content-Length', '0' ]); nock('https://fakestorageaccount.dfs.core.windows.net:443', {"encodedQueryParams":true}) - .patch('/filesystem160318532322204557/file160318532455004626') + .patch('/filesystem160875819432408614/file160875819442107627') .query(true) .reply(200, "", [ 'Last-Modified', - 'Tue, 20 Oct 2020 09:15:28 GMT', + 'Wed, 23 Dec 2020 21:16:34 GMT', 'ETag', - '"0x8D874D8AF8F67AF"', + '"0x8D8A78806F2E99F"', 'Server', 'Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-server-encrypted', 'false', 'x-ms-request-id', - '513eca8b-401f-0047-1cc1-a69af5000000', + 'd00c93d1-c01f-0008-3170-d9defc000000', 'x-ms-version', - '2020-02-10', + '2020-04-08', 'x-ms-client-request-id', - 'afd40587-f931-45d4-85ce-b341e85390bc', + '95ab52a1-959d-454f-bea1-1e0a7a713bd7', 'Date', - 'Tue, 20 Oct 2020 09:15:27 GMT', - 'Connection', - 'close', + 'Wed, 23 Dec 2020 21:16:34 GMT', 'Content-Length', '0' ]); nock('https://fakestorageaccount.dfs.core.windows.net:443', {"encodedQueryParams":true}) - .put('/filesystem160318532322204557/%20a%2B%27%2520%252F%252B%2527%25%2525%252520.txt160318532815701593') + .put('/filesystem160875819432408614/%20a%2B%27%2520%252F%252B%2527%25%2525%252520.txt160875819471100791') .query(true) .reply(201, "", [ 'Server', 'Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '0a0fd376-901f-004e-4ac1-a6807b000000', + 'd00c93d2-c01f-0008-3270-d9defc000000', 'x-ms-version', - '2020-02-10', + '2020-04-08', 'x-ms-client-request-id', - '64bb370c-313e-4ab4-a8cf-56ba1007d8cb', + 'b4b95a75-a284-4dd7-99e3-ab5965563275', 'Date', - 'Tue, 20 Oct 2020 09:15:28 GMT', - 'Connection', - 'close', + 'Wed, 23 Dec 2020 21:16:34 GMT', 'Content-Length', '0' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .head('/filesystem160318532322204557/%20a%2B%27%2520%252F%252B%2527%25%2525%252520.txt160318532815701593') + .head('/filesystem160875819432408614/%20a%2B%27%2520%252F%252B%2527%25%2525%252520.txt160875819471100791') .reply(200, "", [ 'Content-Length', '11', 'Content-Type', 'application/octet-stream', 'Last-Modified', - 'Tue, 20 Oct 2020 09:15:28 GMT', + 'Wed, 23 Dec 2020 21:16:34 GMT', 'Accept-Ranges', 'bytes', 'ETag', - '"0x8D874D8AF8F67AF"', + '"0x8D8A78806F2E99F"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '5824d59c-c01e-0012-1fc1-a67182000000', + '0f5923e9-301e-0070-6070-d9b64b000000', 'x-ms-client-request-id', - '3f8a9cde-c2e0-4085-b4ec-849312e2af7c', + '367ea14e-3d40-4351-8f82-48ee8dceed20', 'x-ms-version', '2020-02-10', 'x-ms-creation-time', - 'Tue, 20 Oct 2020 09:15:25 GMT', + 'Wed, 23 Dec 2020 21:16:34 GMT', 'x-ms-lease-status', 'unlocked', 'x-ms-lease-state', @@ -155,59 +145,51 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'Hot', 'x-ms-access-tier-inferred', 'true', - 'Access-Control-Expose-Headers', - 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,Content-Type,Last-Modified,ETag,x-ms-creation-time,x-ms-lease-status,x-ms-lease-state,x-ms-blob-type,x-ms-server-encrypted,x-ms-access-tier,x-ms-access-tier-inferred,Accept-Ranges,Content-Length,Date,Transfer-Encoding', - 'Access-Control-Allow-Origin', - '*', 'Date', - 'Tue, 20 Oct 2020 09:15:30 GMT', - 'Connection', - 'close' + 'Wed, 23 Dec 2020 21:16:34 GMT' ]); nock('https://fakestorageaccount.dfs.core.windows.net:443', {"encodedQueryParams":true}) - .put('/filesystem160318532322204557/file160318532455004626') + .put('/filesystem160875819432408614/file160875819442107627') .query(true) .reply(201, "", [ 'Server', 'Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '6894d585-f01f-001a-2dc1-a66af1000000', + 'd00c93d3-c01f-0008-3370-d9defc000000', 'x-ms-version', - '2020-02-10', + '2020-04-08', 'x-ms-client-request-id', - '8ffd2798-7a49-447f-92c3-1d037ab47811', + 'e28ccf19-ae51-4a13-ad9f-151d665216ac', 'Date', - 'Tue, 20 Oct 2020 09:15:31 GMT', - 'Connection', - 'close', + 'Wed, 23 Dec 2020 21:16:34 GMT', 'Content-Length', '0' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .head('/filesystem160318532322204557/file160318532455004626') + .head('/filesystem160875819432408614/file160875819442107627') .reply(200, "", [ 'Content-Length', '11', 'Content-Type', 'application/octet-stream', 'Last-Modified', - 'Tue, 20 Oct 2020 09:15:28 GMT', + 'Wed, 23 Dec 2020 21:16:34 GMT', 'Accept-Ranges', 'bytes', 'ETag', - '"0x8D874D8AF8F67AF"', + '"0x8D8A78806F2E99F"', 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - 'f3f3f99d-201e-009b-75c1-a6c8a6000000', + '0f59242c-301e-0070-1770-d9b64b000000', 'x-ms-client-request-id', - '13ef6b73-6f66-42e0-9f44-efb230fb2066', + '94981e80-d0e7-463c-b061-8633fa6fb70d', 'x-ms-version', '2020-02-10', 'x-ms-creation-time', - 'Tue, 20 Oct 2020 09:15:25 GMT', + 'Wed, 23 Dec 2020 21:16:34 GMT', 'x-ms-lease-status', 'unlocked', 'x-ms-lease-state', @@ -220,18 +202,12 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'Hot', 'x-ms-access-tier-inferred', 'true', - 'Access-Control-Expose-Headers', - 'x-ms-request-id,x-ms-client-request-id,Server,x-ms-version,Content-Type,Last-Modified,ETag,x-ms-creation-time,x-ms-lease-status,x-ms-lease-state,x-ms-blob-type,x-ms-server-encrypted,x-ms-access-tier,x-ms-access-tier-inferred,Accept-Ranges,Content-Length,Date,Transfer-Encoding', - 'Access-Control-Allow-Origin', - '*', 'Date', - 'Tue, 20 Oct 2020 09:15:33 GMT', - 'Connection', - 'close' + 'Wed, 23 Dec 2020 21:16:35 GMT' ]); nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) - .delete('/filesystem160318532322204557') + .delete('/filesystem160875819432408614') .query(true) .reply(202, "", [ 'Content-Length', @@ -239,13 +215,11 @@ nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParam 'Server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', 'x-ms-request-id', - '91264918-301e-000c-60c1-a6ab6f000000', + '0f592440-301e-0070-2970-d9b64b000000', 'x-ms-client-request-id', - '43782b12-8a00-4c33-ad3d-7ded2369bc3a', + '50ab0d3a-cdd7-4dfa-b141-50cb323ec39d', 'x-ms-version', '2020-02-10', 'Date', - 'Tue, 20 Oct 2020 09:15:34 GMT', - 'Connection', - 'close' + 'Wed, 23 Dec 2020 21:16:35 GMT' ]); diff --git a/sdk/storage/storage-file-datalake/recordings/node/datalakepathclient_nodejs_only/recording_move_should_not_encode__in_the_source.js b/sdk/storage/storage-file-datalake/recordings/node/datalakepathclient_nodejs_only/recording_move_should_not_encode__in_the_source.js new file mode 100644 index 000000000000..263e3554c39a --- /dev/null +++ b/sdk/storage/storage-file-datalake/recordings/node/datalakepathclient_nodejs_only/recording_move_should_not_encode__in_the_source.js @@ -0,0 +1,247 @@ +let nock = require('nock'); + +module.exports.hash = "842e46d554b7962a3d218df8c21fd8a3"; + +module.exports.testInfo = {"uniqueName":{"filesystem":"filesystem160875819627407301","file":"file160875819637107910","path/slash":"path/slash160875819683503370"},"newDate":{}} + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/filesystem160875819627407301') + .query(true) + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Wed, 23 Dec 2020 21:16:36 GMT', + 'ETag', + '"0x8D8A78807EF3F47"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '0f5925f5-301e-0070-2270-d9b64b000000', + 'x-ms-client-request-id', + '7c7f8221-f4cb-4b5c-9038-8fdbe0d84175', + 'x-ms-version', + '2020-02-10', + 'Date', + 'Wed, 23 Dec 2020 21:16:36 GMT' +]); + +nock('https://fakestorageaccount.dfs.core.windows.net:443', {"encodedQueryParams":true}) + .put('/filesystem160875819627407301/file160875819637107910') + .query(true) + .reply(201, "", [ + 'Last-Modified', + 'Wed, 23 Dec 2020 21:16:36 GMT', + 'ETag', + '"0x8D8A7880807DCE6"', + 'Server', + 'Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'd00c93db-c01f-0008-3970-d9defc000000', + 'x-ms-version', + '2020-04-08', + 'x-ms-client-request-id', + 'cc0b7ecc-fce6-4049-bf55-55bfef602feb', + 'Date', + 'Wed, 23 Dec 2020 21:16:36 GMT', + 'Content-Length', + '0' +]); + +nock('https://fakestorageaccount.dfs.core.windows.net:443', {"encodedQueryParams":true}) + .patch('/filesystem160875819627407301/file160875819637107910', "Hello World") + .query(true) + .reply(202, "", [ + 'Server', + 'Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-request-id', + 'd00c93dc-c01f-0008-3a70-d9defc000000', + 'x-ms-version', + '2020-04-08', + 'x-ms-client-request-id', + '308a4577-f93c-40b7-b7b5-687042042952', + 'Date', + 'Wed, 23 Dec 2020 21:16:36 GMT', + 'Content-Length', + '0' +]); + +nock('https://fakestorageaccount.dfs.core.windows.net:443', {"encodedQueryParams":true}) + .patch('/filesystem160875819627407301/file160875819637107910') + .query(true) + .reply(200, "", [ + 'Last-Modified', + 'Wed, 23 Dec 2020 21:16:36 GMT', + 'ETag', + '"0x8D8A7880823DA80"', + 'Server', + 'Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-server-encrypted', + 'false', + 'x-ms-request-id', + 'd00c93de-c01f-0008-3b70-d9defc000000', + 'x-ms-version', + '2020-04-08', + 'x-ms-client-request-id', + '42d00544-7cca-4c9b-ab3d-7def1f989ad8', + 'Date', + 'Wed, 23 Dec 2020 21:16:36 GMT', + 'Content-Length', + '0' +]); + +nock('https://fakestorageaccount.dfs.core.windows.net:443', {"encodedQueryParams":true}) + .put('/filesystem160875819627407301/path') + .query(true) + .reply(201, "", [ + 'Last-Modified', + 'Wed, 23 Dec 2020 21:16:36 GMT', + 'ETag', + '"0x8D8A7880837A2E7"', + 'Server', + 'Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'd00c93df-c01f-0008-3c70-d9defc000000', + 'x-ms-version', + '2020-04-08', + 'x-ms-client-request-id', + '10ba1def-6717-4cb5-9bd5-2b53196cf9f5', + 'Date', + 'Wed, 23 Dec 2020 21:16:36 GMT', + 'Content-Length', + '0' +]); + +nock('https://fakestorageaccount.dfs.core.windows.net:443', {"encodedQueryParams":true}) + .put('/filesystem160875819627407301/path%2Fslash160875819683503370') + .query(true) + .reply(201, "", [ + 'Server', + 'Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'd00c93e0-c01f-0008-3d70-d9defc000000', + 'x-ms-version', + '2020-04-08', + 'x-ms-client-request-id', + '952a6e4d-cadf-4a02-b683-e9144fe172c9', + 'Date', + 'Wed, 23 Dec 2020 21:16:36 GMT', + 'Content-Length', + '0' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .head('/filesystem160875819627407301/path%2Fslash160875819683503370') + .reply(200, "", [ + 'Content-Length', + '11', + 'Content-Type', + 'application/octet-stream', + 'Last-Modified', + 'Wed, 23 Dec 2020 21:16:36 GMT', + 'Accept-Ranges', + 'bytes', + 'ETag', + '"0x8D8A7880823DA80"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '0f5926f5-301e-0070-0c70-d9b64b000000', + 'x-ms-client-request-id', + '704d6603-cb80-4ba5-8b28-5d5987eb454e', + 'x-ms-version', + '2020-02-10', + 'x-ms-creation-time', + 'Wed, 23 Dec 2020 21:16:36 GMT', + 'x-ms-lease-status', + 'unlocked', + 'x-ms-lease-state', + 'available', + 'x-ms-blob-type', + 'BlockBlob', + 'x-ms-server-encrypted', + 'true', + 'x-ms-access-tier', + 'Hot', + 'x-ms-access-tier-inferred', + 'true', + 'Date', + 'Wed, 23 Dec 2020 21:16:37 GMT' +]); + +nock('https://fakestorageaccount.dfs.core.windows.net:443', {"encodedQueryParams":true}) + .put('/filesystem160875819627407301/file160875819637107910') + .query(true) + .reply(201, "", [ + 'Server', + 'Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'd00c93e1-c01f-0008-3e70-d9defc000000', + 'x-ms-version', + '2020-04-08', + 'x-ms-client-request-id', + '1c91775c-750d-4fe9-9d65-4b7a90ab661b', + 'Date', + 'Wed, 23 Dec 2020 21:16:36 GMT', + 'Content-Length', + '0' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .head('/filesystem160875819627407301/file160875819637107910') + .reply(200, "", [ + 'Content-Length', + '11', + 'Content-Type', + 'application/octet-stream', + 'Last-Modified', + 'Wed, 23 Dec 2020 21:16:36 GMT', + 'Accept-Ranges', + 'bytes', + 'ETag', + '"0x8D8A7880823DA80"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '0f592744-301e-0070-5370-d9b64b000000', + 'x-ms-client-request-id', + '36041d0d-2dfb-4805-aa85-540b03558771', + 'x-ms-version', + '2020-02-10', + 'x-ms-creation-time', + 'Wed, 23 Dec 2020 21:16:36 GMT', + 'x-ms-lease-status', + 'unlocked', + 'x-ms-lease-state', + 'available', + 'x-ms-blob-type', + 'BlockBlob', + 'x-ms-server-encrypted', + 'true', + 'x-ms-access-tier', + 'Hot', + 'x-ms-access-tier-inferred', + 'true', + 'Date', + 'Wed, 23 Dec 2020 21:16:37 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/filesystem160875819627407301') + .query(true) + .reply(202, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '0f59275e-301e-0070-6770-d9b64b000000', + 'x-ms-client-request-id', + '4caaadef-4294-4776-9da2-a301c362290d', + 'x-ms-version', + '2020-02-10', + 'Date', + 'Wed, 23 Dec 2020 21:16:37 GMT' +]); diff --git a/sdk/storage/storage-file-datalake/recordings/node/datalakepathclient_nodejs_only/recording_move_with_destination_path_encoded.js b/sdk/storage/storage-file-datalake/recordings/node/datalakepathclient_nodejs_only/recording_move_with_destination_path_encoded.js new file mode 100644 index 000000000000..4ef6f4cce714 --- /dev/null +++ b/sdk/storage/storage-file-datalake/recordings/node/datalakepathclient_nodejs_only/recording_move_with_destination_path_encoded.js @@ -0,0 +1,190 @@ +let nock = require('nock'); + +module.exports.hash = "d5e703bb5d9d0893d6298fa577759465"; + +module.exports.testInfo = {"uniqueName":{"filesystem":"filesystem160875819732703880","file":"file160875819742606114","dest file with & and 1/char":"dest file with & and 1/char160875819781104515"},"newDate":{}} + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/filesystem160875819732703880') + .query(true) + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Wed, 23 Dec 2020 21:16:37 GMT', + 'ETag', + '"0x8D8A78808900A0C"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '0f592785-301e-0070-0970-d9b64b000000', + 'x-ms-client-request-id', + 'bde95c0d-0674-4c9f-b5a5-40eca094a0c6', + 'x-ms-version', + '2020-02-10', + 'Date', + 'Wed, 23 Dec 2020 21:16:37 GMT' +]); + +nock('https://fakestorageaccount.dfs.core.windows.net:443', {"encodedQueryParams":true}) + .put('/filesystem160875819732703880/file160875819742606114') + .query(true) + .reply(201, "", [ + 'Last-Modified', + 'Wed, 23 Dec 2020 21:16:37 GMT', + 'ETag', + '"0x8D8A78808A234AF"', + 'Server', + 'Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'd00c93e2-c01f-0008-3f70-d9defc000000', + 'x-ms-version', + '2020-04-08', + 'x-ms-client-request-id', + '03409f42-2080-4f9f-9ab8-e151dd444e50', + 'Date', + 'Wed, 23 Dec 2020 21:16:37 GMT', + 'Content-Length', + '0' +]); + +nock('https://fakestorageaccount.dfs.core.windows.net:443', {"encodedQueryParams":true}) + .patch('/filesystem160875819732703880/file160875819742606114', "Hello World") + .query(true) + .reply(202, "", [ + 'Server', + 'Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-request-id', + 'd00c93e3-c01f-0008-4070-d9defc000000', + 'x-ms-version', + '2020-04-08', + 'x-ms-client-request-id', + '498646f4-5703-43ba-aff4-c07c5faf68d3', + 'Date', + 'Wed, 23 Dec 2020 21:16:37 GMT', + 'Content-Length', + '0' +]); + +nock('https://fakestorageaccount.dfs.core.windows.net:443', {"encodedQueryParams":true}) + .patch('/filesystem160875819732703880/file160875819742606114') + .query(true) + .reply(200, "", [ + 'Last-Modified', + 'Wed, 23 Dec 2020 21:16:37 GMT', + 'ETag', + '"0x8D8A78808BE59A4"', + 'Server', + 'Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-server-encrypted', + 'false', + 'x-ms-request-id', + 'd00c93e4-c01f-0008-4170-d9defc000000', + 'x-ms-version', + '2020-04-08', + 'x-ms-client-request-id', + '6b5afe31-c002-4a97-8519-54eeb1431a50', + 'Date', + 'Wed, 23 Dec 2020 21:16:37 GMT', + 'Content-Length', + '0' +]); + +nock('https://fakestorageaccount.dfs.core.windows.net:443', {"encodedQueryParams":true}) + .put('/filesystem160875819732703880/dest%20file%20with%20%26%20and%201') + .query(true) + .reply(201, "", [ + 'Last-Modified', + 'Wed, 23 Dec 2020 21:16:37 GMT', + 'ETag', + '"0x8D8A78808CC94C7"', + 'Server', + 'Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'd00c93e5-c01f-0008-4270-d9defc000000', + 'x-ms-version', + '2020-04-08', + 'x-ms-client-request-id', + '2c52671a-14dd-46ae-8cd9-117d0bd8f5bf', + 'Date', + 'Wed, 23 Dec 2020 21:16:37 GMT', + 'Content-Length', + '0' +]); + +nock('https://fakestorageaccount.dfs.core.windows.net:443', {"encodedQueryParams":true}) + .put('/filesystem160875819732703880/dest%20file%20with%20%26%20and%201%2Fchar160875819781104515') + .query(true) + .reply(201, "", [ + 'Server', + 'Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'd00c93e6-c01f-0008-4370-d9defc000000', + 'x-ms-version', + '2020-04-08', + 'x-ms-client-request-id', + '0b43659f-94f3-4b4a-b8e0-798718609c58', + 'Date', + 'Wed, 23 Dec 2020 21:16:37 GMT', + 'Content-Length', + '0' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .head('/filesystem160875819732703880/dest%20file%20with%20%26%20and%201%2Fchar160875819781104515') + .reply(200, "", [ + 'Content-Length', + '11', + 'Content-Type', + 'application/octet-stream', + 'Last-Modified', + 'Wed, 23 Dec 2020 21:16:37 GMT', + 'Accept-Ranges', + 'bytes', + 'ETag', + '"0x8D8A78808BE59A4"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '0f592821-301e-0070-1370-d9b64b000000', + 'x-ms-client-request-id', + '28a7cbe8-9ea1-461a-87fb-d08e70cc5a3b', + 'x-ms-version', + '2020-02-10', + 'x-ms-creation-time', + 'Wed, 23 Dec 2020 21:16:37 GMT', + 'x-ms-lease-status', + 'unlocked', + 'x-ms-lease-state', + 'available', + 'x-ms-blob-type', + 'BlockBlob', + 'x-ms-server-encrypted', + 'true', + 'x-ms-access-tier', + 'Hot', + 'x-ms-access-tier-inferred', + 'true', + 'Date', + 'Wed, 23 Dec 2020 21:16:37 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/filesystem160875819732703880') + .query(true) + .reply(202, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '0f592840-301e-0070-2770-d9b64b000000', + 'x-ms-client-request-id', + '93534206-1a77-40ac-9d4a-addb272f947c', + 'x-ms-version', + '2020-02-10', + 'Date', + 'Wed, 23 Dec 2020 21:16:38 GMT' +]); diff --git a/sdk/storage/storage-file-datalake/recordings/node/datalakepathclient_nodejs_only/recording_move_with_destination_path_not_encoded.js b/sdk/storage/storage-file-datalake/recordings/node/datalakepathclient_nodejs_only/recording_move_with_destination_path_not_encoded.js new file mode 100644 index 000000000000..c1398f937a2f --- /dev/null +++ b/sdk/storage/storage-file-datalake/recordings/node/datalakepathclient_nodejs_only/recording_move_with_destination_path_not_encoded.js @@ -0,0 +1,190 @@ +let nock = require('nock'); + +module.exports.hash = "e36c60ee32a191bc54541d10e09e0c5c"; + +module.exports.testInfo = {"uniqueName":{"filesystem":"filesystem160875819810407040","file":"file160875819820007595","dest file with & and 2/char":"dest file with & and 2/char160875819857802304"},"newDate":{}} + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/filesystem160875819810407040') + .query(true) + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Wed, 23 Dec 2020 21:16:38 GMT', + 'ETag', + '"0x8D8A78809065FDB"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '0f592876-301e-0070-4f70-d9b64b000000', + 'x-ms-client-request-id', + '04466ffc-f5ff-46f3-8f2f-e2632c015860', + 'x-ms-version', + '2020-02-10', + 'Date', + 'Wed, 23 Dec 2020 21:16:38 GMT' +]); + +nock('https://fakestorageaccount.dfs.core.windows.net:443', {"encodedQueryParams":true}) + .put('/filesystem160875819810407040/file160875819820007595') + .query(true) + .reply(201, "", [ + 'Last-Modified', + 'Wed, 23 Dec 2020 21:16:38 GMT', + 'ETag', + '"0x8D8A7880917387A"', + 'Server', + 'Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'd00c93e7-c01f-0008-4470-d9defc000000', + 'x-ms-version', + '2020-04-08', + 'x-ms-client-request-id', + '75e651e7-b3e1-47d2-9722-ee34f8f85616', + 'Date', + 'Wed, 23 Dec 2020 21:16:38 GMT', + 'Content-Length', + '0' +]); + +nock('https://fakestorageaccount.dfs.core.windows.net:443', {"encodedQueryParams":true}) + .patch('/filesystem160875819810407040/file160875819820007595', "Hello World") + .query(true) + .reply(202, "", [ + 'Server', + 'Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-request-id', + 'd00c93e8-c01f-0008-4570-d9defc000000', + 'x-ms-version', + '2020-04-08', + 'x-ms-client-request-id', + '98f60625-9a1b-494e-802d-a896cb5cbfae', + 'Date', + 'Wed, 23 Dec 2020 21:16:38 GMT', + 'Content-Length', + '0' +]); + +nock('https://fakestorageaccount.dfs.core.windows.net:443', {"encodedQueryParams":true}) + .patch('/filesystem160875819810407040/file160875819820007595') + .query(true) + .reply(200, "", [ + 'Last-Modified', + 'Wed, 23 Dec 2020 21:16:38 GMT', + 'ETag', + '"0x8D8A78809335CC3"', + 'Server', + 'Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-server-encrypted', + 'false', + 'x-ms-request-id', + 'd00c93e9-c01f-0008-4670-d9defc000000', + 'x-ms-version', + '2020-04-08', + 'x-ms-client-request-id', + 'a2fff510-cdeb-4c6f-939f-0dd326cb8bc4', + 'Date', + 'Wed, 23 Dec 2020 21:16:38 GMT', + 'Content-Length', + '0' +]); + +nock('https://fakestorageaccount.dfs.core.windows.net:443', {"encodedQueryParams":true}) + .put('/filesystem160875819810407040/dest%20file%20with%20%26%20and%202') + .query(true) + .reply(201, "", [ + 'Last-Modified', + 'Wed, 23 Dec 2020 21:16:38 GMT', + 'ETag', + '"0x8D8A78809410DB5"', + 'Server', + 'Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'd00c93ea-c01f-0008-4770-d9defc000000', + 'x-ms-version', + '2020-04-08', + 'x-ms-client-request-id', + 'cec30400-bec1-40dd-bace-3b53d7ed0f9f', + 'Date', + 'Wed, 23 Dec 2020 21:16:38 GMT', + 'Content-Length', + '0' +]); + +nock('https://fakestorageaccount.dfs.core.windows.net:443', {"encodedQueryParams":true}) + .put('/filesystem160875819810407040/dest%20file%20with%20%26%20and%202/char160875819857802304') + .query(true) + .reply(201, "", [ + 'Server', + 'Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'd00c93eb-c01f-0008-4870-d9defc000000', + 'x-ms-version', + '2020-04-08', + 'x-ms-client-request-id', + '64226d28-611e-4dad-a943-59d7ac47f586', + 'Date', + 'Wed, 23 Dec 2020 21:16:38 GMT', + 'Content-Length', + '0' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .head('/filesystem160875819810407040/dest%20file%20with%20%26%20and%202%2Fchar160875819857802304') + .reply(200, "", [ + 'Content-Length', + '11', + 'Content-Type', + 'application/octet-stream', + 'Last-Modified', + 'Wed, 23 Dec 2020 21:16:38 GMT', + 'Accept-Ranges', + 'bytes', + 'ETag', + '"0x8D8A78809335CC3"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '0f592947-301e-0070-7870-d9b64b000000', + 'x-ms-client-request-id', + '9dcbf3cf-70df-4cd8-9e4e-fabc1e7f4728', + 'x-ms-version', + '2020-02-10', + 'x-ms-creation-time', + 'Wed, 23 Dec 2020 21:16:38 GMT', + 'x-ms-lease-status', + 'unlocked', + 'x-ms-lease-state', + 'available', + 'x-ms-blob-type', + 'BlockBlob', + 'x-ms-server-encrypted', + 'true', + 'x-ms-access-tier', + 'Hot', + 'x-ms-access-tier-inferred', + 'true', + 'Date', + 'Wed, 23 Dec 2020 21:16:38 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/filesystem160875819810407040') + .query(true) + .reply(202, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '0f592962-301e-0070-0d70-d9b64b000000', + 'x-ms-client-request-id', + 'edfe9ad6-93cf-4a4a-8669-470c7f4edcee', + 'x-ms-version', + '2020-02-10', + 'Date', + 'Wed, 23 Dec 2020 21:16:38 GMT' +]); diff --git a/sdk/storage/storage-file-datalake/recordings/node/datalakepathclient_nodejs_only/recording_move_with_sas_to_authenticate_source_sas_to_authenticate_destination.js b/sdk/storage/storage-file-datalake/recordings/node/datalakepathclient_nodejs_only/recording_move_with_sas_to_authenticate_source_sas_to_authenticate_destination.js new file mode 100644 index 000000000000..0948a180e469 --- /dev/null +++ b/sdk/storage/storage-file-datalake/recordings/node/datalakepathclient_nodejs_only/recording_move_with_sas_to_authenticate_source_sas_to_authenticate_destination.js @@ -0,0 +1,169 @@ +let nock = require('nock'); + +module.exports.hash = "075ab402250accd9beb1a101d5015235"; + +module.exports.testInfo = {"uniqueName":{"filesystem":"filesystem160875819960408714","file":"file160875819975909553","destfile":"destfile160875820015804914"},"newDate":{}} + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/filesystem160875819960408714') + .query(true) + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Wed, 23 Dec 2020 21:16:39 GMT', + 'ETag', + '"0x8D8A78809ED18E2"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '0f592a71-301e-0070-7070-d9b64b000000', + 'x-ms-client-request-id', + '455aaad9-e44d-488c-9fed-7759ec1c64ed', + 'x-ms-version', + '2020-02-10', + 'Date', + 'Wed, 23 Dec 2020 21:16:39 GMT' +]); + +nock('https://fakestorageaccount.dfs.core.windows.net:443', {"encodedQueryParams":true}) + .put('/filesystem160875819960408714/file160875819975909553') + .query(true) + .reply(201, "", [ + 'Last-Modified', + 'Wed, 23 Dec 2020 21:16:39 GMT', + 'ETag', + '"0x8D8A7880A0A711B"', + 'Server', + 'Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'd00c93f1-c01f-0008-4e70-d9defc000000', + 'x-ms-version', + '2020-04-08', + 'x-ms-client-request-id', + 'fabc3871-4df9-4d54-9935-a70dd5c9b96f', + 'Date', + 'Wed, 23 Dec 2020 21:16:39 GMT', + 'Content-Length', + '0' +]); + +nock('https://fakestorageaccount.dfs.core.windows.net:443', {"encodedQueryParams":true}) + .patch('/filesystem160875819960408714/file160875819975909553', "Hello World") + .query(true) + .reply(202, "", [ + 'Server', + 'Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-request-id', + 'd00c93f2-c01f-0008-4f70-d9defc000000', + 'x-ms-version', + '2020-04-08', + 'x-ms-client-request-id', + 'dba0998f-5250-45b8-aecc-6f2d494168a9', + 'Date', + 'Wed, 23 Dec 2020 21:16:39 GMT', + 'Content-Length', + '0' +]); + +nock('https://fakestorageaccount.dfs.core.windows.net:443', {"encodedQueryParams":true}) + .patch('/filesystem160875819960408714/file160875819975909553') + .query(true) + .reply(200, "", [ + 'Last-Modified', + 'Wed, 23 Dec 2020 21:16:40 GMT', + 'ETag', + '"0x8D8A7880A2F3F8F"', + 'Server', + 'Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-server-encrypted', + 'false', + 'x-ms-request-id', + 'd00c93f3-c01f-0008-5070-d9defc000000', + 'x-ms-version', + '2020-04-08', + 'x-ms-client-request-id', + '16b4dac7-e114-476b-929f-1d2dd037432b', + 'Date', + 'Wed, 23 Dec 2020 21:16:39 GMT', + 'Content-Length', + '0' +]); + +nock('https://fakestorageaccount.dfs.core.windows.net:443', {"encodedQueryParams":true}) + .put('/filesystem160875819960408714/destfile160875820015804914') + .query(true) + .reply(201, "", [ + 'Server', + 'Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'd00c93f4-c01f-0008-5170-d9defc000000', + 'x-ms-version', + '2020-04-08', + 'x-ms-client-request-id', + 'f8611379-95aa-4a7b-b32f-ba934418f267', + 'Date', + 'Wed, 23 Dec 2020 21:16:40 GMT', + 'Content-Length', + '0' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .head('/filesystem160875819960408714/destfile160875820015804914') + .query(true) + .reply(200, "", [ + 'Content-Length', + '11', + 'Content-Type', + 'application/octet-stream', + 'Last-Modified', + 'Wed, 23 Dec 2020 21:16:40 GMT', + 'Accept-Ranges', + 'bytes', + 'ETag', + '"0x8D8A7880A2F3F8F"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '0f592b45-301e-0070-2870-d9b64b000000', + 'x-ms-client-request-id', + '87cea905-9b11-4ee4-a1f2-4b498169265c', + 'x-ms-version', + '2020-02-10', + 'x-ms-creation-time', + 'Wed, 23 Dec 2020 21:16:39 GMT', + 'x-ms-lease-status', + 'unlocked', + 'x-ms-lease-state', + 'available', + 'x-ms-blob-type', + 'BlockBlob', + 'x-ms-server-encrypted', + 'true', + 'x-ms-access-tier', + 'Hot', + 'x-ms-access-tier-inferred', + 'true', + 'Date', + 'Wed, 23 Dec 2020 21:16:40 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/filesystem160875819960408714') + .query(true) + .reply(202, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '0f592b5d-301e-0070-3a70-d9b64b000000', + 'x-ms-client-request-id', + 'e8580bd9-55d2-455f-995e-90aae1cf3c59', + 'x-ms-version', + '2020-02-10', + 'Date', + 'Wed, 23 Dec 2020 21:16:40 GMT' +]); diff --git a/sdk/storage/storage-file-datalake/recordings/node/datalakepathclient_nodejs_only/recording_move_with_shared_key_to_authenticate_source_sas_to_authenticate_destination.js b/sdk/storage/storage-file-datalake/recordings/node/datalakepathclient_nodejs_only/recording_move_with_shared_key_to_authenticate_source_sas_to_authenticate_destination.js new file mode 100644 index 000000000000..e6140d6d22e0 --- /dev/null +++ b/sdk/storage/storage-file-datalake/recordings/node/datalakepathclient_nodejs_only/recording_move_with_shared_key_to_authenticate_source_sas_to_authenticate_destination.js @@ -0,0 +1,169 @@ +let nock = require('nock'); + +module.exports.hash = "4fe3cdf149ccb177766454820aadd120"; + +module.exports.testInfo = {"uniqueName":{"filesystem":"filesystem160875819887204195","file":"file160875819896709491","destfile":"destfile160875819926802535"},"newDate":{}} + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .put('/filesystem160875819887204195') + .query(true) + .reply(201, "", [ + 'Content-Length', + '0', + 'Last-Modified', + 'Wed, 23 Dec 2020 21:16:38 GMT', + 'ETag', + '"0x8D8A788097B7DDD"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '0f592989-301e-0070-2e70-d9b64b000000', + 'x-ms-client-request-id', + '663fb4a0-0020-4212-8572-32dd4b438cb1', + 'x-ms-version', + '2020-02-10', + 'Date', + 'Wed, 23 Dec 2020 21:16:38 GMT' +]); + +nock('https://fakestorageaccount.dfs.core.windows.net:443', {"encodedQueryParams":true}) + .put('/filesystem160875819887204195/file160875819896709491') + .query(true) + .reply(201, "", [ + 'Last-Modified', + 'Wed, 23 Dec 2020 21:16:39 GMT', + 'ETag', + '"0x8D8A788098B7902"', + 'Server', + 'Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'd00c93ec-c01f-0008-4970-d9defc000000', + 'x-ms-version', + '2020-04-08', + 'x-ms-client-request-id', + '1cd8171c-532c-43bf-bf2a-20542a0e4fa1', + 'Date', + 'Wed, 23 Dec 2020 21:16:38 GMT', + 'Content-Length', + '0' +]); + +nock('https://fakestorageaccount.dfs.core.windows.net:443', {"encodedQueryParams":true}) + .patch('/filesystem160875819887204195/file160875819896709491', "Hello World") + .query(true) + .reply(202, "", [ + 'Server', + 'Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-server-encrypted', + 'true', + 'x-ms-request-id', + 'd00c93ed-c01f-0008-4a70-d9defc000000', + 'x-ms-version', + '2020-04-08', + 'x-ms-client-request-id', + '85ac65d3-884b-4d2b-897c-22ef86a6b090', + 'Date', + 'Wed, 23 Dec 2020 21:16:38 GMT', + 'Content-Length', + '0' +]); + +nock('https://fakestorageaccount.dfs.core.windows.net:443', {"encodedQueryParams":true}) + .patch('/filesystem160875819887204195/file160875819896709491') + .query(true) + .reply(200, "", [ + 'Last-Modified', + 'Wed, 23 Dec 2020 21:16:39 GMT', + 'ETag', + '"0x8D8A78809A87CEB"', + 'Server', + 'Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-server-encrypted', + 'false', + 'x-ms-request-id', + 'd00c93ee-c01f-0008-4b70-d9defc000000', + 'x-ms-version', + '2020-04-08', + 'x-ms-client-request-id', + '96e64c2a-18f7-4871-a8a2-262a9386ce8b', + 'Date', + 'Wed, 23 Dec 2020 21:16:38 GMT', + 'Content-Length', + '0' +]); + +nock('https://fakestorageaccount.dfs.core.windows.net:443', {"encodedQueryParams":true}) + .put('/filesystem160875819887204195/destfile160875819926802535') + .query(true) + .reply(201, "", [ + 'Server', + 'Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + 'd00c93f0-c01f-0008-4d70-d9defc000000', + 'x-ms-version', + '2020-04-08', + 'x-ms-client-request-id', + '71161ef4-d117-4b15-9e4b-41f4e97838e0', + 'Date', + 'Wed, 23 Dec 2020 21:16:39 GMT', + 'Content-Length', + '0' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .head('/filesystem160875819887204195/destfile160875819926802535') + .query(true) + .reply(200, "", [ + 'Content-Length', + '11', + 'Content-Type', + 'application/octet-stream', + 'Last-Modified', + 'Wed, 23 Dec 2020 21:16:39 GMT', + 'Accept-Ranges', + 'bytes', + 'ETag', + '"0x8D8A78809A87CEB"', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '0f592a2d-301e-0070-3570-d9b64b000000', + 'x-ms-client-request-id', + 'f19c5768-4171-4fb9-a0da-0eb3eb755884', + 'x-ms-version', + '2020-02-10', + 'x-ms-creation-time', + 'Wed, 23 Dec 2020 21:16:39 GMT', + 'x-ms-lease-status', + 'unlocked', + 'x-ms-lease-state', + 'available', + 'x-ms-blob-type', + 'BlockBlob', + 'x-ms-server-encrypted', + 'true', + 'x-ms-access-tier', + 'Hot', + 'x-ms-access-tier-inferred', + 'true', + 'Date', + 'Wed, 23 Dec 2020 21:16:39 GMT' +]); + +nock('https://fakestorageaccount.blob.core.windows.net:443', {"encodedQueryParams":true}) + .delete('/filesystem160875819887204195') + .query(true) + .reply(202, "", [ + 'Content-Length', + '0', + 'Server', + 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0', + 'x-ms-request-id', + '0f592a4e-301e-0070-4f70-d9b64b000000', + 'x-ms-client-request-id', + '3175a680-f308-4171-8e1b-c22b0543bebe', + 'x-ms-version', + '2020-02-10', + 'Date', + 'Wed, 23 Dec 2020 21:16:39 GMT' +]); diff --git a/sdk/storage/storage-file-datalake/src/clients.ts b/sdk/storage/storage-file-datalake/src/clients.ts index 0577cefad615..5cd92ed69ced 100644 --- a/sdk/storage/storage-file-datalake/src/clients.ts +++ b/sdk/storage/storage-file-datalake/src/clients.ts @@ -89,7 +89,13 @@ import { } from "./utils/constants"; import { DataLakeAclChangeFailedError } from "./utils/DataLakeAclChangeFailedError"; import { createSpan } from "./utils/tracing"; -import { appendToURLPath, appendToURLQuery, setURLPath } from "./utils/utils.common"; +import { + appendToURLPath, + appendToURLQuery, + getURLPathAndQuery, + setURLPath, + setURLQueries +} from "./utils/utils.common"; import { fsCreateReadStream, fsStat } from "./utils/utils.node"; /** @@ -880,7 +886,8 @@ export class DataLakePathClient extends StorageClient { * * @see https://docs.microsoft.com/en-us/rest/api/storageservices/datalakestoragegen2/path/create * - * @param {string} destinationPath Destination directory path like "directory" or file path "directory/file" + * @param {string} destinationPath Destination directory path like "directory" or file path "directory/file". + * If the destinationPath is authenticated with SAS, add the SAS to the destination path like "directory/file?sasToken". * @param {PathMoveOptions} [options] Optional. Options when moving directory or file. * @returns {Promise} * @memberof DataLakePathClient @@ -894,6 +901,7 @@ export class DataLakePathClient extends StorageClient { * * @param {string} destinationFileSystem Destination file system like "filesystem". * @param {string} destinationPath Destination directory path like "directory" or file path "directory/file" + * If the destinationPath is authenticated with SAS, add the SAS to the destination path like "directory/file?sasToken". * @param {PathMoveOptions} [options] Optional. Options when moving directory or file. * @returns {Promise} * @memberof DataLakePathClient @@ -925,12 +933,21 @@ export class DataLakePathClient extends StorageClient { const { span, spanOptions } = createSpan("DataLakePathClient-move", options.tracingOptions); - // Be aware that decodeURIComponent("%27") = "'"; but encodeURIComponent("'") = "'". - // But since both ' and %27 work with the service here so we omit replace(/'/g, "%27"). - const renameSource = `/${this.fileSystemName}/${encodeURIComponent(this.name)}`; - const renameDestination = `/${destinationFileSystem}/${destinationPath}`; + const renameSource = getURLPathAndQuery(this.dfsEndpointUrl); + + const split: string[] = destinationPath.split("?"); + let destinationUrl: string; + if (split.length === 2) { + const renameDestination = `/${destinationFileSystem}/${split[0]}`; + destinationUrl = setURLPath(this.dfsEndpointUrl, renameDestination); + destinationUrl = setURLQueries(destinationUrl, split[1]); + } else if (split.length === 1) { + const renameDestination = `/${destinationFileSystem}/${destinationPath}`; + destinationUrl = setURLPath(this.dfsEndpointUrl, renameDestination); + } else { + throw new RangeError("Destination path should not contain more than one query string"); + } - const destinationUrl = setURLPath(this.dfsEndpointUrl, renameDestination); const destPathClient = new DataLakePathClient(destinationUrl, this.pipeline); try { diff --git a/sdk/storage/storage-file-datalake/src/utils/utils.common.ts b/sdk/storage/storage-file-datalake/src/utils/utils.common.ts index 542d2ed07406..49ed2c4ffa05 100644 --- a/sdk/storage/storage-file-datalake/src/utils/utils.common.ts +++ b/sdk/storage/storage-file-datalake/src/utils/utils.common.ts @@ -394,6 +394,28 @@ export function getURLQueries(url: string): { [key: string]: string } { return queries; } +/** + * Get URL query string. + * + * @param {string} url + */ +export function getURLQueryString(url: string): string | undefined { + const urlParsed = URLBuilder.parse(url); + return urlParsed.getQuery(); +} + +/** + * Set URL query string. + * + * @param {string} url + * @param {string} queryString + */ +export function setURLQueries(url: string, queryString: string): string { + const urlParsed = URLBuilder.parse(url); + urlParsed.setQuery(queryString); + return urlParsed.toString(); +} + /** * Rounds a date off to seconds. * diff --git a/sdk/storage/storage-file-datalake/test/node/pathclient.spec.ts b/sdk/storage/storage-file-datalake/test/node/pathclient.spec.ts index 2eddec1e97bb..d31df79ff60e 100644 --- a/sdk/storage/storage-file-datalake/test/node/pathclient.spec.ts +++ b/sdk/storage/storage-file-datalake/test/node/pathclient.spec.ts @@ -8,12 +8,18 @@ import { AccessControlChanges, DataLakeFileClient, DataLakeFileSystemClient, + DataLakeSASPermissions, DataLakeServiceClient, PathAccessControlItem, PathPermissions } from "../../src"; import { toAcl, toRemoveAcl } from "../../src/transforms"; -import { bodyToString, getDataLakeServiceClient, recorderEnvSetup } from "../utils"; +import { + bodyToString, + getDataLakeServiceClient, + recorderEnvSetup, + getDataLakeFileSystemClientWithSASCredential +} from "../utils"; dotenv.config(); @@ -334,6 +340,58 @@ describe("DataLakePathClient Node.js only", () => { await destFileSystemClient.delete(); }); + it("move should not encode / in the source", async () => { + await fileSystemClient.getDirectoryClient("path").create(); + const destFileName = recorder.getUniqueName("path/slash"); + const destFileClient = fileSystemClient.getFileClient(destFileName); + await fileClient.move(encodeURIComponent(destFileName)); + await destFileClient.getProperties(); + await destFileClient.move(fileName); + await fileClient.getProperties(); + }); + + it("move with destination path encoded", async () => { + await fileSystemClient.getDirectoryClient("dest file with & and 1").create(); + const destFileName = recorder.getUniqueName("dest file with & and 1/char"); + const destFileClient = fileSystemClient.getFileClient(destFileName); + await fileClient.move(encodeURIComponent(destFileName)); + await destFileClient.getProperties(); + }); + + it("move with destination path not encoded", async () => { + await fileSystemClient.getDirectoryClient("dest file with & and 2").create(); + const destFileName = recorder.getUniqueName("dest file with & and 2/char"); + const destFileClient = fileSystemClient.getFileClient(destFileName); + await fileClient.move(destFileName); + await destFileClient.getProperties(); + }); + + it("move with shared key to authenticate source, SAS to authenticate destination", async () => { + let destFileName = recorder.getUniqueName("destfile"); + const sasFileSystemClient = getDataLakeFileSystemClientWithSASCredential({ + fileSystemName: fileSystemClient.name, + pathName: destFileName, + expiresOn: new Date(Date.now() + 60 * 1000), + permissions: DataLakeSASPermissions.parse("rwm") + }); + const sasDestFileClient = sasFileSystemClient.getFileClient(destFileName); + await fileClient.move(destFileName); + await sasDestFileClient.getProperties(); + }); + + it("move with SAS to authenticate source, SAS to authenticate destination", async () => { + let destFileName = recorder.getUniqueName("destfile"); + const sasFileSystemClient = getDataLakeFileSystemClientWithSASCredential({ + fileSystemName: fileSystemClient.name, + expiresOn: new Date(Date.now() + 60 * 1000), + permissions: DataLakeSASPermissions.parse("rwdm") + }); + const sasDestFileClient = sasFileSystemClient.getFileClient(destFileName); + const sasSourceFileClient = sasFileSystemClient.getFileClient(fileClient.name); + await sasSourceFileClient.move(destFileName); + await sasDestFileClient.getProperties(); + }); + it("quick query should work", async () => { const csvContent = "100,200,300,400\n150,250,350,450\n"; const fileClient2 = fileSystemClient.getFileClient(fileName + "2"); diff --git a/sdk/storage/storage-file-datalake/test/utils/index.ts b/sdk/storage/storage-file-datalake/test/utils/index.ts index 3c9f241cf2c3..868efa58ce8d 100644 --- a/sdk/storage/storage-file-datalake/test/utils/index.ts +++ b/sdk/storage/storage-file-datalake/test/utils/index.ts @@ -10,6 +10,11 @@ import { StorageSharedKeyCredential } from "../../src/credentials/StorageSharedK import { DataLakeServiceClient } from "../../src/DataLakeServiceClient"; import { newPipeline, StoragePipelineOptions } from "../../src/Pipeline"; import { getUniqueName, SimpleTokenCredential } from "./testutils.common"; +import { + DataLakeFileSystemClient, + DataLakeSASSignatureValues, + generateDataLakeSASQueryParameters +} from "../../src"; dotenv.config(); @@ -47,6 +52,45 @@ export function getTokenCredential(): TokenCredential { return new SimpleTokenCredential(accountToken); } +/** + * Return a sasToken that can be used for testing + */ +export function getSASToken(accountType: string, sasValues: DataLakeSASSignatureValues): string { + const accountNameEnvVar = `${accountType}ACCOUNT_NAME`; + const accountKeyEnvVar = `${accountType}ACCOUNT_KEY`; + + let accountName: string | undefined; + let accountKey: string | undefined; + + accountName = process.env[accountNameEnvVar]; + accountKey = process.env[accountKeyEnvVar]; + + if (!accountName || !accountKey || accountName === "" || accountKey === "") { + throw new Error( + `${accountNameEnvVar} and/or ${accountKeyEnvVar} environment variables not specified.` + ); + } + + const sasParameters = generateDataLakeSASQueryParameters( + sasValues, + new StorageSharedKeyCredential(accountName, accountKey) + ); + return sasParameters.toString(); +} + +export function getSASFileSystemClient( + accountType: string, + sasValues: DataLakeSASSignatureValues, + accountNameSuffix: string = "", + pipelineOptions: StoragePipelineOptions = {} +): DataLakeFileSystemClient { + const credential = getGenericCredential(accountType) as StorageSharedKeyCredential; + const sasToken = getSASToken(accountType, sasValues); + const pipeline = newPipeline(undefined, { ...pipelineOptions }); + const dfsPrimaryURL = `https://${credential.accountName}${accountNameSuffix}.dfs.core.windows.net/${sasValues.fileSystemName}/?${sasToken}`; + return new DataLakeFileSystemClient(dfsPrimaryURL, pipeline); +} + export function getGenericDataLakeServiceClient( accountType: string, accountNameSuffix: string = "", @@ -118,6 +162,15 @@ export function getDataLakeServiceClientWithDefaultCredential( return new DataLakeServiceClient(dfsPrimaryURL, pipeline); } +export function getDataLakeFileSystemClientWithSASCredential( + sasValues: DataLakeSASSignatureValues, + accountType: string = "DFS_", + accountNameSuffix: string = "", + pipelineOptions: StoragePipelineOptions = {} +): DataLakeFileSystemClient { + return getSASFileSystemClient(accountType, sasValues, accountNameSuffix, pipelineOptions); +} + export function getAlternateDataLakeServiceClient(): DataLakeServiceClient { return getGenericDataLakeServiceClient("SECONDARY_", "-secondary"); }