diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_data_lake_directory_client.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_data_lake_directory_client.py index 90c525bedf99..0584bb7ad9a7 100644 --- a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_data_lake_directory_client.py +++ b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_data_lake_directory_client.py @@ -3,6 +3,12 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- + +try: + from urllib.parse import quote, unquote +except ImportError: + from urllib2 import quote, unquote # type: ignore + from ._shared.base_client import parse_connection_str from ._data_lake_file_client import DataLakeFileClient from ._models import DirectoryProperties @@ -300,16 +306,28 @@ def rename_directory(self, new_name, # type: str """ new_name = new_name.strip('/') new_file_system = new_name.split('/')[0] - path = new_name[len(new_file_system):] + new_path_and_token = new_name[len(new_file_system):].split('?') + new_path = new_path_and_token[0] + try: + new_dir_sas = new_path_and_token[1] or self._query_str.strip('?') + except IndexError: + if not self._raw_credential and new_file_system != self.file_system_name: + raise ValueError("please provide the sas token for the new file") + if not self._raw_credential and new_file_system == self.file_system_name: + new_dir_sas = self._query_str.strip('?') new_directory_client = DataLakeDirectoryClient( - self.url, new_file_system, directory_name=path, credential=self._raw_credential, + "{}://{}".format(self.scheme, self.primary_hostname), new_file_system, directory_name=new_path, + credential=self._raw_credential or new_dir_sas, _hosts=self._hosts, _configuration=self._config, _pipeline=self._pipeline, require_encryption=self.require_encryption, key_encryption_key=self.key_encryption_key, key_resolver_function=self.key_resolver_function) - new_directory_client._rename_path('/'+self.file_system_name+'/'+self.path_name, # pylint: disable=protected-access - **kwargs) + new_directory_client._rename_path( # pylint: disable=protected-access + '/{}/{}{}'.format(quote(unquote(self.file_system_name)), + quote(unquote(self.path_name)), + self._query_str), + **kwargs) return new_directory_client def create_sub_directory(self, sub_directory, # type: Union[DirectoryProperties, str] diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_data_lake_file_client.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_data_lake_file_client.py index 0316f3c1b23b..4388d3b39898 100644 --- a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_data_lake_file_client.py +++ b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_data_lake_file_client.py @@ -4,6 +4,12 @@ # license information. # -------------------------------------------------------------------------- from io import BytesIO + +try: + from urllib.parse import quote, unquote +except ImportError: + from urllib2 import quote, unquote # type: ignore + import six from ._quick_query_helper import DataLakeFileQueryReader @@ -631,21 +637,35 @@ def rename_file(self, new_name, # type: str """ new_name = new_name.strip('/') new_file_system = new_name.split('/')[0] - path = new_name[len(new_file_system):] - - new_directory_client = DataLakeFileClient( - self.url, new_file_system, file_path=path, credential=self._raw_credential, + new_path_and_token = new_name[len(new_file_system):].split('?') + new_path = new_path_and_token[0] + try: + new_file_sas = new_path_and_token[1] or self._query_str.strip('?') + except IndexError: + if not self._raw_credential and new_file_system != self.file_system_name: + raise ValueError("please provide the sas token for the new file") + if not self._raw_credential and new_file_system == self.file_system_name: + new_file_sas = self._query_str.strip('?') + + new_file_client = DataLakeFileClient( + "{}://{}".format(self.scheme, self.primary_hostname), new_file_system, file_path=new_path, + credential=self._raw_credential or new_file_sas, _hosts=self._hosts, _configuration=self._config, _pipeline=self._pipeline, _location_mode=self._location_mode, require_encryption=self.require_encryption, key_encryption_key=self.key_encryption_key, - key_resolver_function=self.key_resolver_function) - new_directory_client._rename_path('/'+self.file_system_name+'/'+self.path_name, # pylint: disable=protected-access - **kwargs) - return new_directory_client + key_resolver_function=self.key_resolver_function + ) + new_file_client._rename_path( # pylint: disable=protected-access + '/{}/{}{}'.format(quote(unquote(self.file_system_name)), + quote(unquote(self.path_name)), + self._query_str), + **kwargs) + return new_file_client def query_file(self, query_expression, **kwargs): # type: (str, **Any) -> DataLakeFileQueryReader - """Enables users to select/project on datalake file data by providing simple query expressions. + """ + Enables users to select/project on datalake file data by providing simple query expressions. This operations returns a DataLakeFileQueryReader, users need to use readall() or readinto() to get query data. :param str query_expression: diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_path_client.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_path_client.py index 20ae77bd5f63..decac55f5d4a 100644 --- a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_path_client.py +++ b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_path_client.py @@ -5,10 +5,10 @@ # -------------------------------------------------------------------------- try: - from urllib.parse import urlparse, quote, unquote + from urllib.parse import urlparse, quote except ImportError: from urlparse import urlparse # type: ignore - from urllib2 import quote, unquote # type: ignore + from urllib2 import quote # type: ignore import six @@ -409,7 +409,7 @@ def _rename_path_options(self, rename_source, content_settings=None, metadata=No path_http_headers = get_path_http_headers(content_settings) options = { - 'rename_source': quote(unquote(rename_source)), + 'rename_source': rename_source, 'path_http_headers': path_http_headers, 'lease_access_conditions': access_conditions, 'source_lease_id': source_lease_id, diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/aio/_data_lake_directory_client_async.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/aio/_data_lake_directory_client_async.py index 8d4eb3ebbe83..c6a7dcb3ec29 100644 --- a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/aio/_data_lake_directory_client_async.py +++ b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/aio/_data_lake_directory_client_async.py @@ -4,7 +4,10 @@ # license information. # -------------------------------------------------------------------------- # pylint: disable=invalid-overridden-method - +try: + from urllib.parse import quote, unquote +except ImportError: + from urllib2 import quote, unquote # type: ignore from ._data_lake_file_client_async import DataLakeFileClient from .._data_lake_directory_client import DataLakeDirectoryClient as DataLakeDirectoryClientBase from .._models import DirectoryProperties @@ -270,16 +273,28 @@ async def rename_directory(self, new_name, # type: str """ new_name = new_name.strip('/') new_file_system = new_name.split('/')[0] - path = new_name[len(new_file_system):] + new_path_and_token = new_name[len(new_file_system):].split('?') + new_path = new_path_and_token[0] + try: + new_dir_sas = new_path_and_token[1] or self._query_str.strip('?') + except IndexError: + if not self._raw_credential and new_file_system != self.file_system_name: + raise ValueError("please provide the sas token for the new directory") + if not self._raw_credential and new_file_system == self.file_system_name: + new_dir_sas = self._query_str.strip('?') new_directory_client = DataLakeDirectoryClient( - self.url, new_file_system, directory_name=path, credential=self._raw_credential, + "{}://{}".format(self.scheme, self.primary_hostname), new_file_system, directory_name=new_path, + credential=self._raw_credential or new_dir_sas, _hosts=self._hosts, _configuration=self._config, _pipeline=self._pipeline, _location_mode=self._location_mode, require_encryption=self.require_encryption, key_encryption_key=self.key_encryption_key, key_resolver_function=self.key_resolver_function) - await new_directory_client._rename_path('/' + self.file_system_name + '/' + self.path_name, # pylint: disable=protected-access - **kwargs) + await new_directory_client._rename_path( # pylint: disable=protected-access + '/{}/{}{}'.format(quote(unquote(self.file_system_name)), + quote(unquote(self.path_name)), + self._query_str), + **kwargs) return new_directory_client async def create_sub_directory(self, sub_directory, # type: Union[DirectoryProperties, str] diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/aio/_data_lake_file_client_async.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/aio/_data_lake_file_client_async.py index e74cc13442ad..dc1c69384c68 100644 --- a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/aio/_data_lake_file_client_async.py +++ b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/aio/_data_lake_file_client_async.py @@ -5,6 +5,11 @@ # -------------------------------------------------------------------------- # pylint: disable=invalid-overridden-method +try: + from urllib.parse import quote, unquote +except ImportError: + from urllib2 import quote, unquote # type: ignore + from ._download_async import StorageStreamDownloader from ._path_client_async import PathClient from .._data_lake_file_client import DataLakeFileClient as DataLakeFileClientBase @@ -500,14 +505,26 @@ async def rename_file(self, new_name, # type: str """ new_name = new_name.strip('/') new_file_system = new_name.split('/')[0] - path = new_name[len(new_file_system):] - - new_directory_client = DataLakeFileClient( - self.url, new_file_system, file_path=path, credential=self._raw_credential, + new_path_and_token = new_name[len(new_file_system):].split('?') + new_path = new_path_and_token[0] + try: + new_file_sas = new_path_and_token[1] or self._query_str.strip('?') + except IndexError: + if not self._raw_credential and new_file_system != self.file_system_name: + raise ValueError("please provide the sas token for the new file") + if not self._raw_credential and new_file_system == self.file_system_name: + new_file_sas = self._query_str.strip('?') + + new_file_client = DataLakeFileClient( + "{}://{}".format(self.scheme, self.primary_hostname), new_file_system, file_path=new_path, + credential=self._raw_credential or new_file_sas, _hosts=self._hosts, _configuration=self._config, _pipeline=self._pipeline, _location_mode=self._location_mode, require_encryption=self.require_encryption, key_encryption_key=self.key_encryption_key, key_resolver_function=self.key_resolver_function) - await new_directory_client._rename_path('/' + self.file_system_name + '/' + self.path_name, # pylint: disable=protected-access - **kwargs) - return new_directory_client + await new_file_client._rename_path( # pylint: disable=protected-access + '/{}/{}{}'.format(quote(unquote(self.file_system_name)), + quote(unquote(self.path_name)), + self._query_str), + **kwargs) + return new_file_client diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/aio/_path_client_async.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/aio/_path_client_async.py index 688f2d4c3ffd..61ea8c4df76e 100644 --- a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/aio/_path_client_async.py +++ b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/aio/_path_client_async.py @@ -35,7 +35,7 @@ def __init__( **kwargs) kwargs.pop('_hosts', None) - self._blob_client = BlobClient(self._blob_account_url, file_system_name, blob_name=path_name, + self._blob_client = BlobClient(self._blob_account_url, file_system_name, blob_name=self.path_name, credential=credential, _hosts=self._blob_client._hosts, **kwargs) # type: ignore # pylint: disable=protected-access self._client = DataLakeStorageClient(self.url, file_system_name, path_name, pipeline=self._pipeline) self._loop = kwargs.get('loop', None) diff --git a/sdk/storage/azure-storage-file-datalake/tests/recordings/test_directory_async.test_rename_from_an_unencoded_directory_in_another_file_system_async.yaml b/sdk/storage/azure-storage-file-datalake/tests/recordings/test_directory_async.test_rename_from_an_unencoded_directory_in_another_file_system_async.yaml index b7b80fa3fd20..6960f3c8cff9 100644 --- a/sdk/storage/azure-storage-file-datalake/tests/recordings/test_directory_async.test_rename_from_an_unencoded_directory_in_another_file_system_async.yaml +++ b/sdk/storage/azure-storage-file-datalake/tests/recordings/test_directory_async.test_rename_from_an_unencoded_directory_in_another_file_system_async.yaml @@ -5,9 +5,9 @@ interactions: User-Agent: - azsdk-python-storage-dfs/12.0.2 Python/3.7.3 (Windows-10-10.0.18362-SP0) x-ms-client-request-id: - - c21332f6-accf-11ea-bca9-001a7dda7113 + - 069607a4-af4d-11ea-8659-001a7dda7113 x-ms-date: - - Fri, 12 Jun 2020 17:11:30 GMT + - Mon, 15 Jun 2020 21:13:14 GMT x-ms-version: - '2019-07-07' method: PUT @@ -17,11 +17,11 @@ interactions: string: '' headers: Content-Length: '0' - Date: Fri, 12 Jun 2020 17:11:30 GMT - Etag: '"0x8D80EF3A649A6BD"' - Last-Modified: Fri, 12 Jun 2020 17:11:30 GMT + Date: Mon, 15 Jun 2020 21:13:13 GMT + Etag: '"0x8D81170EAC23846"' + Last-Modified: Mon, 15 Jun 2020 21:13:14 GMT Server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-id: 7dc7bc84-a01e-0064-22dc-40bc0c000000 + x-ms-request-id: 7002d3d9-201e-0027-4459-435a50000000 x-ms-version: '2019-07-07' status: code: 201 @@ -33,9 +33,9 @@ interactions: User-Agent: - azsdk-python-storage-dfs/12.0.2 Python/3.7.3 (Windows-10-10.0.18362-SP0) x-ms-client-request-id: - - c21d4e0a-accf-11ea-9b86-001a7dda7113 + - 069f4622-af4d-11ea-b1a2-001a7dda7113 x-ms-date: - - Fri, 12 Jun 2020 17:11:30 GMT + - Mon, 15 Jun 2020 21:13:14 GMT x-ms-properties: - '' x-ms-version: @@ -47,11 +47,11 @@ interactions: string: '' headers: Content-Length: '0' - Date: Fri, 12 Jun 2020 17:11:30 GMT - Etag: '"0x8D80EF3A67632CF"' - Last-Modified: Fri, 12 Jun 2020 17:11:30 GMT + Date: Mon, 15 Jun 2020 21:13:14 GMT + Etag: '"0x8D81170EAFDE328"' + Last-Modified: Mon, 15 Jun 2020 21:13:14 GMT Server: Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-id: 22009f20-e01f-0017-71dc-40e49f000000 + x-ms-request-id: 0acd1f81-d01f-0033-2559-43123f000000 x-ms-version: '2019-02-02' status: code: 201 @@ -63,9 +63,9 @@ interactions: User-Agent: - azsdk-python-storage-dfs/12.0.2 Python/3.7.3 (Windows-10-10.0.18362-SP0) x-ms-client-request-id: - - c247aefe-accf-11ea-840d-001a7dda7113 + - 06d99d0a-af4d-11ea-a19e-001a7dda7113 x-ms-date: - - Fri, 12 Jun 2020 17:11:30 GMT + - Mon, 15 Jun 2020 21:13:15 GMT x-ms-properties: - '' x-ms-version: @@ -77,11 +77,11 @@ interactions: string: '' headers: Content-Length: '0' - Date: Fri, 12 Jun 2020 17:11:30 GMT - Etag: '"0x8D80EF3A67F329F"' - Last-Modified: Fri, 12 Jun 2020 17:11:30 GMT + Date: Mon, 15 Jun 2020 21:13:14 GMT + Etag: '"0x8D81170EB0AD1B0"' + Last-Modified: Mon, 15 Jun 2020 21:13:15 GMT Server: Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-id: 22009f23-e01f-0017-74dc-40e49f000000 + x-ms-request-id: 0acd1f82-d01f-0033-2659-43123f000000 x-ms-version: '2019-02-02' status: code: 201 @@ -93,9 +93,9 @@ interactions: User-Agent: - azsdk-python-storage-dfs/12.0.2 Python/3.7.3 (Windows-10-10.0.18362-SP0) x-ms-client-request-id: - - c2504130-accf-11ea-9212-001a7dda7113 + - 06e68d48-af4d-11ea-806f-001a7dda7113 x-ms-date: - - Fri, 12 Jun 2020 17:11:30 GMT + - Mon, 15 Jun 2020 21:13:15 GMT x-ms-version: - '2019-07-07' method: PUT @@ -105,11 +105,11 @@ interactions: string: '' headers: Content-Length: '0' - Date: Fri, 12 Jun 2020 17:11:30 GMT - Etag: '"0x8D80EF3A686E185"' - Last-Modified: Fri, 12 Jun 2020 17:11:30 GMT + Date: Mon, 15 Jun 2020 21:13:14 GMT + Etag: '"0x8D81170EB134D3D"' + Last-Modified: Mon, 15 Jun 2020 21:13:15 GMT Server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-id: 7dc7bdc0-a01e-0064-47dc-40bc0c000000 + x-ms-request-id: 7002d55e-201e-0027-3059-435a50000000 x-ms-version: '2019-07-07' status: code: 201 @@ -121,9 +121,9 @@ interactions: User-Agent: - azsdk-python-storage-dfs/12.0.2 Python/3.7.3 (Windows-10-10.0.18362-SP0) x-ms-client-request-id: - - c2598b34-accf-11ea-8b03-001a7dda7113 + - 06f1bfd8-af4d-11ea-ac66-001a7dda7113 x-ms-date: - - Fri, 12 Jun 2020 17:11:30 GMT + - Mon, 15 Jun 2020 21:13:15 GMT x-ms-properties: - '' x-ms-version: @@ -135,11 +135,11 @@ interactions: string: '' headers: Content-Length: '0' - Date: Fri, 12 Jun 2020 17:11:30 GMT - Etag: '"0x8D80EF3A6919EF3"' - Last-Modified: Fri, 12 Jun 2020 17:11:30 GMT + Date: Mon, 15 Jun 2020 21:13:14 GMT + Etag: '"0x8D81170EB1FE596"' + Last-Modified: Mon, 15 Jun 2020 21:13:15 GMT Server: Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-id: 22009f28-e01f-0017-79dc-40e49f000000 + x-ms-request-id: 0acd1f83-d01f-0033-2759-43123f000000 x-ms-version: '2019-02-02' status: code: 201 @@ -151,9 +151,9 @@ interactions: User-Agent: - azsdk-python-storage-dfs/12.0.2 Python/3.7.3 (Windows-10-10.0.18362-SP0) x-ms-client-request-id: - - c2628aa2-accf-11ea-a924-001a7dda7113 + - 06fb6a78-af4d-11ea-aca6-001a7dda7113 x-ms-date: - - Fri, 12 Jun 2020 17:11:30 GMT + - Mon, 15 Jun 2020 21:13:15 GMT x-ms-rename-source: - /oldfilesystem745924c6/old%20dir x-ms-source-lease-id: @@ -167,9 +167,9 @@ interactions: string: '' headers: Content-Length: '0' - Date: Fri, 12 Jun 2020 17:11:30 GMT + Date: Mon, 15 Jun 2020 21:13:14 GMT Server: Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-id: 22009f2a-e01f-0017-7bdc-40e49f000000 + x-ms-request-id: 0acd1f84-d01f-0033-2859-43123f000000 x-ms-version: '2019-02-02' status: code: 201 @@ -181,13 +181,13 @@ interactions: User-Agent: - azsdk-python-storage-dfs/12.0.2 Python/3.7.3 (Windows-10-10.0.18362-SP0) x-ms-client-request-id: - - c26da686-accf-11ea-9ce2-001a7dda7113 + - 070734ec-af4d-11ea-9d7b-001a7dda7113 x-ms-date: - - Fri, 12 Jun 2020 17:11:30 GMT + - Mon, 15 Jun 2020 21:13:15 GMT x-ms-version: - '2019-07-07' method: HEAD - uri: https://storagename.blob.core.windows.net/newfilesystem745924c6//new%20name/sub%20dir + uri: https://storagename.blob.core.windows.net/newfilesystem745924c6/new%20name/sub%20dir response: body: string: '' @@ -195,33 +195,33 @@ interactions: Accept-Ranges: bytes Content-Length: '0' Content-Type: application/octet-stream - Date: Fri, 12 Jun 2020 17:11:30 GMT - Etag: '"0x8D80EF3A67632CF"' - Last-Modified: Fri, 12 Jun 2020 17:11:30 GMT + Date: Mon, 15 Jun 2020 21:13:14 GMT + Etag: '"0x8D81170EAFDE328"' + Last-Modified: Mon, 15 Jun 2020 21:13:14 GMT Server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-access-tier: Hot x-ms-access-tier-inferred: 'true' x-ms-blob-type: BlockBlob - x-ms-creation-time: Fri, 12 Jun 2020 17:11:30 GMT + x-ms-creation-time: Mon, 15 Jun 2020 21:13:14 GMT x-ms-lease-state: available x-ms-lease-status: unlocked x-ms-meta-hdi_isfolder: 'true' - x-ms-request-id: 7dc7be76-a01e-0064-6fdc-40bc0c000000 + x-ms-request-id: 7002d5fc-201e-0027-4959-435a50000000 x-ms-server-encrypted: 'true' x-ms-version: '2019-07-07' status: code: 200 message: OK - url: https://xiafuhns.blob.core.windows.net/newfilesystem745924c6//new%20name/sub%20dir + url: https://xiafuhns.blob.core.windows.net/newfilesystem745924c6/new%20name/sub%20dir - request: body: null headers: User-Agent: - azsdk-python-storage-dfs/12.0.2 Python/3.7.3 (Windows-10-10.0.18362-SP0) x-ms-client-request-id: - - c2766b92-accf-11ea-96f7-001a7dda7113 + - 0712fbcc-af4d-11ea-beb5-001a7dda7113 x-ms-date: - - Fri, 12 Jun 2020 17:11:30 GMT + - Mon, 15 Jun 2020 21:13:15 GMT x-ms-version: - '2019-07-07' method: HEAD @@ -233,17 +233,17 @@ interactions: Accept-Ranges: bytes Content-Length: '0' Content-Type: application/octet-stream - Date: Fri, 12 Jun 2020 17:11:30 GMT - Etag: '"0x8D80EF3A67F329F"' - Last-Modified: Fri, 12 Jun 2020 17:11:30 GMT + Date: Mon, 15 Jun 2020 21:13:14 GMT + Etag: '"0x8D81170EB0AD1B0"' + Last-Modified: Mon, 15 Jun 2020 21:13:15 GMT Server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-access-tier: Hot x-ms-access-tier-inferred: 'true' x-ms-blob-type: BlockBlob - x-ms-creation-time: Fri, 12 Jun 2020 17:11:30 GMT + x-ms-creation-time: Mon, 15 Jun 2020 21:13:15 GMT x-ms-lease-state: available x-ms-lease-status: unlocked - x-ms-request-id: 7dc7beab-a01e-0064-22dc-40bc0c000000 + x-ms-request-id: 7002d66d-201e-0027-3259-435a50000000 x-ms-server-encrypted: 'true' x-ms-version: '2019-07-07' status: @@ -256,9 +256,9 @@ interactions: User-Agent: - azsdk-python-storage-dfs/12.0.2 Python/3.7.3 (Windows-10-10.0.18362-SP0) x-ms-client-request-id: - - c27e3812-accf-11ea-b33c-001a7dda7113 + - 071b6800-af4d-11ea-8427-001a7dda7113 x-ms-date: - - Fri, 12 Jun 2020 17:11:30 GMT + - Mon, 15 Jun 2020 21:13:15 GMT x-ms-version: - '2019-07-07' method: DELETE @@ -268,9 +268,9 @@ interactions: string: '' headers: Content-Length: '0' - Date: Fri, 12 Jun 2020 17:11:30 GMT + Date: Mon, 15 Jun 2020 21:13:14 GMT Server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-id: 7dc7bed8-a01e-0064-4bdc-40bc0c000000 + x-ms-request-id: 7002d6a0-201e-0027-6259-435a50000000 x-ms-version: '2019-07-07' status: code: 202 diff --git a/sdk/storage/azure-storage-file-datalake/tests/recordings/test_file_async.test_append_empty_data_async.yaml b/sdk/storage/azure-storage-file-datalake/tests/recordings/test_file_async.test_append_empty_data_async.yaml index 6772c84c5007..e46a3bac4f6f 100644 --- a/sdk/storage/azure-storage-file-datalake/tests/recordings/test_file_async.test_append_empty_data_async.yaml +++ b/sdk/storage/azure-storage-file-datalake/tests/recordings/test_file_async.test_append_empty_data_async.yaml @@ -3,11 +3,11 @@ interactions: body: null headers: User-Agent: - - azsdk-python-storage-dfs/12.0.1 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-dfs/12.0.2 Python/3.7.3 (Windows-10-10.0.18362-SP0) x-ms-client-request-id: - - e6f3974a-7926-11ea-9de0-001a7dda7113 + - 0605d5a6-af4c-11ea-b5e7-001a7dda7113 x-ms-date: - - Tue, 07 Apr 2020 23:24:17 GMT + - Mon, 15 Jun 2020 21:06:04 GMT x-ms-properties: - '' x-ms-version: @@ -18,45 +18,28 @@ interactions: body: string: '' headers: - ? !!python/object/new:multidict._multidict.istr - - Content-Length - : '0' - ? !!python/object/new:multidict._multidict.istr - - Date - : Tue, 07 Apr 2020 23:24:17 GMT - ? !!python/object/new:multidict._multidict.istr - - Etag - : '"0x8D7DB4ACB3B62D6"' - ? !!python/object/new:multidict._multidict.istr - - Last-Modified - : Tue, 07 Apr 2020 23:24:17 GMT - ? !!python/object/new:multidict._multidict.istr - - Server - : Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-id: df7c9ee6-001f-001f-6733-0dfe90000000 + Content-Length: '0' + Date: Mon, 15 Jun 2020 21:06:03 GMT + Etag: '"0x8D8116FEA5D78F8"' + Last-Modified: Mon, 15 Jun 2020 21:06:04 GMT + Server: Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 + x-ms-request-id: db833674-301f-003b-2b58-430830000000 x-ms-version: '2019-02-02' status: code: 201 message: Created - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - xiafuhns.dfs.core.windows.net - - /filesystem95221206/file95221206 - - resource=file - - '' + url: https://xiafuhns.dfs.core.windows.net/filesystem95221206/file95221206?resource=file - request: body: null headers: Content-Length: - '0' User-Agent: - - azsdk-python-storage-dfs/12.0.1 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-dfs/12.0.2 Python/3.7.3 (Windows-10-10.0.18362-SP0) x-ms-client-request-id: - - e71254dc-7926-11ea-b129-001a7dda7113 + - 063893dc-af4c-11ea-9ec3-001a7dda7113 x-ms-date: - - Tue, 07 Apr 2020 23:24:18 GMT + - Mon, 15 Jun 2020 21:06:04 GMT x-ms-version: - '2019-02-02' method: PATCH @@ -65,137 +48,53 @@ interactions: body: string: '' headers: - ? !!python/object/new:multidict._multidict.istr - - Content-Length - : '0' - ? !!python/object/new:multidict._multidict.istr - - Date - : Tue, 07 Apr 2020 23:24:17 GMT - ? !!python/object/new:multidict._multidict.istr - - Etag - : '"0x8D7DB4ACB42D204"' - ? !!python/object/new:multidict._multidict.istr - - Last-Modified - : Tue, 07 Apr 2020 23:24:18 GMT - ? !!python/object/new:multidict._multidict.istr - - Server - : Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-id: df7c9ee7-001f-001f-6833-0dfe90000000 - x-ms-request-server-encrypted: 'true' + Content-Length: '0' + Date: Mon, 15 Jun 2020 21:06:03 GMT + Etag: '"0x8D8116FEA65E1B4"' + Last-Modified: Mon, 15 Jun 2020 21:06:04 GMT + Server: Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 + x-ms-request-id: db833675-301f-003b-2c58-430830000000 + x-ms-request-server-encrypted: 'false' x-ms-version: '2019-02-02' status: code: 200 message: OK - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - xiafuhns.dfs.core.windows.net - - /filesystem95221206/file95221206 - - position=0&retainUncommittedData=false&close=false&action=flush - - '' + url: https://xiafuhns.dfs.core.windows.net/filesystem95221206/file95221206?position=0&retainUncommittedData=false&close=false&action=flush - request: body: null headers: User-Agent: - - azsdk-python-storage-dfs/12.0.1 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-dfs/12.0.2 Python/3.7.3 (Windows-10-10.0.18362-SP0) x-ms-client-request-id: - - e71a17e2-7926-11ea-8194-001a7dda7113 + - 064111c2-af4c-11ea-86fa-001a7dda7113 x-ms-date: - - Tue, 07 Apr 2020 23:24:18 GMT + - Mon, 15 Jun 2020 21:06:04 GMT x-ms-version: - '2019-07-07' method: HEAD - uri: https://storagename.blob.core.windows.net/filesystem95221206//file95221206 + uri: https://storagename.blob.core.windows.net/filesystem95221206/file95221206 response: body: string: '' headers: - ? !!python/object/new:multidict._multidict.istr - - Accept-Ranges - : bytes - ? !!python/object/new:multidict._multidict.istr - - Content-Length - : '0' - ? !!python/object/new:multidict._multidict.istr - - Content-Type - : application/octet-stream - ? !!python/object/new:multidict._multidict.istr - - Date - : Tue, 07 Apr 2020 23:24:17 GMT - ? !!python/object/new:multidict._multidict.istr - - Etag - : '"0x8D7DB4ACB3B62D6"' - ? !!python/object/new:multidict._multidict.istr - - Last-Modified - : Tue, 07 Apr 2020 23:24:17 GMT - ? !!python/object/new:multidict._multidict.istr - - Server - : Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + Accept-Ranges: bytes + Content-Length: '0' + Content-Type: application/octet-stream + Date: Mon, 15 Jun 2020 21:06:03 GMT + Etag: '"0x8D8116FEA65E1B4"' + Last-Modified: Mon, 15 Jun 2020 21:06:04 GMT + Server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-access-tier: Hot x-ms-access-tier-inferred: 'true' x-ms-blob-type: BlockBlob - x-ms-creation-time: Tue, 07 Apr 2020 23:24:17 GMT + x-ms-creation-time: Mon, 15 Jun 2020 21:06:04 GMT x-ms-lease-state: available x-ms-lease-status: unlocked - x-ms-request-id: d4109778-e01e-0017-6133-0de49f000000 + x-ms-request-id: 040a5b57-e01e-004a-5e58-43ee1b000000 x-ms-server-encrypted: 'true' x-ms-version: '2019-07-07' status: code: 200 message: OK - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - xiafuhns.blob.core.windows.net - - /filesystem95221206//file95221206 - - '' - - '' -- request: - body: null - headers: - User-Agent: - - azsdk-python-storage-dfs/12.0.1 Python/3.7.3 (Windows-10-10.0.18362-SP0) - x-ms-client-request-id: - - e750dc5c-7926-11ea-9a6b-001a7dda7113 - x-ms-date: - - Tue, 07 Apr 2020 23:24:18 GMT - x-ms-properties: - - '' - x-ms-version: - - '2019-02-02' - method: PUT - uri: https://storagename.dfs.core.windows.net/filesystem95221206/file95221206?resource=file - response: - body: - string: '{"error":{"code":"FilesystemNotFound","message":"The specified filesystem - does not exist.\nRequestId:a926f338-a01f-0016-3e33-0dbb43000000\nTime:2020-04-07T23:24:18.5951143Z"}}' - headers: - ? !!python/object/new:multidict._multidict.istr - - Content-Length - : '175' - ? !!python/object/new:multidict._multidict.istr - - Content-Type - : application/json;charset=utf-8 - ? !!python/object/new:multidict._multidict.istr - - Date - : Tue, 07 Apr 2020 23:24:18 GMT - ? !!python/object/new:multidict._multidict.istr - - Server - : Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 - x-ms-error-code: FilesystemNotFound - x-ms-request-id: a926f338-a01f-0016-3e33-0dbb43000000 - x-ms-version: '2019-02-02' - status: - code: 404 - message: The specified filesystem does not exist. - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - xiafuhns.dfs.core.windows.net - - /filesystem95221206/file95221206 - - resource=file - - '' + url: https://xiafuhns.blob.core.windows.net/filesystem95221206/file95221206 version: 1 diff --git a/sdk/storage/azure-storage-file-datalake/tests/recordings/test_file_async.test_delete_file_async.yaml b/sdk/storage/azure-storage-file-datalake/tests/recordings/test_file_async.test_delete_file_async.yaml index 394e822c770e..3ecb7357a608 100644 --- a/sdk/storage/azure-storage-file-datalake/tests/recordings/test_file_async.test_delete_file_async.yaml +++ b/sdk/storage/azure-storage-file-datalake/tests/recordings/test_file_async.test_delete_file_async.yaml @@ -3,11 +3,11 @@ interactions: body: null headers: User-Agent: - - azsdk-python-storage-dfs/12.0.1 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-dfs/12.0.2 Python/3.7.3 (Windows-10-10.0.18362-SP0) x-ms-client-request-id: - - e7c12ed2-7926-11ea-ae07-001a7dda7113 + - 067e222c-af4c-11ea-a965-001a7dda7113 x-ms-date: - - Tue, 07 Apr 2020 23:24:19 GMT + - Mon, 15 Jun 2020 21:06:04 GMT x-ms-properties: - '' x-ms-version: @@ -18,43 +18,26 @@ interactions: body: string: '' headers: - ? !!python/object/new:multidict._multidict.istr - - Content-Length - : '0' - ? !!python/object/new:multidict._multidict.istr - - Date - : Tue, 07 Apr 2020 23:24:18 GMT - ? !!python/object/new:multidict._multidict.istr - - Etag - : '"0x8D7DB4ACC085CB7"' - ? !!python/object/new:multidict._multidict.istr - - Last-Modified - : Tue, 07 Apr 2020 23:24:19 GMT - ? !!python/object/new:multidict._multidict.istr - - Server - : Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-id: dab0f2d1-901f-000d-3033-0d8540000000 + Content-Length: '0' + Date: Mon, 15 Jun 2020 21:06:04 GMT + Etag: '"0x8D8116FEAC14BF9"' + Last-Modified: Mon, 15 Jun 2020 21:06:05 GMT + Server: Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 + x-ms-request-id: 2ec0d0b3-e01f-005a-0458-432b73000000 x-ms-version: '2019-02-02' status: code: 201 message: Created - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - xiafuhns.dfs.core.windows.net - - /filesystem2e3d0f79/file2e3d0f79 - - resource=file - - '' + url: https://xiafuhns.dfs.core.windows.net/filesystem2e3d0f79/file2e3d0f79?resource=file - request: body: null headers: User-Agent: - - azsdk-python-storage-dfs/12.0.1 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-dfs/12.0.2 Python/3.7.3 (Windows-10-10.0.18362-SP0) x-ms-client-request-id: - - e7df507a-7926-11ea-a623-001a7dda7113 + - 069c2e36-af4c-11ea-bb7c-001a7dda7113 x-ms-date: - - Tue, 07 Apr 2020 23:24:19 GMT + - Mon, 15 Jun 2020 21:06:05 GMT x-ms-version: - '2019-02-02' method: DELETE @@ -63,112 +46,40 @@ interactions: body: string: '' headers: - ? !!python/object/new:multidict._multidict.istr - - Content-Length - : '0' - ? !!python/object/new:multidict._multidict.istr - - Date - : Tue, 07 Apr 2020 23:24:18 GMT - ? !!python/object/new:multidict._multidict.istr - - Server - : Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-id: dab0f2d2-901f-000d-3133-0d8540000000 + Content-Length: '0' + Date: Mon, 15 Jun 2020 21:06:04 GMT + Server: Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 + x-ms-request-id: 2ec0d0b4-e01f-005a-0558-432b73000000 x-ms-version: '2019-02-02' status: code: 200 message: OK - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - xiafuhns.dfs.core.windows.net - - /filesystem2e3d0f79/file2e3d0f79 - - recursive=true - - '' + url: https://xiafuhns.dfs.core.windows.net/filesystem2e3d0f79/file2e3d0f79?recursive=true - request: body: null headers: User-Agent: - - azsdk-python-storage-dfs/12.0.1 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-dfs/12.0.2 Python/3.7.3 (Windows-10-10.0.18362-SP0) x-ms-client-request-id: - - e7e67786-7926-11ea-870b-001a7dda7113 + - 06a34240-af4c-11ea-bf8e-001a7dda7113 x-ms-date: - - Tue, 07 Apr 2020 23:24:19 GMT + - Mon, 15 Jun 2020 21:06:05 GMT x-ms-version: - '2019-07-07' method: HEAD - uri: https://storagename.blob.core.windows.net/filesystem2e3d0f79//file2e3d0f79 + uri: https://storagename.blob.core.windows.net/filesystem2e3d0f79/file2e3d0f79 response: body: string: '' headers: - ? !!python/object/new:multidict._multidict.istr - - Date - : Tue, 07 Apr 2020 23:24:18 GMT - ? !!python/object/new:multidict._multidict.istr - - Server - : Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 - ? !!python/object/new:multidict._multidict.istr - - Transfer-Encoding - : chunked + Date: Mon, 15 Jun 2020 21:06:04 GMT + Server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + Transfer-Encoding: chunked x-ms-error-code: BlobNotFound - x-ms-request-id: b07f63d0-601e-0044-1533-0dc7ab000000 + x-ms-request-id: f714f661-901e-0040-5e58-434aac000000 x-ms-version: '2019-07-07' status: code: 404 message: The specified blob does not exist. - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - xiafuhns.blob.core.windows.net - - /filesystem2e3d0f79//file2e3d0f79 - - '' - - '' -- request: - body: null - headers: - User-Agent: - - azsdk-python-storage-dfs/12.0.1 Python/3.7.3 (Windows-10-10.0.18362-SP0) - x-ms-client-request-id: - - efba3e30-7926-11ea-b3b0-001a7dda7113 - x-ms-date: - - Tue, 07 Apr 2020 23:24:32 GMT - x-ms-properties: - - '' - x-ms-version: - - '2019-02-02' - method: PUT - uri: https://storagename.dfs.core.windows.net/filesystem2e3d0f79/file2e3d0f79?resource=file - response: - body: - string: '{"error":{"code":"FilesystemNotFound","message":"The specified filesystem - does not exist.\nRequestId:3a10c5cf-b01f-001a-1733-0d2c4b000000\nTime:2020-04-07T23:24:32.7063401Z"}}' - headers: - ? !!python/object/new:multidict._multidict.istr - - Content-Length - : '175' - ? !!python/object/new:multidict._multidict.istr - - Content-Type - : application/json;charset=utf-8 - ? !!python/object/new:multidict._multidict.istr - - Date - : Tue, 07 Apr 2020 23:24:31 GMT - ? !!python/object/new:multidict._multidict.istr - - Server - : Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 - x-ms-error-code: FilesystemNotFound - x-ms-request-id: 3a10c5cf-b01f-001a-1733-0d2c4b000000 - x-ms-version: '2019-02-02' - status: - code: 404 - message: The specified filesystem does not exist. - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - xiafuhns.dfs.core.windows.net - - /filesystem2e3d0f79/file2e3d0f79 - - resource=file - - '' + url: https://xiafuhns.blob.core.windows.net/filesystem2e3d0f79/file2e3d0f79 version: 1 diff --git a/sdk/storage/azure-storage-file-datalake/tests/recordings/test_file_async.test_delete_file_with_if_unmodified_since_async.yaml b/sdk/storage/azure-storage-file-datalake/tests/recordings/test_file_async.test_delete_file_with_if_unmodified_since_async.yaml index 349d27e7b732..8b0571bc582e 100644 --- a/sdk/storage/azure-storage-file-datalake/tests/recordings/test_file_async.test_delete_file_with_if_unmodified_since_async.yaml +++ b/sdk/storage/azure-storage-file-datalake/tests/recordings/test_file_async.test_delete_file_with_if_unmodified_since_async.yaml @@ -3,11 +3,11 @@ interactions: body: null headers: User-Agent: - - azsdk-python-storage-dfs/12.0.1 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-dfs/12.0.2 Python/3.7.3 (Windows-10-10.0.18362-SP0) x-ms-client-request-id: - - e8345f40-7926-11ea-828f-001a7dda7113 + - 06fdb782-af4c-11ea-80e7-001a7dda7113 x-ms-date: - - Tue, 07 Apr 2020 23:24:19 GMT + - Mon, 15 Jun 2020 21:06:05 GMT x-ms-properties: - '' x-ms-version: @@ -18,103 +18,65 @@ interactions: body: string: '' headers: - ? !!python/object/new:multidict._multidict.istr - - Content-Length - : '0' - ? !!python/object/new:multidict._multidict.istr - - Date - : Tue, 07 Apr 2020 23:24:20 GMT - ? !!python/object/new:multidict._multidict.istr - - Etag - : '"0x8D7DB4ACC7C63BE"' - ? !!python/object/new:multidict._multidict.istr - - Last-Modified - : Tue, 07 Apr 2020 23:24:20 GMT - ? !!python/object/new:multidict._multidict.istr - - Server - : Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-id: a926f339-a01f-0016-3f33-0dbb43000000 + Content-Length: '0' + Date: Mon, 15 Jun 2020 21:06:05 GMT + Etag: '"0x8D8116FEB4105EA"' + Last-Modified: Mon, 15 Jun 2020 21:06:05 GMT + Server: Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 + x-ms-request-id: e6e92059-401f-0021-2558-4369ef000000 x-ms-version: '2019-02-02' status: code: 201 message: Created - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - xiafuhns.dfs.core.windows.net - - /filesystem362619b6/file362619b6 - - resource=file - - '' + url: https://xiafuhns.dfs.core.windows.net/filesystem362619b6/file362619b6?resource=file - request: body: null headers: User-Agent: - - azsdk-python-storage-dfs/12.0.1 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-dfs/12.0.2 Python/3.7.3 (Windows-10-10.0.18362-SP0) x-ms-client-request-id: - - e853918c-7926-11ea-a74e-001a7dda7113 + - 071c0d9a-af4c-11ea-a567-001a7dda7113 x-ms-date: - - Tue, 07 Apr 2020 23:24:20 GMT + - Mon, 15 Jun 2020 21:06:05 GMT x-ms-version: - '2019-07-07' method: HEAD - uri: https://storagename.blob.core.windows.net/filesystem362619b6//file362619b6 + uri: https://storagename.blob.core.windows.net/filesystem362619b6/file362619b6 response: body: string: '' headers: - ? !!python/object/new:multidict._multidict.istr - - Accept-Ranges - : bytes - ? !!python/object/new:multidict._multidict.istr - - Content-Length - : '0' - ? !!python/object/new:multidict._multidict.istr - - Content-Type - : application/octet-stream - ? !!python/object/new:multidict._multidict.istr - - Date - : Tue, 07 Apr 2020 23:24:19 GMT - ? !!python/object/new:multidict._multidict.istr - - Etag - : '"0x8D7DB4ACC7C63BE"' - ? !!python/object/new:multidict._multidict.istr - - Last-Modified - : Tue, 07 Apr 2020 23:24:20 GMT - ? !!python/object/new:multidict._multidict.istr - - Server - : Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + Accept-Ranges: bytes + Content-Length: '0' + Content-Type: application/octet-stream + Date: Mon, 15 Jun 2020 21:06:04 GMT + Etag: '"0x8D8116FEB4105EA"' + Last-Modified: Mon, 15 Jun 2020 21:06:05 GMT + Server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-access-tier: Hot x-ms-access-tier-inferred: 'true' x-ms-blob-type: BlockBlob - x-ms-creation-time: Tue, 07 Apr 2020 23:24:20 GMT + x-ms-creation-time: Mon, 15 Jun 2020 21:06:05 GMT x-ms-lease-state: available x-ms-lease-status: unlocked - x-ms-request-id: 64063528-a01e-0006-2d33-0d7e2b000000 + x-ms-request-id: 085ba31c-501e-004f-5258-433cc0000000 x-ms-server-encrypted: 'true' x-ms-version: '2019-07-07' status: code: 200 message: OK - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - xiafuhns.blob.core.windows.net - - /filesystem362619b6//file362619b6 - - '' - - '' + url: https://xiafuhns.blob.core.windows.net/filesystem362619b6/file362619b6 - request: body: null headers: If-Unmodified-Since: - - Tue, 07 Apr 2020 23:24:20 GMT + - Mon, 15 Jun 2020 21:06:05 GMT User-Agent: - - azsdk-python-storage-dfs/12.0.1 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-dfs/12.0.2 Python/3.7.3 (Windows-10-10.0.18362-SP0) x-ms-client-request-id: - - e85de9ba-7926-11ea-b934-001a7dda7113 + - 0724f75c-af4c-11ea-9e13-001a7dda7113 x-ms-date: - - Tue, 07 Apr 2020 23:24:20 GMT + - Mon, 15 Jun 2020 21:06:06 GMT x-ms-version: - '2019-02-02' method: DELETE @@ -123,112 +85,40 @@ interactions: body: string: '' headers: - ? !!python/object/new:multidict._multidict.istr - - Content-Length - : '0' - ? !!python/object/new:multidict._multidict.istr - - Date - : Tue, 07 Apr 2020 23:24:20 GMT - ? !!python/object/new:multidict._multidict.istr - - Server - : Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-id: a926f33a-a01f-0016-4033-0dbb43000000 + Content-Length: '0' + Date: Mon, 15 Jun 2020 21:06:05 GMT + Server: Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 + x-ms-request-id: e6e9205a-401f-0021-2658-4369ef000000 x-ms-version: '2019-02-02' status: code: 200 message: OK - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - xiafuhns.dfs.core.windows.net - - /filesystem362619b6/file362619b6 - - recursive=true - - '' + url: https://xiafuhns.dfs.core.windows.net/filesystem362619b6/file362619b6?recursive=true - request: body: null headers: User-Agent: - - azsdk-python-storage-dfs/12.0.1 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-dfs/12.0.2 Python/3.7.3 (Windows-10-10.0.18362-SP0) x-ms-client-request-id: - - e86537c6-7926-11ea-969a-001a7dda7113 + - 072d1806-af4c-11ea-8bd5-001a7dda7113 x-ms-date: - - Tue, 07 Apr 2020 23:24:20 GMT + - Mon, 15 Jun 2020 21:06:06 GMT x-ms-version: - '2019-07-07' method: HEAD - uri: https://storagename.blob.core.windows.net/filesystem362619b6//file362619b6 + uri: https://storagename.blob.core.windows.net/filesystem362619b6/file362619b6 response: body: string: '' headers: - ? !!python/object/new:multidict._multidict.istr - - Date - : Tue, 07 Apr 2020 23:24:19 GMT - ? !!python/object/new:multidict._multidict.istr - - Server - : Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 - ? !!python/object/new:multidict._multidict.istr - - Transfer-Encoding - : chunked + Date: Mon, 15 Jun 2020 21:06:05 GMT + Server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + Transfer-Encoding: chunked x-ms-error-code: BlobNotFound - x-ms-request-id: 6406358c-a01e-0006-0c33-0d7e2b000000 + x-ms-request-id: 085ba358-501e-004f-0b58-433cc0000000 x-ms-version: '2019-07-07' status: code: 404 message: The specified blob does not exist. - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - xiafuhns.blob.core.windows.net - - /filesystem362619b6//file362619b6 - - '' - - '' -- request: - body: null - headers: - User-Agent: - - azsdk-python-storage-dfs/12.0.1 Python/3.7.3 (Windows-10-10.0.18362-SP0) - x-ms-client-request-id: - - f01195f6-7926-11ea-8543-001a7dda7113 - x-ms-date: - - Tue, 07 Apr 2020 23:24:33 GMT - x-ms-properties: - - '' - x-ms-version: - - '2019-02-02' - method: PUT - uri: https://storagename.dfs.core.windows.net/filesystem362619b6/file362619b6?resource=file - response: - body: - string: '{"error":{"code":"FilesystemNotFound","message":"The specified filesystem - does not exist.\nRequestId:705c2a60-401f-0043-7433-0dabc8000000\nTime:2020-04-07T23:24:33.2717191Z"}}' - headers: - ? !!python/object/new:multidict._multidict.istr - - Content-Length - : '175' - ? !!python/object/new:multidict._multidict.istr - - Content-Type - : application/json;charset=utf-8 - ? !!python/object/new:multidict._multidict.istr - - Date - : Tue, 07 Apr 2020 23:24:33 GMT - ? !!python/object/new:multidict._multidict.istr - - Server - : Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 - x-ms-error-code: FilesystemNotFound - x-ms-request-id: 705c2a60-401f-0043-7433-0dabc8000000 - x-ms-version: '2019-02-02' - status: - code: 404 - message: The specified filesystem does not exist. - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - xiafuhns.dfs.core.windows.net - - /filesystem362619b6/file362619b6 - - resource=file - - '' + url: https://xiafuhns.blob.core.windows.net/filesystem362619b6/file362619b6 version: 1 diff --git a/sdk/storage/azure-storage-file-datalake/tests/recordings/test_file_async.test_get_access_control_with_if_modified_since_async.yaml b/sdk/storage/azure-storage-file-datalake/tests/recordings/test_file_async.test_get_access_control_with_if_modified_since_async.yaml index f3ea8df25143..03eb072969e2 100644 --- a/sdk/storage/azure-storage-file-datalake/tests/recordings/test_file_async.test_get_access_control_with_if_modified_since_async.yaml +++ b/sdk/storage/azure-storage-file-datalake/tests/recordings/test_file_async.test_get_access_control_with_if_modified_since_async.yaml @@ -3,11 +3,11 @@ interactions: body: null headers: User-Agent: - - azsdk-python-storage-dfs/12.0.1 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-dfs/12.0.2 Python/3.7.3 (Windows-10-10.0.18362-SP0) x-ms-client-request-id: - - e94f481e-7926-11ea-9833-001a7dda7113 + - 078b13e8-af4c-11ea-a5e2-001a7dda7113 x-ms-date: - - Tue, 07 Apr 2020 23:24:21 GMT + - Mon, 15 Jun 2020 21:06:06 GMT x-ms-properties: - '' x-ms-version: @@ -18,43 +18,26 @@ interactions: body: string: '' headers: - ? !!python/object/new:multidict._multidict.istr - - Content-Length - : '0' - ? !!python/object/new:multidict._multidict.istr - - Date - : Tue, 07 Apr 2020 23:24:21 GMT - ? !!python/object/new:multidict._multidict.istr - - Etag - : '"0x8D7DB4ACD96D2DE"' - ? !!python/object/new:multidict._multidict.istr - - Last-Modified - : Tue, 07 Apr 2020 23:24:21 GMT - ? !!python/object/new:multidict._multidict.istr - - Server - : Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-id: 27572bcb-501f-002d-0133-0dfee7000000 + Content-Length: '0' + Date: Mon, 15 Jun 2020 21:06:05 GMT + Etag: '"0x8D8116FEBCFC4B6"' + Last-Modified: Mon, 15 Jun 2020 21:06:06 GMT + Server: Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 + x-ms-request-id: d588511b-501f-004f-3858-433cc0000000 x-ms-version: '2019-02-02' status: code: 201 message: Created - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - xiafuhns.dfs.core.windows.net - - /filesystembf461bd2/filebf461bd2 - - resource=file - - '' + url: https://xiafuhns.dfs.core.windows.net/filesystembf461bd2/filebf461bd2?resource=file - request: body: null headers: User-Agent: - - azsdk-python-storage-dfs/12.0.1 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-dfs/12.0.2 Python/3.7.3 (Windows-10-10.0.18362-SP0) x-ms-client-request-id: - - e96db69c-7926-11ea-a4e4-001a7dda7113 + - 07aaf024-af4c-11ea-b0b7-001a7dda7113 x-ms-date: - - Tue, 07 Apr 2020 23:24:22 GMT + - Mon, 15 Jun 2020 21:06:06 GMT x-ms-permissions: - '0777' x-ms-version: @@ -65,104 +48,66 @@ interactions: body: string: '' headers: - ? !!python/object/new:multidict._multidict.istr - - Content-Length - : '0' - ? !!python/object/new:multidict._multidict.istr - - Date - : Tue, 07 Apr 2020 23:24:21 GMT - ? !!python/object/new:multidict._multidict.istr - - Etag - : '"0x8D7DB4ACD96D2DE"' - ? !!python/object/new:multidict._multidict.istr - - Last-Modified - : Tue, 07 Apr 2020 23:24:21 GMT - ? !!python/object/new:multidict._multidict.istr - - Server - : Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 + Content-Length: '0' + Date: Mon, 15 Jun 2020 21:06:05 GMT + Etag: '"0x8D8116FEBCFC4B6"' + Last-Modified: Mon, 15 Jun 2020 21:06:06 GMT + Server: Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 x-ms-namespace-enabled: 'true' - x-ms-request-id: 27572bcc-501f-002d-0233-0dfee7000000 + x-ms-request-id: d588511c-501f-004f-3958-433cc0000000 x-ms-version: '2019-02-02' status: code: 200 message: OK - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - xiafuhns.dfs.core.windows.net - - /filesystembf461bd2/filebf461bd2 - - action=setAccessControl - - '' + url: https://xiafuhns.dfs.core.windows.net/filesystembf461bd2/filebf461bd2?action=setAccessControl - request: body: null headers: User-Agent: - - azsdk-python-storage-dfs/12.0.1 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-dfs/12.0.2 Python/3.7.3 (Windows-10-10.0.18362-SP0) x-ms-client-request-id: - - e9757978-7926-11ea-8bd4-001a7dda7113 + - 07b31762-af4c-11ea-ad42-001a7dda7113 x-ms-date: - - Tue, 07 Apr 2020 23:24:22 GMT + - Mon, 15 Jun 2020 21:06:06 GMT x-ms-version: - '2019-07-07' method: HEAD - uri: https://storagename.blob.core.windows.net/filesystembf461bd2//filebf461bd2 + uri: https://storagename.blob.core.windows.net/filesystembf461bd2/filebf461bd2 response: body: string: '' headers: - ? !!python/object/new:multidict._multidict.istr - - Accept-Ranges - : bytes - ? !!python/object/new:multidict._multidict.istr - - Content-Length - : '0' - ? !!python/object/new:multidict._multidict.istr - - Content-Type - : application/octet-stream - ? !!python/object/new:multidict._multidict.istr - - Date - : Tue, 07 Apr 2020 23:24:21 GMT - ? !!python/object/new:multidict._multidict.istr - - Etag - : '"0x8D7DB4ACD96D2DE"' - ? !!python/object/new:multidict._multidict.istr - - Last-Modified - : Tue, 07 Apr 2020 23:24:21 GMT - ? !!python/object/new:multidict._multidict.istr - - Server - : Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + Accept-Ranges: bytes + Content-Length: '0' + Content-Type: application/octet-stream + Date: Mon, 15 Jun 2020 21:06:06 GMT + Etag: '"0x8D8116FEBCFC4B6"' + Last-Modified: Mon, 15 Jun 2020 21:06:06 GMT + Server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-access-tier: Hot x-ms-access-tier-inferred: 'true' x-ms-blob-type: BlockBlob - x-ms-creation-time: Tue, 07 Apr 2020 23:24:21 GMT + x-ms-creation-time: Mon, 15 Jun 2020 21:06:06 GMT x-ms-lease-state: available x-ms-lease-status: unlocked - x-ms-request-id: ea28736f-c01e-004d-6633-0d8278000000 + x-ms-request-id: 9b57cb1a-801e-002e-7c58-431f83000000 x-ms-server-encrypted: 'true' x-ms-version: '2019-07-07' status: code: 200 message: OK - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - xiafuhns.blob.core.windows.net - - /filesystembf461bd2//filebf461bd2 - - '' - - '' + url: https://xiafuhns.blob.core.windows.net/filesystembf461bd2/filebf461bd2 - request: body: null headers: If-Modified-Since: - - Tue, 07 Apr 2020 23:09:21 GMT + - Mon, 15 Jun 2020 20:51:06 GMT User-Agent: - - azsdk-python-storage-dfs/12.0.1 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-dfs/12.0.2 Python/3.7.3 (Windows-10-10.0.18362-SP0) x-ms-client-request-id: - - e986f9e6-7926-11ea-84bd-001a7dda7113 + - 07bd9470-af4c-11ea-a7d5-001a7dda7113 x-ms-date: - - Tue, 07 Apr 2020 23:24:22 GMT + - Mon, 15 Jun 2020 21:06:07 GMT x-ms-version: - '2019-02-02' method: HEAD @@ -171,79 +116,18 @@ interactions: body: string: '' headers: - ? !!python/object/new:multidict._multidict.istr - - Date - : Tue, 07 Apr 2020 23:24:21 GMT - ? !!python/object/new:multidict._multidict.istr - - Etag - : '"0x8D7DB4ACD96D2DE"' - ? !!python/object/new:multidict._multidict.istr - - Last-Modified - : Tue, 07 Apr 2020 23:24:21 GMT - ? !!python/object/new:multidict._multidict.istr - - Server - : Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 + Date: Mon, 15 Jun 2020 21:06:06 GMT + Etag: '"0x8D8116FEBCFC4B6"' + Last-Modified: Mon, 15 Jun 2020 21:06:06 GMT + Server: Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 x-ms-acl: user::rwx,group::rwx,other::rwx x-ms-group: $superuser x-ms-owner: $superuser x-ms-permissions: rwxrwxrwx - x-ms-request-id: 27572bcd-501f-002d-0333-0dfee7000000 + x-ms-request-id: d588511d-501f-004f-3a58-433cc0000000 x-ms-version: '2019-02-02' status: code: 200 message: OK - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - xiafuhns.dfs.core.windows.net - - /filesystembf461bd2/filebf461bd2 - - action=getAccessControl&upn=false - - '' -- request: - body: null - headers: - User-Agent: - - azsdk-python-storage-dfs/12.0.1 Python/3.7.3 (Windows-10-10.0.18362-SP0) - x-ms-client-request-id: - - f1bf9b6e-7926-11ea-bca8-001a7dda7113 - x-ms-date: - - Tue, 07 Apr 2020 23:24:35 GMT - x-ms-properties: - - '' - x-ms-version: - - '2019-02-02' - method: PUT - uri: https://storagename.dfs.core.windows.net/filesystembf461bd2/filebf461bd2?resource=file - response: - body: - string: '{"error":{"code":"FilesystemNotFound","message":"The specified filesystem - does not exist.\nRequestId:6dd78224-801f-0011-3833-0dd720000000\nTime:2020-04-07T23:24:36.0996012Z"}}' - headers: - ? !!python/object/new:multidict._multidict.istr - - Content-Length - : '175' - ? !!python/object/new:multidict._multidict.istr - - Content-Type - : application/json;charset=utf-8 - ? !!python/object/new:multidict._multidict.istr - - Date - : Tue, 07 Apr 2020 23:24:35 GMT - ? !!python/object/new:multidict._multidict.istr - - Server - : Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 - x-ms-error-code: FilesystemNotFound - x-ms-request-id: 6dd78224-801f-0011-3833-0dd720000000 - x-ms-version: '2019-02-02' - status: - code: 404 - message: The specified filesystem does not exist. - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - xiafuhns.dfs.core.windows.net - - /filesystembf461bd2/filebf461bd2 - - resource=file - - '' + url: https://xiafuhns.dfs.core.windows.net/filesystembf461bd2/filebf461bd2?action=getAccessControl&upn=false version: 1 diff --git a/sdk/storage/azure-storage-file-datalake/tests/recordings/test_file_async.test_read_file_async.yaml b/sdk/storage/azure-storage-file-datalake/tests/recordings/test_file_async.test_read_file_async.yaml index c724b5cb6797..342942746e6c 100644 --- a/sdk/storage/azure-storage-file-datalake/tests/recordings/test_file_async.test_read_file_async.yaml +++ b/sdk/storage/azure-storage-file-datalake/tests/recordings/test_file_async.test_read_file_async.yaml @@ -3,11 +3,11 @@ interactions: body: null headers: User-Agent: - - azsdk-python-storage-dfs/12.0.1 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-dfs/12.0.2 Python/3.7.3 (Windows-10-10.0.18362-SP0) x-ms-client-request-id: - - ea41d736-7926-11ea-b501-001a7dda7113 + - 0803339e-af4c-11ea-82cb-001a7dda7113 x-ms-date: - - Tue, 07 Apr 2020 23:24:23 GMT + - Mon, 15 Jun 2020 21:06:07 GMT x-ms-properties: - '' x-ms-version: @@ -18,34 +18,17 @@ interactions: body: string: '' headers: - ? !!python/object/new:multidict._multidict.istr - - Content-Length - : '0' - ? !!python/object/new:multidict._multidict.istr - - Date - : Tue, 07 Apr 2020 23:24:23 GMT - ? !!python/object/new:multidict._multidict.istr - - Etag - : '"0x8D7DB4ACE8C0065"' - ? !!python/object/new:multidict._multidict.istr - - Last-Modified - : Tue, 07 Apr 2020 23:24:23 GMT - ? !!python/object/new:multidict._multidict.istr - - Server - : Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-id: efb5b3c7-f01f-000b-1633-0db6ff000000 + Content-Length: '0' + Date: Mon, 15 Jun 2020 21:06:07 GMT + Etag: '"0x8D8116FEC466678"' + Last-Modified: Mon, 15 Jun 2020 21:06:07 GMT + Server: Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 + x-ms-request-id: f8cfc0b5-301f-0049-5158-430f7f000000 x-ms-version: '2019-02-02' status: code: 201 message: Created - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - xiafuhns.dfs.core.windows.net - - /filesystemf8c0ea2/filef8c0ea2 - - resource=file - - '' + url: https://xiafuhns.dfs.core.windows.net/filesystemf8c0ea2/filef8c0ea2?resource=file - request: body: !!binary | j4ZhpmjpM+ZHGx4uDfzlOYvXYWBgoAWYzh32Ep0+wG/BRukJpKnTo944qbT4V/wrGByljkEKOLAJ @@ -72,11 +55,11 @@ interactions: Content-Type: - application/json; charset=utf-8 User-Agent: - - azsdk-python-storage-dfs/12.0.1 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-dfs/12.0.2 Python/3.7.3 (Windows-10-10.0.18362-SP0) x-ms-client-request-id: - - ea632c8c-7926-11ea-802d-001a7dda7113 + - 0821b824-af4c-11ea-9480-001a7dda7113 x-ms-date: - - Tue, 07 Apr 2020 23:24:23 GMT + - Mon, 15 Jun 2020 21:06:07 GMT x-ms-version: - '2019-02-02' method: PATCH @@ -85,40 +68,27 @@ interactions: body: string: '' headers: - ? !!python/object/new:multidict._multidict.istr - - Content-Length - : '0' - ? !!python/object/new:multidict._multidict.istr - - Date - : Tue, 07 Apr 2020 23:24:23 GMT - ? !!python/object/new:multidict._multidict.istr - - Server - : Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-id: efb5b3c8-f01f-000b-1733-0db6ff000000 + Content-Length: '0' + Date: Mon, 15 Jun 2020 21:06:07 GMT + Server: Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 + x-ms-request-id: f8cfc0b6-301f-0049-5258-430f7f000000 x-ms-request-server-encrypted: 'true' x-ms-version: '2019-02-02' status: code: 202 message: Accepted - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - xiafuhns.dfs.core.windows.net - - /filesystemf8c0ea2/filef8c0ea2 - - position=0&action=append - - '' + url: https://xiafuhns.dfs.core.windows.net/filesystemf8c0ea2/filef8c0ea2?position=0&action=append - request: body: null headers: Content-Length: - '0' User-Agent: - - azsdk-python-storage-dfs/12.0.1 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-dfs/12.0.2 Python/3.7.3 (Windows-10-10.0.18362-SP0) x-ms-client-request-id: - - ea6a7a8c-7926-11ea-b85c-001a7dda7113 + - 0829de5a-af4c-11ea-9459-001a7dda7113 x-ms-date: - - Tue, 07 Apr 2020 23:24:23 GMT + - Mon, 15 Jun 2020 21:06:07 GMT x-ms-version: - '2019-02-02' method: PATCH @@ -127,52 +97,35 @@ interactions: body: string: '' headers: - ? !!python/object/new:multidict._multidict.istr - - Content-Length - : '0' - ? !!python/object/new:multidict._multidict.istr - - Date - : Tue, 07 Apr 2020 23:24:23 GMT - ? !!python/object/new:multidict._multidict.istr - - Etag - : '"0x8D7DB4ACE9B7EED"' - ? !!python/object/new:multidict._multidict.istr - - Last-Modified - : Tue, 07 Apr 2020 23:24:23 GMT - ? !!python/object/new:multidict._multidict.istr - - Server - : Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-id: efb5b3c9-f01f-000b-1833-0db6ff000000 - x-ms-request-server-encrypted: 'true' + Content-Length: '0' + Date: Mon, 15 Jun 2020 21:06:07 GMT + Etag: '"0x8D8116FEC586D2A"' + Last-Modified: Mon, 15 Jun 2020 21:06:07 GMT + Server: Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 + x-ms-request-id: f8cfc0b7-301f-0049-5358-430f7f000000 + x-ms-request-server-encrypted: 'false' x-ms-version: '2019-02-02' status: code: 200 message: OK - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - xiafuhns.dfs.core.windows.net - - /filesystemf8c0ea2/filef8c0ea2 - - position=1024&retainUncommittedData=false&close=false&action=flush - - '' + url: https://xiafuhns.dfs.core.windows.net/filesystemf8c0ea2/filef8c0ea2?position=1024&retainUncommittedData=false&close=false&action=flush - request: body: null headers: Accept: - application/xml User-Agent: - - azsdk-python-storage-dfs/12.0.1 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-dfs/12.0.2 Python/3.7.3 (Windows-10-10.0.18362-SP0) x-ms-client-request-id: - - ea728b52-7926-11ea-a981-001a7dda7113 + - 0833e10c-af4c-11ea-b4d3-001a7dda7113 x-ms-date: - - Tue, 07 Apr 2020 23:24:23 GMT + - Mon, 15 Jun 2020 21:06:07 GMT x-ms-range: - bytes=0-33554431 x-ms-version: - '2019-07-07' method: GET - uri: https://storagename.blob.core.windows.net/filesystemf8c0ea2//filef8c0ea2 + uri: https://storagename.blob.core.windows.net/filesystemf8c0ea2/filef8c0ea2 response: body: string: !!binary | @@ -195,92 +148,23 @@ interactions: STrqYVEkFjKxL7jRNMa7ABe/svJZ+MIQJogPAnW2XMOguh636YSLib4CpzF5IDHYixGA7wMCLClc G1GyZri9FFIb/D5wd+vzM8aT2bjdIaw5M8gFKSDnUPR0xVN3nOOsxZK2p8ayUxQY34xHTtfB3A== headers: - ? !!python/object/new:multidict._multidict.istr - - Accept-Ranges - : bytes - ? !!python/object/new:multidict._multidict.istr - - Content-Length - : '1024' - ? !!python/object/new:multidict._multidict.istr - - Content-Range - : bytes 0-1023/1024 - ? !!python/object/new:multidict._multidict.istr - - Content-Type - : application/octet-stream - ? !!python/object/new:multidict._multidict.istr - - Date - : Tue, 07 Apr 2020 23:24:22 GMT - ? !!python/object/new:multidict._multidict.istr - - Etag - : '"0x8D7DB4ACE9B7EED"' - ? !!python/object/new:multidict._multidict.istr - - Last-Modified - : Tue, 07 Apr 2020 23:24:23 GMT - ? !!python/object/new:multidict._multidict.istr - - Server - : Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + Accept-Ranges: bytes + Content-Length: '1024' + Content-Range: bytes 0-1023/1024 + Content-Type: application/octet-stream + Date: Mon, 15 Jun 2020 21:06:07 GMT + Etag: '"0x8D8116FEC586D2A"' + Last-Modified: Mon, 15 Jun 2020 21:06:07 GMT + Server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-blob-type: BlockBlob - x-ms-creation-time: Tue, 07 Apr 2020 23:24:23 GMT + x-ms-creation-time: Mon, 15 Jun 2020 21:06:07 GMT x-ms-lease-state: available x-ms-lease-status: unlocked - x-ms-request-id: 0f086881-e01e-0028-2233-0d2c3c000000 + x-ms-request-id: f6c1abd4-001e-000f-3b58-433bf8000000 x-ms-server-encrypted: 'true' x-ms-version: '2019-07-07' status: code: 206 message: Partial Content - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - xiafuhns.blob.core.windows.net - - /filesystemf8c0ea2//filef8c0ea2 - - '' - - '' -- request: - body: null - headers: - User-Agent: - - azsdk-python-storage-dfs/12.0.1 Python/3.7.3 (Windows-10-10.0.18362-SP0) - x-ms-client-request-id: - - f271757e-7926-11ea-9c27-001a7dda7113 - x-ms-date: - - Tue, 07 Apr 2020 23:24:37 GMT - x-ms-properties: - - '' - x-ms-version: - - '2019-02-02' - method: PUT - uri: https://storagename.dfs.core.windows.net/filesystemf8c0ea2/filef8c0ea2?resource=file - response: - body: - string: '{"error":{"code":"FilesystemNotFound","message":"The specified filesystem - does not exist.\nRequestId:9c98f347-201f-0037-0b33-0d9f38000000\nTime:2020-04-07T23:24:37.2709191Z"}}' - headers: - ? !!python/object/new:multidict._multidict.istr - - Content-Length - : '175' - ? !!python/object/new:multidict._multidict.istr - - Content-Type - : application/json;charset=utf-8 - ? !!python/object/new:multidict._multidict.istr - - Date - : Tue, 07 Apr 2020 23:24:36 GMT - ? !!python/object/new:multidict._multidict.istr - - Server - : Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 - x-ms-error-code: FilesystemNotFound - x-ms-request-id: 9c98f347-201f-0037-0b33-0d9f38000000 - x-ms-version: '2019-02-02' - status: - code: 404 - message: The specified filesystem does not exist. - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - xiafuhns.dfs.core.windows.net - - /filesystemf8c0ea2/filef8c0ea2 - - resource=file - - '' + url: https://xiafuhns.blob.core.windows.net/filesystemf8c0ea2/filef8c0ea2 version: 1 diff --git a/sdk/storage/azure-storage-file-datalake/tests/recordings/test_file_async.test_read_file_into_file_async.yaml b/sdk/storage/azure-storage-file-datalake/tests/recordings/test_file_async.test_read_file_into_file_async.yaml index d60d76b7b18e..80141a1febfe 100644 --- a/sdk/storage/azure-storage-file-datalake/tests/recordings/test_file_async.test_read_file_into_file_async.yaml +++ b/sdk/storage/azure-storage-file-datalake/tests/recordings/test_file_async.test_read_file_into_file_async.yaml @@ -3,11 +3,11 @@ interactions: body: null headers: User-Agent: - - azsdk-python-storage-dfs/12.0.1 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-dfs/12.0.2 Python/3.7.3 (Windows-10-10.0.18362-SP0) x-ms-client-request-id: - - eaaad9dc-7926-11ea-87e5-001a7dda7113 + - 087af952-af4c-11ea-ab5b-001a7dda7113 x-ms-date: - - Tue, 07 Apr 2020 23:24:24 GMT + - Mon, 15 Jun 2020 21:06:08 GMT x-ms-properties: - '' x-ms-version: @@ -18,34 +18,17 @@ interactions: body: string: '' headers: - ? !!python/object/new:multidict._multidict.istr - - Content-Length - : '0' - ? !!python/object/new:multidict._multidict.istr - - Date - : Tue, 07 Apr 2020 23:24:23 GMT - ? !!python/object/new:multidict._multidict.istr - - Etag - : '"0x8D7DB4ACEF27EDA"' - ? !!python/object/new:multidict._multidict.istr - - Last-Modified - : Tue, 07 Apr 2020 23:24:24 GMT - ? !!python/object/new:multidict._multidict.istr - - Server - : Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-id: ea8c1f71-e01f-0038-0d33-0de954000000 + Content-Length: '0' + Date: Mon, 15 Jun 2020 21:06:07 GMT + Etag: '"0x8D8116FECBEEAB6"' + Last-Modified: Mon, 15 Jun 2020 21:06:08 GMT + Server: Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 + x-ms-request-id: e6e92060-401f-0021-2c58-4369ef000000 x-ms-version: '2019-02-02' status: code: 201 message: Created - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - xiafuhns.dfs.core.windows.net - - /filesystemb81612ba/fileb81612ba - - resource=file - - '' + url: https://xiafuhns.dfs.core.windows.net/filesystemb81612ba/fileb81612ba?resource=file - request: body: !!binary | Ubgo9Kv1rbW5bmUXn6Nk9fpDCNC4/p1xqgsY0dBY0qWSDVOfZdxhueyMsc7z6w4vmu3q2dt/hzzy @@ -72,11 +55,11 @@ interactions: Content-Type: - application/json; charset=utf-8 User-Agent: - - azsdk-python-storage-dfs/12.0.1 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-dfs/12.0.2 Python/3.7.3 (Windows-10-10.0.18362-SP0) x-ms-client-request-id: - - eac999a2-7926-11ea-972f-001a7dda7113 + - 089a1536-af4c-11ea-bb9b-001a7dda7113 x-ms-date: - - Tue, 07 Apr 2020 23:24:24 GMT + - Mon, 15 Jun 2020 21:06:08 GMT x-ms-version: - '2019-02-02' method: PATCH @@ -85,40 +68,27 @@ interactions: body: string: '' headers: - ? !!python/object/new:multidict._multidict.istr - - Content-Length - : '0' - ? !!python/object/new:multidict._multidict.istr - - Date - : Tue, 07 Apr 2020 23:24:23 GMT - ? !!python/object/new:multidict._multidict.istr - - Server - : Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-id: ea8c1f72-e01f-0038-0e33-0de954000000 + Content-Length: '0' + Date: Mon, 15 Jun 2020 21:06:07 GMT + Server: Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 + x-ms-request-id: e6e92063-401f-0021-2e58-4369ef000000 x-ms-request-server-encrypted: 'true' x-ms-version: '2019-02-02' status: code: 202 message: Accepted - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - xiafuhns.dfs.core.windows.net - - /filesystemb81612ba/fileb81612ba - - position=0&action=append - - '' + url: https://xiafuhns.dfs.core.windows.net/filesystemb81612ba/fileb81612ba?position=0&action=append - request: body: null headers: Content-Length: - '0' User-Agent: - - azsdk-python-storage-dfs/12.0.1 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-dfs/12.0.2 Python/3.7.3 (Windows-10-10.0.18362-SP0) x-ms-client-request-id: - - ead25efa-7926-11ea-a794-001a7dda7113 + - 08a1de9a-af4c-11ea-98af-001a7dda7113 x-ms-date: - - Tue, 07 Apr 2020 23:24:24 GMT + - Mon, 15 Jun 2020 21:06:08 GMT x-ms-version: - '2019-02-02' method: PATCH @@ -127,52 +97,35 @@ interactions: body: string: '' headers: - ? !!python/object/new:multidict._multidict.istr - - Content-Length - : '0' - ? !!python/object/new:multidict._multidict.istr - - Date - : Tue, 07 Apr 2020 23:24:23 GMT - ? !!python/object/new:multidict._multidict.istr - - Etag - : '"0x8D7DB4ACF039CA2"' - ? !!python/object/new:multidict._multidict.istr - - Last-Modified - : Tue, 07 Apr 2020 23:24:24 GMT - ? !!python/object/new:multidict._multidict.istr - - Server - : Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-id: ea8c1f73-e01f-0038-0f33-0de954000000 - x-ms-request-server-encrypted: 'true' + Content-Length: '0' + Date: Mon, 15 Jun 2020 21:06:07 GMT + Etag: '"0x8D8116FECCFD3B6"' + Last-Modified: Mon, 15 Jun 2020 21:06:08 GMT + Server: Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 + x-ms-request-id: e6e92064-401f-0021-2f58-4369ef000000 + x-ms-request-server-encrypted: 'false' x-ms-version: '2019-02-02' status: code: 200 message: OK - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - xiafuhns.dfs.core.windows.net - - /filesystemb81612ba/fileb81612ba - - position=1024&retainUncommittedData=false&close=false&action=flush - - '' + url: https://xiafuhns.dfs.core.windows.net/filesystemb81612ba/fileb81612ba?position=1024&retainUncommittedData=false&close=false&action=flush - request: body: null headers: Accept: - application/xml User-Agent: - - azsdk-python-storage-dfs/12.0.1 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-dfs/12.0.2 Python/3.7.3 (Windows-10-10.0.18362-SP0) x-ms-client-request-id: - - eadab964-7926-11ea-916a-001a7dda7113 + - 08ab5b6c-af4c-11ea-9207-001a7dda7113 x-ms-date: - - Tue, 07 Apr 2020 23:24:24 GMT + - Mon, 15 Jun 2020 21:06:08 GMT x-ms-range: - bytes=0-33554431 x-ms-version: - '2019-07-07' method: GET - uri: https://storagename.blob.core.windows.net/filesystemb81612ba//fileb81612ba + uri: https://storagename.blob.core.windows.net/filesystemb81612ba/fileb81612ba response: body: string: !!binary | @@ -195,92 +148,23 @@ interactions: CvT6HU3GSpbJXssUlsjf8RMu/jlV79WD/mY/rm4Mm/xalWmE3IIk0yMSFKgHjO2YZ97ZSjCK6wXd XDKFduFqjgbSJb5eGUg0e0OwLqxZY+A/8bdkO0lTmVCeRqagNA4IbKc02zVGCJ/qbq7PsySAaQ== headers: - ? !!python/object/new:multidict._multidict.istr - - Accept-Ranges - : bytes - ? !!python/object/new:multidict._multidict.istr - - Content-Length - : '1024' - ? !!python/object/new:multidict._multidict.istr - - Content-Range - : bytes 0-1023/1024 - ? !!python/object/new:multidict._multidict.istr - - Content-Type - : application/octet-stream - ? !!python/object/new:multidict._multidict.istr - - Date - : Tue, 07 Apr 2020 23:24:23 GMT - ? !!python/object/new:multidict._multidict.istr - - Etag - : '"0x8D7DB4ACF039CA2"' - ? !!python/object/new:multidict._multidict.istr - - Last-Modified - : Tue, 07 Apr 2020 23:24:24 GMT - ? !!python/object/new:multidict._multidict.istr - - Server - : Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + Accept-Ranges: bytes + Content-Length: '1024' + Content-Range: bytes 0-1023/1024 + Content-Type: application/octet-stream + Date: Mon, 15 Jun 2020 21:06:07 GMT + Etag: '"0x8D8116FECCFD3B6"' + Last-Modified: Mon, 15 Jun 2020 21:06:08 GMT + Server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-blob-type: BlockBlob - x-ms-creation-time: Tue, 07 Apr 2020 23:24:24 GMT + x-ms-creation-time: Mon, 15 Jun 2020 21:06:08 GMT x-ms-lease-state: available x-ms-lease-status: unlocked - x-ms-request-id: d4246e79-701e-0067-3b33-0d5d68000000 + x-ms-request-id: 77b7a376-a01e-005b-1b58-4374af000000 x-ms-server-encrypted: 'true' x-ms-version: '2019-07-07' status: code: 206 message: Partial Content - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - xiafuhns.blob.core.windows.net - - /filesystemb81612ba//fileb81612ba - - '' - - '' -- request: - body: null - headers: - User-Agent: - - azsdk-python-storage-dfs/12.0.1 Python/3.7.3 (Windows-10-10.0.18362-SP0) - x-ms-client-request-id: - - f2cf230c-7926-11ea-82b6-001a7dda7113 - x-ms-date: - - Tue, 07 Apr 2020 23:24:37 GMT - x-ms-properties: - - '' - x-ms-version: - - '2019-02-02' - method: PUT - uri: https://storagename.dfs.core.windows.net/filesystemb81612ba/fileb81612ba?resource=file - response: - body: - string: '{"error":{"code":"FilesystemNotFound","message":"The specified filesystem - does not exist.\nRequestId:23c12d00-901f-0032-5a33-0d4de3000000\nTime:2020-04-07T23:24:37.8766505Z"}}' - headers: - ? !!python/object/new:multidict._multidict.istr - - Content-Length - : '175' - ? !!python/object/new:multidict._multidict.istr - - Content-Type - : application/json;charset=utf-8 - ? !!python/object/new:multidict._multidict.istr - - Date - : Tue, 07 Apr 2020 23:24:37 GMT - ? !!python/object/new:multidict._multidict.istr - - Server - : Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 - x-ms-error-code: FilesystemNotFound - x-ms-request-id: 23c12d00-901f-0032-5a33-0d4de3000000 - x-ms-version: '2019-02-02' - status: - code: 404 - message: The specified filesystem does not exist. - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - xiafuhns.dfs.core.windows.net - - /filesystemb81612ba/fileb81612ba - - resource=file - - '' + url: https://xiafuhns.blob.core.windows.net/filesystemb81612ba/fileb81612ba version: 1 diff --git a/sdk/storage/azure-storage-file-datalake/tests/recordings/test_file_async.test_read_file_to_text_async.yaml b/sdk/storage/azure-storage-file-datalake/tests/recordings/test_file_async.test_read_file_to_text_async.yaml index 2c90ba1b9e38..7ab13076dd8b 100644 --- a/sdk/storage/azure-storage-file-datalake/tests/recordings/test_file_async.test_read_file_to_text_async.yaml +++ b/sdk/storage/azure-storage-file-datalake/tests/recordings/test_file_async.test_read_file_to_text_async.yaml @@ -3,11 +3,11 @@ interactions: body: null headers: User-Agent: - - azsdk-python-storage-dfs/12.0.1 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-dfs/12.0.2 Python/3.7.3 (Windows-10-10.0.18362-SP0) x-ms-client-request-id: - - eb17a974-7926-11ea-8e1c-001a7dda7113 + - 08ed9bc0-af4c-11ea-83af-001a7dda7113 x-ms-date: - - Tue, 07 Apr 2020 23:24:24 GMT + - Mon, 15 Jun 2020 21:06:09 GMT x-ms-properties: - '' x-ms-version: @@ -18,34 +18,17 @@ interactions: body: string: '' headers: - ? !!python/object/new:multidict._multidict.istr - - Content-Length - : '0' - ? !!python/object/new:multidict._multidict.istr - - Date - : Tue, 07 Apr 2020 23:24:24 GMT - ? !!python/object/new:multidict._multidict.istr - - Etag - : '"0x8D7DB4ACF5FE341"' - ? !!python/object/new:multidict._multidict.istr - - Last-Modified - : Tue, 07 Apr 2020 23:24:24 GMT - ? !!python/object/new:multidict._multidict.istr - - Server - : Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-id: bf9e5e48-201f-0008-3433-0d579b000000 + Content-Length: '0' + Date: Mon, 15 Jun 2020 21:06:08 GMT + Etag: '"0x8D8116FED312FFF"' + Last-Modified: Mon, 15 Jun 2020 21:06:09 GMT + Server: Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 + x-ms-request-id: 6a0885ff-801f-005c-2758-4318cc000000 x-ms-version: '2019-02-02' status: code: 201 message: Created - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - xiafuhns.dfs.core.windows.net - - /filesystem94141208/file94141208 - - resource=file - - '' + url: https://xiafuhns.dfs.core.windows.net/filesystem94141208/file94141208?resource=file - request: body: ' hello hello world hello world world hello hello hello hello world hello python python world python world hello hello hello python python python world @@ -67,11 +50,11 @@ interactions: Content-Type: - application/json; charset=utf-8 User-Agent: - - azsdk-python-storage-dfs/12.0.1 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-dfs/12.0.2 Python/3.7.3 (Windows-10-10.0.18362-SP0) x-ms-client-request-id: - - eb378b82-7926-11ea-ab34-001a7dda7113 + - 090c69ca-af4c-11ea-96ea-001a7dda7113 x-ms-date: - - Tue, 07 Apr 2020 23:24:25 GMT + - Mon, 15 Jun 2020 21:06:09 GMT x-ms-version: - '2019-02-02' method: PATCH @@ -80,40 +63,27 @@ interactions: body: string: '' headers: - ? !!python/object/new:multidict._multidict.istr - - Content-Length - : '0' - ? !!python/object/new:multidict._multidict.istr - - Date - : Tue, 07 Apr 2020 23:24:24 GMT - ? !!python/object/new:multidict._multidict.istr - - Server - : Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-id: bf9e5e49-201f-0008-3533-0d579b000000 + Content-Length: '0' + Date: Mon, 15 Jun 2020 21:06:08 GMT + Server: Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 + x-ms-request-id: 6a088604-801f-005c-2c58-4318cc000000 x-ms-request-server-encrypted: 'true' x-ms-version: '2019-02-02' status: code: 202 message: Accepted - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - xiafuhns.dfs.core.windows.net - - /filesystem94141208/file94141208 - - position=0&action=append - - '' + url: https://xiafuhns.dfs.core.windows.net/filesystem94141208/file94141208?position=0&action=append - request: body: null headers: Content-Length: - '0' User-Agent: - - azsdk-python-storage-dfs/12.0.1 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-dfs/12.0.2 Python/3.7.3 (Windows-10-10.0.18362-SP0) x-ms-client-request-id: - - eb3fae5e-7926-11ea-844f-001a7dda7113 + - 09151f6e-af4c-11ea-b9e6-001a7dda7113 x-ms-date: - - Tue, 07 Apr 2020 23:24:25 GMT + - Mon, 15 Jun 2020 21:06:09 GMT x-ms-version: - '2019-02-02' method: PATCH @@ -122,52 +92,35 @@ interactions: body: string: '' headers: - ? !!python/object/new:multidict._multidict.istr - - Content-Length - : '0' - ? !!python/object/new:multidict._multidict.istr - - Date - : Tue, 07 Apr 2020 23:24:24 GMT - ? !!python/object/new:multidict._multidict.istr - - Etag - : '"0x8D7DB4ACF755D6A"' - ? !!python/object/new:multidict._multidict.istr - - Last-Modified - : Tue, 07 Apr 2020 23:24:25 GMT - ? !!python/object/new:multidict._multidict.istr - - Server - : Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-id: bf9e5e4b-201f-0008-3633-0d579b000000 - x-ms-request-server-encrypted: 'true' + Content-Length: '0' + Date: Mon, 15 Jun 2020 21:06:08 GMT + Etag: '"0x8D8116FED42F62B"' + Last-Modified: Mon, 15 Jun 2020 21:06:09 GMT + Server: Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 + x-ms-request-id: 6a088609-801f-005c-3158-4318cc000000 + x-ms-request-server-encrypted: 'false' x-ms-version: '2019-02-02' status: code: 200 message: OK - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - xiafuhns.dfs.core.windows.net - - /filesystem94141208/file94141208 - - position=1026&retainUncommittedData=false&close=false&action=flush - - '' + url: https://xiafuhns.dfs.core.windows.net/filesystem94141208/file94141208?position=1026&retainUncommittedData=false&close=false&action=flush - request: body: null headers: Accept: - application/xml User-Agent: - - azsdk-python-storage-dfs/12.0.1 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-dfs/12.0.2 Python/3.7.3 (Windows-10-10.0.18362-SP0) x-ms-client-request-id: - - eb4cd20c-7926-11ea-87c9-001a7dda7113 + - 091e5158-af4c-11ea-9626-001a7dda7113 x-ms-date: - - Tue, 07 Apr 2020 23:24:25 GMT + - Mon, 15 Jun 2020 21:06:09 GMT x-ms-range: - bytes=0-33554431 x-ms-version: - '2019-07-07' method: GET - uri: https://storagename.blob.core.windows.net/filesystem94141208//file94141208 + uri: https://storagename.blob.core.windows.net/filesystem94141208/file94141208 response: body: string: ' hello hello world hello world world hello hello hello hello world @@ -185,92 +138,23 @@ interactions: python hello hello hello hello python world python python python world hello hello hello python python hello world' headers: - ? !!python/object/new:multidict._multidict.istr - - Accept-Ranges - : bytes - ? !!python/object/new:multidict._multidict.istr - - Content-Length - : '1026' - ? !!python/object/new:multidict._multidict.istr - - Content-Range - : bytes 0-1025/1026 - ? !!python/object/new:multidict._multidict.istr - - Content-Type - : application/octet-stream - ? !!python/object/new:multidict._multidict.istr - - Date - : Tue, 07 Apr 2020 23:24:24 GMT - ? !!python/object/new:multidict._multidict.istr - - Etag - : '"0x8D7DB4ACF755D6A"' - ? !!python/object/new:multidict._multidict.istr - - Last-Modified - : Tue, 07 Apr 2020 23:24:25 GMT - ? !!python/object/new:multidict._multidict.istr - - Server - : Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + Accept-Ranges: bytes + Content-Length: '1026' + Content-Range: bytes 0-1025/1026 + Content-Type: application/octet-stream + Date: Mon, 15 Jun 2020 21:06:09 GMT + Etag: '"0x8D8116FED42F62B"' + Last-Modified: Mon, 15 Jun 2020 21:06:09 GMT + Server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-blob-type: BlockBlob - x-ms-creation-time: Tue, 07 Apr 2020 23:24:24 GMT + x-ms-creation-time: Mon, 15 Jun 2020 21:06:09 GMT x-ms-lease-state: available x-ms-lease-status: unlocked - x-ms-request-id: 10b829d5-a01e-0064-6d33-0dbc0c000000 + x-ms-request-id: 8892abb2-001e-006d-2258-43f9df000000 x-ms-server-encrypted: 'true' x-ms-version: '2019-07-07' status: code: 206 message: Partial Content - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - xiafuhns.blob.core.windows.net - - /filesystem94141208//file94141208 - - '' - - '' -- request: - body: null - headers: - User-Agent: - - azsdk-python-storage-dfs/12.0.1 Python/3.7.3 (Windows-10-10.0.18362-SP0) - x-ms-client-request-id: - - f32475e8-7926-11ea-80ef-001a7dda7113 - x-ms-date: - - Tue, 07 Apr 2020 23:24:38 GMT - x-ms-properties: - - '' - x-ms-version: - - '2019-02-02' - method: PUT - uri: https://storagename.dfs.core.windows.net/filesystem94141208/file94141208?resource=file - response: - body: - string: '{"error":{"code":"FilesystemNotFound","message":"The specified filesystem - does not exist.\nRequestId:efb5b3e1-f01f-000b-1b33-0db6ff000000\nTime:2020-04-07T23:24:38.4361300Z"}}' - headers: - ? !!python/object/new:multidict._multidict.istr - - Content-Length - : '175' - ? !!python/object/new:multidict._multidict.istr - - Content-Type - : application/json;charset=utf-8 - ? !!python/object/new:multidict._multidict.istr - - Date - : Tue, 07 Apr 2020 23:24:38 GMT - ? !!python/object/new:multidict._multidict.istr - - Server - : Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 - x-ms-error-code: FilesystemNotFound - x-ms-request-id: efb5b3e1-f01f-000b-1b33-0db6ff000000 - x-ms-version: '2019-02-02' - status: - code: 404 - message: The specified filesystem does not exist. - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - xiafuhns.dfs.core.windows.net - - /filesystem94141208/file94141208 - - resource=file - - '' + url: https://xiafuhns.blob.core.windows.net/filesystem94141208/file94141208 version: 1 diff --git a/sdk/storage/azure-storage-file-datalake/tests/recordings/test_file_async.test_rename_file_to_existing_file_async.yaml b/sdk/storage/azure-storage-file-datalake/tests/recordings/test_file_async.test_rename_file_to_existing_file_async.yaml index 2fc5f4e9a41e..1bcd4dc81ca2 100644 --- a/sdk/storage/azure-storage-file-datalake/tests/recordings/test_file_async.test_rename_file_to_existing_file_async.yaml +++ b/sdk/storage/azure-storage-file-datalake/tests/recordings/test_file_async.test_rename_file_to_existing_file_async.yaml @@ -3,11 +3,11 @@ interactions: body: null headers: User-Agent: - - azsdk-python-storage-dfs/12.0.1 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-dfs/12.0.2 Python/3.7.3 (Windows-10-10.0.18362-SP0) x-ms-client-request-id: - - eb8b2bca-7926-11ea-af3a-001a7dda7113 + - 097514a8-af4c-11ea-98c9-001a7dda7113 x-ms-date: - - Tue, 07 Apr 2020 23:24:25 GMT + - Mon, 15 Jun 2020 21:06:09 GMT x-ms-properties: - '' x-ms-version: @@ -18,34 +18,17 @@ interactions: body: string: '' headers: - ? !!python/object/new:multidict._multidict.istr - - Content-Length - : '0' - ? !!python/object/new:multidict._multidict.istr - - Date - : Tue, 07 Apr 2020 23:24:24 GMT - ? !!python/object/new:multidict._multidict.istr - - Etag - : '"0x8D7DB4ACFD24551"' - ? !!python/object/new:multidict._multidict.istr - - Last-Modified - : Tue, 07 Apr 2020 23:24:25 GMT - ? !!python/object/new:multidict._multidict.istr - - Server - : Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-id: fb51a59a-001f-0042-3133-0df414000000 + Content-Length: '0' + Date: Mon, 15 Jun 2020 21:06:09 GMT + Etag: '"0x8D8116FEDBA1448"' + Last-Modified: Mon, 15 Jun 2020 21:06:10 GMT + Server: Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 + x-ms-request-id: 3f632db7-901f-0022-5158-43888b000000 x-ms-version: '2019-02-02' status: code: 201 message: Created - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - xiafuhns.dfs.core.windows.net - - /filesystem75cf1689/existingfile - - resource=file - - '' + url: https://xiafuhns.dfs.core.windows.net/filesystem75cf1689/existingfile?resource=file - request: body: a headers: @@ -54,11 +37,11 @@ interactions: Content-Type: - application/json; charset=utf-8 User-Agent: - - azsdk-python-storage-dfs/12.0.1 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-dfs/12.0.2 Python/3.7.3 (Windows-10-10.0.18362-SP0) x-ms-client-request-id: - - ebbd1b62-7926-11ea-b3f8-001a7dda7113 + - 0994e636-af4c-11ea-ad4d-001a7dda7113 x-ms-date: - - Tue, 07 Apr 2020 23:24:25 GMT + - Mon, 15 Jun 2020 21:06:10 GMT x-ms-version: - '2019-02-02' method: PATCH @@ -67,40 +50,27 @@ interactions: body: string: '' headers: - ? !!python/object/new:multidict._multidict.istr - - Content-Length - : '0' - ? !!python/object/new:multidict._multidict.istr - - Date - : Tue, 07 Apr 2020 23:24:25 GMT - ? !!python/object/new:multidict._multidict.istr - - Server - : Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-id: fb51a59b-001f-0042-3233-0df414000000 + Content-Length: '0' + Date: Mon, 15 Jun 2020 21:06:09 GMT + Server: Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 + x-ms-request-id: 3f632db8-901f-0022-5258-43888b000000 x-ms-request-server-encrypted: 'true' x-ms-version: '2019-02-02' status: code: 202 message: Accepted - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - xiafuhns.dfs.core.windows.net - - /filesystem75cf1689/existingfile - - position=0&action=append - - '' + url: https://xiafuhns.dfs.core.windows.net/filesystem75cf1689/existingfile?position=0&action=append - request: body: null headers: Content-Length: - '0' User-Agent: - - azsdk-python-storage-dfs/12.0.1 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-dfs/12.0.2 Python/3.7.3 (Windows-10-10.0.18362-SP0) x-ms-client-request-id: - - ebc4c5de-7926-11ea-be92-001a7dda7113 + - 099c3430-af4c-11ea-bf22-001a7dda7113 x-ms-date: - - Tue, 07 Apr 2020 23:24:25 GMT + - Mon, 15 Jun 2020 21:06:10 GMT x-ms-version: - '2019-02-02' method: PATCH @@ -109,44 +79,27 @@ interactions: body: string: '' headers: - ? !!python/object/new:multidict._multidict.istr - - Content-Length - : '0' - ? !!python/object/new:multidict._multidict.istr - - Date - : Tue, 07 Apr 2020 23:24:25 GMT - ? !!python/object/new:multidict._multidict.istr - - Etag - : '"0x8D7DB4ACFF6B8D8"' - ? !!python/object/new:multidict._multidict.istr - - Last-Modified - : Tue, 07 Apr 2020 23:24:25 GMT - ? !!python/object/new:multidict._multidict.istr - - Server - : Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-id: fb51a59c-001f-0042-3333-0df414000000 - x-ms-request-server-encrypted: 'true' + Content-Length: '0' + Date: Mon, 15 Jun 2020 21:06:09 GMT + Etag: '"0x8D8116FEDC98ADD"' + Last-Modified: Mon, 15 Jun 2020 21:06:10 GMT + Server: Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 + x-ms-request-id: 3f632db9-901f-0022-5358-43888b000000 + x-ms-request-server-encrypted: 'false' x-ms-version: '2019-02-02' status: code: 200 message: OK - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - xiafuhns.dfs.core.windows.net - - /filesystem75cf1689/existingfile - - position=1&retainUncommittedData=false&close=false&action=flush - - '' + url: https://xiafuhns.dfs.core.windows.net/filesystem75cf1689/existingfile?position=1&retainUncommittedData=false&close=false&action=flush - request: body: null headers: User-Agent: - - azsdk-python-storage-dfs/12.0.1 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-dfs/12.0.2 Python/3.7.3 (Windows-10-10.0.18362-SP0) x-ms-client-request-id: - - ebce1034-7926-11ea-957c-001a7dda7113 + - 09a4bb2e-af4c-11ea-ac6b-001a7dda7113 x-ms-date: - - Tue, 07 Apr 2020 23:24:26 GMT + - Mon, 15 Jun 2020 21:06:10 GMT x-ms-properties: - '' x-ms-version: @@ -157,34 +110,17 @@ interactions: body: string: '' headers: - ? !!python/object/new:multidict._multidict.istr - - Content-Length - : '0' - ? !!python/object/new:multidict._multidict.istr - - Date - : Tue, 07 Apr 2020 23:24:25 GMT - ? !!python/object/new:multidict._multidict.istr - - Etag - : '"0x8D7DB4ACFFF2ED7"' - ? !!python/object/new:multidict._multidict.istr - - Last-Modified - : Tue, 07 Apr 2020 23:24:25 GMT - ? !!python/object/new:multidict._multidict.istr - - Server - : Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-id: fb51a59d-001f-0042-3433-0df414000000 + Content-Length: '0' + Date: Mon, 15 Jun 2020 21:06:09 GMT + Etag: '"0x8D8116FEDD1F778"' + Last-Modified: Mon, 15 Jun 2020 21:06:10 GMT + Server: Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 + x-ms-request-id: 3f632dba-901f-0022-5458-43888b000000 x-ms-version: '2019-02-02' status: code: 201 message: Created - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - xiafuhns.dfs.core.windows.net - - /filesystem75cf1689/file75cf1689 - - resource=file - - '' + url: https://xiafuhns.dfs.core.windows.net/filesystem75cf1689/file75cf1689?resource=file - request: body: abc headers: @@ -193,11 +129,11 @@ interactions: Content-Type: - application/json; charset=utf-8 User-Agent: - - azsdk-python-storage-dfs/12.0.1 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-dfs/12.0.2 Python/3.7.3 (Windows-10-10.0.18362-SP0) x-ms-client-request-id: - - ebd639e8-7926-11ea-b94f-001a7dda7113 + - 09accab6-af4c-11ea-80a6-001a7dda7113 x-ms-date: - - Tue, 07 Apr 2020 23:24:26 GMT + - Mon, 15 Jun 2020 21:06:10 GMT x-ms-version: - '2019-02-02' method: PATCH @@ -206,40 +142,27 @@ interactions: body: string: '' headers: - ? !!python/object/new:multidict._multidict.istr - - Content-Length - : '0' - ? !!python/object/new:multidict._multidict.istr - - Date - : Tue, 07 Apr 2020 23:24:25 GMT - ? !!python/object/new:multidict._multidict.istr - - Server - : Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-id: fb51a59e-001f-0042-3533-0df414000000 + Content-Length: '0' + Date: Mon, 15 Jun 2020 21:06:09 GMT + Server: Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 + x-ms-request-id: 3f632dbb-901f-0022-5558-43888b000000 x-ms-request-server-encrypted: 'true' x-ms-version: '2019-02-02' status: code: 202 message: Accepted - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - xiafuhns.dfs.core.windows.net - - /filesystem75cf1689/file75cf1689 - - position=0&action=append - - '' + url: https://xiafuhns.dfs.core.windows.net/filesystem75cf1689/file75cf1689?position=0&action=append - request: body: null headers: Content-Length: - '0' User-Agent: - - azsdk-python-storage-dfs/12.0.1 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-dfs/12.0.2 Python/3.7.3 (Windows-10-10.0.18362-SP0) x-ms-client-request-id: - - ebddc7fa-7926-11ea-aea3-001a7dda7113 + - 09b419de-af4c-11ea-a051-001a7dda7113 x-ms-date: - - Tue, 07 Apr 2020 23:24:26 GMT + - Mon, 15 Jun 2020 21:06:10 GMT x-ms-version: - '2019-02-02' method: PATCH @@ -248,46 +171,27 @@ interactions: body: string: '' headers: - ? !!python/object/new:multidict._multidict.istr - - Content-Length - : '0' - ? !!python/object/new:multidict._multidict.istr - - Date - : Tue, 07 Apr 2020 23:24:25 GMT - ? !!python/object/new:multidict._multidict.istr - - Etag - : '"0x8D7DB4AD00FB7E0"' - ? !!python/object/new:multidict._multidict.istr - - Last-Modified - : Tue, 07 Apr 2020 23:24:26 GMT - ? !!python/object/new:multidict._multidict.istr - - Server - : Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-id: fb51a59f-001f-0042-3633-0df414000000 - x-ms-request-server-encrypted: 'true' + Content-Length: '0' + Date: Mon, 15 Jun 2020 21:06:09 GMT + Etag: '"0x8D8116FEDE1BCD3"' + Last-Modified: Mon, 15 Jun 2020 21:06:10 GMT + Server: Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 + x-ms-request-id: 3f632dbd-901f-0022-5658-43888b000000 + x-ms-request-server-encrypted: 'false' x-ms-version: '2019-02-02' status: code: 200 message: OK - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - xiafuhns.dfs.core.windows.net - - /filesystem75cf1689/file75cf1689 - - position=3&retainUncommittedData=false&close=false&action=flush - - '' + url: https://xiafuhns.dfs.core.windows.net/filesystem75cf1689/file75cf1689?position=3&retainUncommittedData=false&close=false&action=flush - request: body: null headers: User-Agent: - - azsdk-python-storage-dfs/12.0.1 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-dfs/12.0.2 Python/3.7.3 (Windows-10-10.0.18362-SP0) x-ms-client-request-id: - - ebe76768-7926-11ea-8bec-001a7dda7113 + - 09bc9e5c-af4c-11ea-a7b4-001a7dda7113 x-ms-date: - - Tue, 07 Apr 2020 23:24:26 GMT - x-ms-properties: - - '' + - Mon, 15 Jun 2020 21:06:10 GMT x-ms-rename-source: - /filesystem75cf1689/file75cf1689 x-ms-source-lease-id: @@ -300,135 +204,53 @@ interactions: body: string: '' headers: - ? !!python/object/new:multidict._multidict.istr - - Content-Length - : '0' - ? !!python/object/new:multidict._multidict.istr - - Date - : Tue, 07 Apr 2020 23:24:25 GMT - ? !!python/object/new:multidict._multidict.istr - - Server - : Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-id: fb51a5a0-001f-0042-3733-0df414000000 + Content-Length: '0' + Date: Mon, 15 Jun 2020 21:06:09 GMT + Server: Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 + x-ms-request-id: 3f632dbe-901f-0022-5758-43888b000000 x-ms-version: '2019-02-02' status: code: 201 message: Created - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - xiafuhns.dfs.core.windows.net - - /filesystem75cf1689/existingfile - - mode=legacy - - '' + url: https://xiafuhns.dfs.core.windows.net/filesystem75cf1689/existingfile?mode=legacy - request: body: null headers: Accept: - application/xml User-Agent: - - azsdk-python-storage-dfs/12.0.1 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-dfs/12.0.2 Python/3.7.3 (Windows-10-10.0.18362-SP0) x-ms-client-request-id: - - ebf2151a-7926-11ea-ac3d-001a7dda7113 + - 09c794ae-af4c-11ea-b5d5-001a7dda7113 x-ms-date: - - Tue, 07 Apr 2020 23:24:26 GMT + - Mon, 15 Jun 2020 21:06:10 GMT x-ms-range: - bytes=0-33554431 x-ms-version: - '2019-07-07' method: GET - uri: https://storagename.blob.core.windows.net/filesystem75cf1689//existingfile + uri: https://storagename.blob.core.windows.net/filesystem75cf1689/existingfile response: body: string: abc headers: - ? !!python/object/new:multidict._multidict.istr - - Accept-Ranges - : bytes - ? !!python/object/new:multidict._multidict.istr - - Content-Length - : '3' - ? !!python/object/new:multidict._multidict.istr - - Content-Range - : bytes 0-2/3 - ? !!python/object/new:multidict._multidict.istr - - Content-Type - : application/octet-stream - ? !!python/object/new:multidict._multidict.istr - - Date - : Tue, 07 Apr 2020 23:24:25 GMT - ? !!python/object/new:multidict._multidict.istr - - Etag - : '"0x8D7DB4AD00FB7E0"' - ? !!python/object/new:multidict._multidict.istr - - Last-Modified - : Tue, 07 Apr 2020 23:24:26 GMT - ? !!python/object/new:multidict._multidict.istr - - Server - : Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + Accept-Ranges: bytes + Content-Length: '3' + Content-Range: bytes 0-2/3 + Content-Type: application/octet-stream + Date: Mon, 15 Jun 2020 21:06:10 GMT + Etag: '"0x8D8116FEDE1BCD3"' + Last-Modified: Mon, 15 Jun 2020 21:06:10 GMT + Server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-blob-type: BlockBlob - x-ms-creation-time: Tue, 07 Apr 2020 23:24:25 GMT + x-ms-creation-time: Mon, 15 Jun 2020 21:06:10 GMT x-ms-lease-state: available x-ms-lease-status: unlocked - x-ms-request-id: 0323b1a2-101e-0003-1833-0dacf0000000 + x-ms-request-id: c9ed65aa-301e-0059-0d58-43ca17000000 x-ms-server-encrypted: 'true' x-ms-version: '2019-07-07' status: code: 206 message: Partial Content - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - xiafuhns.blob.core.windows.net - - /filesystem75cf1689//existingfile - - '' - - '' -- request: - body: null - headers: - User-Agent: - - azsdk-python-storage-dfs/12.0.1 Python/3.7.3 (Windows-10-10.0.18362-SP0) - x-ms-client-request-id: - - f3aa4fc6-7926-11ea-bf3e-001a7dda7113 - x-ms-date: - - Tue, 07 Apr 2020 23:24:39 GMT - x-ms-properties: - - '' - x-ms-version: - - '2019-02-02' - method: PUT - uri: https://storagename.dfs.core.windows.net/filesystem75cf1689/existingfile?resource=file - response: - body: - string: '{"error":{"code":"FilesystemNotFound","message":"The specified filesystem - does not exist.\nRequestId:653faef4-701f-0048-8033-0d50a3000000\nTime:2020-04-07T23:24:39.3133220Z"}}' - headers: - ? !!python/object/new:multidict._multidict.istr - - Content-Length - : '175' - ? !!python/object/new:multidict._multidict.istr - - Content-Type - : application/json;charset=utf-8 - ? !!python/object/new:multidict._multidict.istr - - Date - : Tue, 07 Apr 2020 23:24:38 GMT - ? !!python/object/new:multidict._multidict.istr - - Server - : Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 - x-ms-error-code: FilesystemNotFound - x-ms-request-id: 653faef4-701f-0048-8033-0d50a3000000 - x-ms-version: '2019-02-02' - status: - code: 404 - message: The specified filesystem does not exist. - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - xiafuhns.dfs.core.windows.net - - /filesystem75cf1689/existingfile - - resource=file - - '' + url: https://xiafuhns.blob.core.windows.net/filesystem75cf1689/existingfile version: 1 diff --git a/sdk/storage/azure-storage-file-datalake/tests/recordings/test_file_async.test_rename_file_with_non_used_name_async.yaml b/sdk/storage/azure-storage-file-datalake/tests/recordings/test_file_async.test_rename_file_with_non_used_name_async.yaml index f6a131ea6805..1db2cd80454d 100644 --- a/sdk/storage/azure-storage-file-datalake/tests/recordings/test_file_async.test_rename_file_with_non_used_name_async.yaml +++ b/sdk/storage/azure-storage-file-datalake/tests/recordings/test_file_async.test_rename_file_with_non_used_name_async.yaml @@ -3,11 +3,11 @@ interactions: body: null headers: User-Agent: - - azsdk-python-storage-dfs/12.0.1 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-dfs/12.0.2 Python/3.7.3 (Windows-10-10.0.18362-SP0) x-ms-client-request-id: - - ec36847e-7926-11ea-8f87-001a7dda7113 + - 09ffe462-af4c-11ea-9268-001a7dda7113 x-ms-date: - - Tue, 07 Apr 2020 23:24:26 GMT + - Mon, 15 Jun 2020 21:06:10 GMT x-ms-properties: - '' x-ms-version: @@ -18,34 +18,17 @@ interactions: body: string: '' headers: - ? !!python/object/new:multidict._multidict.istr - - Content-Length - : '0' - ? !!python/object/new:multidict._multidict.istr - - Date - : Tue, 07 Apr 2020 23:24:26 GMT - ? !!python/object/new:multidict._multidict.istr - - Etag - : '"0x8D7DB4AD07EC859"' - ? !!python/object/new:multidict._multidict.istr - - Last-Modified - : Tue, 07 Apr 2020 23:24:26 GMT - ? !!python/object/new:multidict._multidict.istr - - Server - : Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-id: 59ade436-a01f-005b-0933-0d74af000000 + Content-Length: '0' + Date: Mon, 15 Jun 2020 21:06:10 GMT + Etag: '"0x8D8116FEE438371"' + Last-Modified: Mon, 15 Jun 2020 21:06:10 GMT + Server: Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 + x-ms-request-id: 265bf458-901f-000d-4958-438540000000 x-ms-version: '2019-02-02' status: code: 201 message: Created - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - xiafuhns.dfs.core.windows.net - - /filesystema3c31753/filea3c31753 - - resource=file - - '' + url: https://xiafuhns.dfs.core.windows.net/filesystema3c31753/filea3c31753?resource=file - request: body: abc headers: @@ -54,11 +37,11 @@ interactions: Content-Type: - application/json; charset=utf-8 User-Agent: - - azsdk-python-storage-dfs/12.0.1 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-dfs/12.0.2 Python/3.7.3 (Windows-10-10.0.18362-SP0) x-ms-client-request-id: - - ec5622d4-7926-11ea-b481-001a7dda7113 + - 0a1e53fe-af4c-11ea-9528-001a7dda7113 x-ms-date: - - Tue, 07 Apr 2020 23:24:26 GMT + - Mon, 15 Jun 2020 21:06:11 GMT x-ms-version: - '2019-02-02' method: PATCH @@ -67,40 +50,27 @@ interactions: body: string: '' headers: - ? !!python/object/new:multidict._multidict.istr - - Content-Length - : '0' - ? !!python/object/new:multidict._multidict.istr - - Date - : Tue, 07 Apr 2020 23:24:26 GMT - ? !!python/object/new:multidict._multidict.istr - - Server - : Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-id: 59ade437-a01f-005b-0a33-0d74af000000 + Content-Length: '0' + Date: Mon, 15 Jun 2020 21:06:10 GMT + Server: Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 + x-ms-request-id: 265bf459-901f-000d-4a58-438540000000 x-ms-request-server-encrypted: 'true' x-ms-version: '2019-02-02' status: code: 202 message: Accepted - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - xiafuhns.dfs.core.windows.net - - /filesystema3c31753/filea3c31753 - - position=0&action=append - - '' + url: https://xiafuhns.dfs.core.windows.net/filesystema3c31753/filea3c31753?position=0&action=append - request: body: null headers: Content-Length: - '0' User-Agent: - - azsdk-python-storage-dfs/12.0.1 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-dfs/12.0.2 Python/3.7.3 (Windows-10-10.0.18362-SP0) x-ms-client-request-id: - - ec5e29c2-7926-11ea-a297-001a7dda7113 + - 0a25a1fe-af4c-11ea-9711-001a7dda7113 x-ms-date: - - Tue, 07 Apr 2020 23:24:26 GMT + - Mon, 15 Jun 2020 21:06:11 GMT x-ms-version: - '2019-02-02' method: PATCH @@ -109,46 +79,27 @@ interactions: body: string: '' headers: - ? !!python/object/new:multidict._multidict.istr - - Content-Length - : '0' - ? !!python/object/new:multidict._multidict.istr - - Date - : Tue, 07 Apr 2020 23:24:26 GMT - ? !!python/object/new:multidict._multidict.istr - - Etag - : '"0x8D7DB4AD090A1B7"' - ? !!python/object/new:multidict._multidict.istr - - Last-Modified - : Tue, 07 Apr 2020 23:24:26 GMT - ? !!python/object/new:multidict._multidict.istr - - Server - : Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-id: 59ade438-a01f-005b-0b33-0d74af000000 - x-ms-request-server-encrypted: 'true' + Content-Length: '0' + Date: Mon, 15 Jun 2020 21:06:10 GMT + Etag: '"0x8D8116FEE5360BF"' + Last-Modified: Mon, 15 Jun 2020 21:06:11 GMT + Server: Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 + x-ms-request-id: 265bf45a-901f-000d-4b58-438540000000 + x-ms-request-server-encrypted: 'false' x-ms-version: '2019-02-02' status: code: 200 message: OK - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - xiafuhns.dfs.core.windows.net - - /filesystema3c31753/filea3c31753 - - position=3&retainUncommittedData=false&close=false&action=flush - - '' + url: https://xiafuhns.dfs.core.windows.net/filesystema3c31753/filea3c31753?position=3&retainUncommittedData=false&close=false&action=flush - request: body: null headers: User-Agent: - - azsdk-python-storage-dfs/12.0.1 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-dfs/12.0.2 Python/3.7.3 (Windows-10-10.0.18362-SP0) x-ms-client-request-id: - - ec67f27e-7926-11ea-957f-001a7dda7113 + - 0a2e4eb4-af4c-11ea-99fa-001a7dda7113 x-ms-date: - - Tue, 07 Apr 2020 23:24:27 GMT - x-ms-properties: - - '' + - Mon, 15 Jun 2020 21:06:11 GMT x-ms-rename-source: - /filesystema3c31753/filea3c31753 x-ms-source-lease-id: @@ -161,135 +112,53 @@ interactions: body: string: '' headers: - ? !!python/object/new:multidict._multidict.istr - - Content-Length - : '0' - ? !!python/object/new:multidict._multidict.istr - - Date - : Tue, 07 Apr 2020 23:24:26 GMT - ? !!python/object/new:multidict._multidict.istr - - Server - : Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-id: 59ade439-a01f-005b-0c33-0d74af000000 + Content-Length: '0' + Date: Mon, 15 Jun 2020 21:06:10 GMT + Server: Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 + x-ms-request-id: 265bf45b-901f-000d-4c58-438540000000 x-ms-version: '2019-02-02' status: code: 201 message: Created - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - xiafuhns.dfs.core.windows.net - - /filesystema3c31753/newname - - mode=legacy - - '' + url: https://xiafuhns.dfs.core.windows.net/filesystema3c31753/newname?mode=legacy - request: body: null headers: Accept: - application/xml User-Agent: - - azsdk-python-storage-dfs/12.0.1 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-dfs/12.0.2 Python/3.7.3 (Windows-10-10.0.18362-SP0) x-ms-client-request-id: - - ec731c36-7926-11ea-94ed-001a7dda7113 + - 0a3969ec-af4c-11ea-9e38-001a7dda7113 x-ms-date: - - Tue, 07 Apr 2020 23:24:27 GMT + - Mon, 15 Jun 2020 21:06:11 GMT x-ms-range: - bytes=0-33554431 x-ms-version: - '2019-07-07' method: GET - uri: https://storagename.blob.core.windows.net/filesystema3c31753//newname + uri: https://storagename.blob.core.windows.net/filesystema3c31753/newname response: body: string: abc headers: - ? !!python/object/new:multidict._multidict.istr - - Accept-Ranges - : bytes - ? !!python/object/new:multidict._multidict.istr - - Content-Length - : '3' - ? !!python/object/new:multidict._multidict.istr - - Content-Range - : bytes 0-2/3 - ? !!python/object/new:multidict._multidict.istr - - Content-Type - : application/octet-stream - ? !!python/object/new:multidict._multidict.istr - - Date - : Tue, 07 Apr 2020 23:24:26 GMT - ? !!python/object/new:multidict._multidict.istr - - Etag - : '"0x8D7DB4AD090A1B7"' - ? !!python/object/new:multidict._multidict.istr - - Last-Modified - : Tue, 07 Apr 2020 23:24:26 GMT - ? !!python/object/new:multidict._multidict.istr - - Server - : Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + Accept-Ranges: bytes + Content-Length: '3' + Content-Range: bytes 0-2/3 + Content-Type: application/octet-stream + Date: Mon, 15 Jun 2020 21:06:10 GMT + Etag: '"0x8D8116FEE5360BF"' + Last-Modified: Mon, 15 Jun 2020 21:06:11 GMT + Server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-blob-type: BlockBlob - x-ms-creation-time: Tue, 07 Apr 2020 23:24:26 GMT + x-ms-creation-time: Mon, 15 Jun 2020 21:06:10 GMT x-ms-lease-state: available x-ms-lease-status: unlocked - x-ms-request-id: 981b0d6b-301e-002b-7233-0dcd58000000 + x-ms-request-id: eb939905-901e-0032-3758-434de3000000 x-ms-server-encrypted: 'true' x-ms-version: '2019-07-07' status: code: 206 message: Partial Content - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - xiafuhns.blob.core.windows.net - - /filesystema3c31753//newname - - '' - - '' -- request: - body: null - headers: - User-Agent: - - azsdk-python-storage-dfs/12.0.1 Python/3.7.3 (Windows-10-10.0.18362-SP0) - x-ms-client-request-id: - - f450b848-7926-11ea-b86d-001a7dda7113 - x-ms-date: - - Tue, 07 Apr 2020 23:24:40 GMT - x-ms-properties: - - '' - x-ms-version: - - '2019-02-02' - method: PUT - uri: https://storagename.dfs.core.windows.net/filesystema3c31753/filea3c31753?resource=file - response: - body: - string: '{"error":{"code":"FilesystemNotFound","message":"The specified filesystem - does not exist.\nRequestId:705c2a66-401f-0043-7733-0dabc8000000\nTime:2020-04-07T23:24:40.3957999Z"}}' - headers: - ? !!python/object/new:multidict._multidict.istr - - Content-Length - : '175' - ? !!python/object/new:multidict._multidict.istr - - Content-Type - : application/json;charset=utf-8 - ? !!python/object/new:multidict._multidict.istr - - Date - : Tue, 07 Apr 2020 23:24:40 GMT - ? !!python/object/new:multidict._multidict.istr - - Server - : Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 - x-ms-error-code: FilesystemNotFound - x-ms-request-id: 705c2a66-401f-0043-7733-0dabc8000000 - x-ms-version: '2019-02-02' - status: - code: 404 - message: The specified filesystem does not exist. - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - xiafuhns.dfs.core.windows.net - - /filesystema3c31753/filea3c31753 - - resource=file - - '' + url: https://xiafuhns.blob.core.windows.net/filesystema3c31753/newname version: 1 diff --git a/sdk/storage/azure-storage-file-datalake/tests/test_directory.py b/sdk/storage/azure-storage-file-datalake/tests/test_directory.py index 9b76625abe5c..ff52c837dd5d 100644 --- a/sdk/storage/azure-storage-file-datalake/tests/test_directory.py +++ b/sdk/storage/azure-storage-file-datalake/tests/test_directory.py @@ -12,7 +12,8 @@ from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, \ ResourceModifiedError -from azure.storage.filedatalake import ContentSettings, DirectorySasPermissions, DataLakeDirectoryClient +from azure.storage.filedatalake import ContentSettings, DirectorySasPermissions, DataLakeDirectoryClient, \ + generate_file_system_sas, FileSystemSasPermissions, DataLakeFileClient from azure.storage.filedatalake import DataLakeServiceClient, generate_directory_sas from testcase import ( StorageTestCase, @@ -413,6 +414,7 @@ def test_rename_to_an_non_existing_directory_in_another_file_system(self): # rename dir2 under filesystem2 to dir1 under filesystem1 res = source_directory_client.rename_directory('/' + destination_file_system_name + '/' + non_existing_dir_name) + # the source directory has been renamed to destination directory, so it cannot be found with self.assertRaises(HttpResponseError): source_directory_client.get_directory_properties() @@ -432,6 +434,26 @@ def test_rename_directory_to_non_empty_directory(self): with self.assertRaises(HttpResponseError): dir2.get_directory_properties() + def test_rename_dir_with_file_system_sas(self): + if TestMode.need_recording_file(self.test_mode): + return + + token = generate_file_system_sas( + self.dsc.account_name, + self.file_system_name, + self.dsc.credential.account_key, + FileSystemSasPermissions(write=True, read=True, delete=True), + datetime.utcnow() + timedelta(hours=1), + ) + + # read the created file which is under root directory + dir_client = DataLakeDirectoryClient(self.dsc.url, self.file_system_name, "olddirectory", credential=token) + dir_client.create_directory() + new_client = dir_client.rename_directory(dir_client.file_system_name+'/'+'newdirectory') + + new_client.get_directory_properties() + self.assertEqual(new_client.path_name, "newdirectory") + @record def test_get_properties(self): # Arrange diff --git a/sdk/storage/azure-storage-file-datalake/tests/test_directory_async.py b/sdk/storage/azure-storage-file-datalake/tests/test_directory_async.py index 42429e688317..bf8aa3bc2443 100644 --- a/sdk/storage/azure-storage-file-datalake/tests/test_directory_async.py +++ b/sdk/storage/azure-storage-file-datalake/tests/test_directory_async.py @@ -16,7 +16,8 @@ from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, \ ResourceModifiedError -from azure.storage.filedatalake import ContentSettings, DirectorySasPermissions +from azure.storage.filedatalake import ContentSettings, DirectorySasPermissions, generate_file_system_sas, \ + FileSystemSasPermissions from azure.storage.filedatalake import generate_directory_sas from azure.storage.filedatalake.aio import DataLakeServiceClient, DataLakeDirectoryClient @@ -554,6 +555,63 @@ def test_rename_directory_to_non_empty_directory_async(self): loop = asyncio.get_event_loop() loop.run_until_complete(self._test_rename_directory_to_non_empty_directory()) + async def _test_rename_dir_with_file_system_sas(self): + if TestMode.need_recording_file(self.test_mode): + return + + token = generate_file_system_sas( + self.dsc.account_name, + self.file_system_name, + self.dsc.credential.account_key, + FileSystemSasPermissions(write=True, read=True, delete=True), + datetime.utcnow() + timedelta(hours=1), + ) + + # read the created file which is under root directory + dir_client = DataLakeDirectoryClient(self.dsc.url, self.file_system_name, "olddir", credential=token) + await dir_client.create_directory() + new_client = await dir_client.rename_directory(dir_client.file_system_name+'/'+'newdir'+'?') + + properties = await new_client.get_directory_properties() + self.assertEqual(properties.name, "newdir") + + def test_rename_dir_with_file_system_sas_async(self): + loop = asyncio.get_event_loop() + loop.run_until_complete(self._test_rename_dir_with_file_system_sas()) + + async def _test_rename_dir_with_file_sas(self): + # TODO: service bug?? + pytest.skip("service bug?") + token = generate_directory_sas(self.dsc.account_name, + self.file_system_name, + "olddir", + self.settings.STORAGE_DATA_LAKE_ACCOUNT_KEY, + permission=DirectorySasPermissions(read=True, create=True, write=True, + delete=True), + expiry=datetime.utcnow() + timedelta(hours=1), + ) + + new_token = generate_directory_sas(self.dsc.account_name, + self.file_system_name, + "newdir", + self.settings.STORAGE_DATA_LAKE_ACCOUNT_KEY, + permission=DirectorySasPermissions(read=True, create=True, write=True, + delete=True), + expiry=datetime.utcnow() + timedelta(hours=1), + ) + + # read the created file which is under root directory + dir_client = DataLakeDirectoryClient(self.dsc.url, self.file_system_name, "olddir", credential=token) + await dir_client.create_directory() + new_client = await dir_client.rename_directory(dir_client.file_system_name+'/'+'newdir'+'?'+new_token) + + properties = await new_client.get_directory_properties() + self.assertEqual(properties.name, "newdir") + + def test_rename_dir_with_file_sas_async(self): + loop = asyncio.get_event_loop() + loop.run_until_complete(self._test_rename_dir_with_file_sas()) + async def _test_get_properties(self): # Arrange directory_name = self._get_directory_reference() diff --git a/sdk/storage/azure-storage-file-datalake/tests/test_file.py b/sdk/storage/azure-storage-file-datalake/tests/test_file.py index bf831b563b66..d07ace8fb28d 100644 --- a/sdk/storage/azure-storage-file-datalake/tests/test_file.py +++ b/sdk/storage/azure-storage-file-datalake/tests/test_file.py @@ -8,13 +8,16 @@ import unittest from datetime import datetime, timedelta +import pytest + from azure.core import MatchConditions from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, \ ClientAuthenticationError, ResourceModifiedError from azure.storage.filedatalake import ContentSettings, generate_account_sas, generate_file_sas, \ ResourceTypes, AccountSasPermissions, \ - DataLakeFileClient, FileSystemClient, DataLakeDirectoryClient, FileSasPermissions + DataLakeFileClient, FileSystemClient, DataLakeDirectoryClient, FileSasPermissions, generate_file_system_sas, \ + FileSystemSasPermissions from azure.storage.filedatalake import DataLakeServiceClient from azure.storage.filedatalake._generated.models import StorageErrorException from testcase import ( @@ -570,6 +573,86 @@ def test_rename_file_with_non_used_name(self): self.assertEqual(data, data_bytes) self.assertEqual(new_client.path_name, "newname") + def test_rename_file_with_file_system_sas(self): + # sas token is calculated from storage key, so live only + if TestMode.need_recording_file(self.test_mode): + return + token = generate_file_system_sas( + self.dsc.account_name, + self.file_system_name, + self.dsc.credential.account_key, + FileSystemSasPermissions(write=True, read=True, delete=True), + datetime.utcnow() + timedelta(hours=1), + ) + + # read the created file which is under root directory + file_client = DataLakeFileClient(self.dsc.url, self.file_system_name, "oldfile", credential=token) + file_client.create_file() + data_bytes = b"abc" + file_client.append_data(data_bytes, 0, 3) + file_client.flush_data(3) + new_client = file_client.rename_file(file_client.file_system_name+'/'+'newname') + + data = new_client.download_file().readall() + self.assertEqual(data, data_bytes) + self.assertEqual(new_client.path_name, "newname") + + def test_rename_file_with_file_sas(self): + # SAS URL is calculated from storage key, so this test runs live only + if TestMode.need_recording_file(self.test_mode): + return + token = generate_file_sas(self.dsc.account_name, + self.file_system_name, + None, + "oldfile", + self.settings.STORAGE_DATA_LAKE_ACCOUNT_KEY, + permission=FileSasPermissions(read=True, create=True, write=True, delete=True), + expiry=datetime.utcnow() + timedelta(hours=1), + ) + + new_token = generate_file_sas(self.dsc.account_name, + self.file_system_name, + None, + "newname", + self.settings.STORAGE_DATA_LAKE_ACCOUNT_KEY, + permission=FileSasPermissions(read=True, create=True, write=True, delete=True), + expiry=datetime.utcnow() + timedelta(hours=1), + ) + + # read the created file which is under root directory + file_client = DataLakeFileClient(self.dsc.url, self.file_system_name, "oldfile", credential=token) + file_client.create_file() + data_bytes = b"abc" + file_client.append_data(data_bytes, 0, 3) + file_client.flush_data(3) + new_client = file_client.rename_file(file_client.file_system_name+'/'+'newname'+'?'+new_token) + + data = new_client.download_file().readall() + self.assertEqual(data, data_bytes) + self.assertEqual(new_client.path_name, "newname") + + def test_rename_file_with_account_sas(self): + pytest.skip("service bug") + token = generate_account_sas( + self.dsc.account_name, + self.dsc.credential.account_key, + ResourceTypes(object=True), + AccountSasPermissions(write=True, read=True, create=True, delete=True), + datetime.utcnow() + timedelta(hours=5), + ) + + # read the created file which is under root directory + file_client = DataLakeFileClient(self.dsc.url, self.file_system_name, "oldfile", credential=token) + file_client.create_file() + data_bytes = b"abc" + file_client.append_data(data_bytes, 0, 3) + file_client.flush_data(3) + new_client = file_client.rename_file(file_client.file_system_name+'/'+'newname') + + data = new_client.download_file().readall() + self.assertEqual(data, data_bytes) + self.assertEqual(new_client.path_name, "newname") + @record def test_rename_file_to_existing_file(self): # create the existing file diff --git a/sdk/storage/azure-storage-file-datalake/tests/test_file_async.py b/sdk/storage/azure-storage-file-datalake/tests/test_file_async.py index 8bd1ef819a14..e42e526347e3 100644 --- a/sdk/storage/azure-storage-file-datalake/tests/test_file_async.py +++ b/sdk/storage/azure-storage-file-datalake/tests/test_file_async.py @@ -716,6 +716,44 @@ def test_rename_file_to_existing_file_async(self): loop = asyncio.get_event_loop() loop.run_until_complete(self._test_rename_file_to_existing_file()) + async def _test_rename_file_with_file_sas(self): + # SAS URL is calculated from storage key, so this test runs live only + if TestMode.need_recording_file(self.test_mode): + return + token = generate_file_sas(self.dsc.account_name, + self.file_system_name, + None, + "oldfile", + self.settings.STORAGE_DATA_LAKE_ACCOUNT_KEY, + permission=FileSasPermissions(read=True, create=True, write=True, delete=True), + expiry=datetime.utcnow() + timedelta(hours=1), + ) + + new_token = generate_file_sas(self.dsc.account_name, + self.file_system_name, + None, + "newname", + self.settings.STORAGE_DATA_LAKE_ACCOUNT_KEY, + permission=FileSasPermissions(read=True, create=True, write=True, delete=True), + expiry=datetime.utcnow() + timedelta(hours=1), + ) + + # read the created file which is under root directory + file_client = DataLakeFileClient(self.dsc.url, self.file_system_name, "oldfile", credential=token) + await file_client.create_file() + data_bytes = b"abc" + await file_client.append_data(data_bytes, 0, 3) + await file_client.flush_data(3) + new_client = await file_client.rename_file(file_client.file_system_name+'/'+'newname'+'?'+new_token) + + data = await (await new_client.download_file()).readall() + self.assertEqual(data, data_bytes) + self.assertEqual(new_client.path_name, "newname") + + def test_rename_file_with_file_sas_async(self): + loop = asyncio.get_event_loop() + loop.run_until_complete(self._test_rename_file_with_file_sas()) + async def _test_rename_file_will_not_change_existing_directory(self): if TestMode.need_recording_file(self.test_mode): return