diff --git a/sdk/storage/azure-storage-file-datalake/CHANGELOG.md b/sdk/storage/azure-storage-file-datalake/CHANGELOG.md index 4a2f322ed6fe..3b0405180704 100644 --- a/sdk/storage/azure-storage-file-datalake/CHANGELOG.md +++ b/sdk/storage/azure-storage-file-datalake/CHANGELOG.md @@ -6,7 +6,6 @@ - Added support for service version 2021-08-06 - Added support for `owner`, `group`, `acl`, `lease_id`, `lease_duration` to both file and directory `create` APIs - Added support for `expiry_options`, `expires_on` to file `create` APIs -- Added `delete_files()` API ## 12.7.0 (2022-05-09) diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_deserialize.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_deserialize.py index 0df673cf0a5c..0f3baaa93020 100644 --- a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_deserialize.py +++ b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_deserialize.py @@ -115,13 +115,20 @@ def deserialize_metadata(response, obj, headers): # pylint: disable=unused-argu return {k[10:]: v for k, v in raw_metadata.items()} -def _decode_error(response, error_message=None, serialized_error=None): +def process_storage_error(storage_error): # pylint:disable=too-many-statements raise_error = HttpResponseError - error_code = response.headers.get('x-ms-error-code') + serialized = False + if not storage_error.response: + raise storage_error + # If it is one of those three then it has been serialized prior by the generated layer. + if isinstance(storage_error, (ResourceNotFoundError, ClientAuthenticationError, ResourceExistsError)): + serialized = True + error_code = storage_error.response.headers.get('x-ms-error-code') + error_message = storage_error.message additional_data = {} error_dict = {} try: - error_body = ContentDecodePolicy.deserialize_from_http_generics(response) + error_body = ContentDecodePolicy.deserialize_from_http_generics(storage_error.response) # If it is an XML response if isinstance(error_body, Element): error_dict = { @@ -145,13 +152,9 @@ def _decode_error(response, error_message=None, serialized_error=None): except DecodeError: pass - # Convert blob errors to datalake errors - if error_code in [StorageErrorCode.blob_not_found]: - error_code = StorageErrorCode.path_not_found - try: # This check would be unnecessary if we have already serialized the error. - if error_code and not serialized_error: + if error_code and not serialized: error_code = StorageErrorCode(error_code) if error_code in [StorageErrorCode.condition_not_met]: raise_error = ResourceModifiedError @@ -195,25 +198,17 @@ def _decode_error(response, error_message=None, serialized_error=None): for name, info in additional_data.items(): error_message += "\n{}:{}".format(name, info) - if serialized_error: - serialized_error.message = error_message - error = serialized_error + # No need to create an instance if it has already been serialized by the generated layer + if serialized: + storage_error.message = error_message + error = storage_error else: - error = raise_error(message=error_message, response=response) + error = raise_error(message=error_message, response=storage_error.response) # Ensure these properties are stored in the error instance as well (not just the error message) error.error_code = error_code error.additional_info = additional_data # error.args is what's surfaced on the traceback - show error message in all cases error.args = (error.message,) - return error - - -def process_storage_error(storage_error): - if not storage_error.response: - raise storage_error - # If it is one of those three then it has been serialized prior by the generated layer. - serialized = isinstance(storage_error, (ResourceNotFoundError, ClientAuthenticationError, ResourceExistsError)) - error = _decode_error(storage_error.response, storage_error.message, storage_error if serialized else None) try: # `from None` prevents us from double printing the exception (suppresses generated layer error context) diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_file_system_client.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_file_system_client.py index c02890e40f28..9b33a6166928 100644 --- a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_file_system_client.py +++ b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_file_system_client.py @@ -5,7 +5,7 @@ # -------------------------------------------------------------------------- # pylint: disable=too-many-lines import functools -from typing import Any, Dict, List, Optional, Type, TypeVar, Union, TYPE_CHECKING +from typing import Any, Dict, Optional, Type, TypeVar, Union, TYPE_CHECKING try: from urllib.parse import urlparse, quote, unquote @@ -28,7 +28,7 @@ from ._data_lake_lease import DataLakeLeaseClient from ._generated import AzureDataLakeStorageRESTAPI from ._generated.models import ListBlobsIncludeItem -from ._deserialize import _decode_error, process_storage_error, is_file_path +from ._deserialize import process_storage_error, is_file_path if TYPE_CHECKING: from datetime import datetime @@ -865,61 +865,6 @@ def _get_root_directory_client(self): """ return self.get_directory_client('/') - def delete_files( - self, - *files: str, - **kwargs) -> List[Optional[HttpResponseError]]: - """Marks the specified files or empty directories for deletion. - - The files/empty directories are later deleted during garbage collection. - - If a delete retention policy is enabled for the service, then this operation soft deletes the - files/empty directories and retains the files or snapshots for specified number of days. - After specified number of days, files' data is removed from the service during garbage collection. - Soft deleted files/empty directories are accessible through :func:`list_deleted_paths()`. - - :param str files: - The files/empty directories to delete. This can be a single file/empty directory, or multiple values can - be supplied, where each value is the name of the file/directory (str). - - :keyword ~datetime.datetime if_modified_since: - A DateTime value. Azure expects the date value passed in to be UTC. - If timezone is included, any non-UTC datetimes will be converted to UTC. - If a date is passed in without timezone info, it is assumed to be UTC. - Specify this header to perform the operation only - if the resource has been modified since the specified time. - :keyword ~datetime.datetime if_unmodified_since: - A DateTime value. Azure expects the date value passed in to be UTC. - If timezone is included, any non-UTC datetimes will be converted to UTC. - If a date is passed in without timezone info, it is assumed to be UTC. - Specify this header to perform the operation only if - the resource has not been modified since the specified date/time. - :keyword int timeout: - The timeout parameter is expressed in seconds. - :return: A list containing None for successful operations and - HttpResponseError objects for unsuccessful operations. - :rtype: List[Optional[HttpResponseError]] - - .. admonition:: Example: - - .. literalinclude:: ../samples/datalake_samples_file_system_async.py - :start-after: [START batch_delete_files_or_empty_directories] - :end-before: [END batch_delete_files_or_empty_directories] - :language: python - :dedent: 4 - :caption: Deleting multiple files or empty directories. - """ - results = self._container_client.delete_blobs(raise_on_any_failure=False, *files, **kwargs) - - errors = [] - for result in results: - if not 200 <= result.status_code < 300: - errors.append(_decode_error(result, result.reason)) - else: - errors.append(None) - - return errors - def get_directory_client(self, directory # type: Union[DirectoryProperties, str] ): # type: (...) -> DataLakeDirectoryClient diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/aio/_file_system_client_async.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/aio/_file_system_client_async.py index cf046ed5bf7d..27548cc9d7b5 100644 --- a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/aio/_file_system_client_async.py +++ b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/aio/_file_system_client_async.py @@ -20,7 +20,7 @@ from azure.core.tracing.decorator_async import distributed_trace_async from azure.storage.blob.aio import ContainerClient from .._serialize import get_api_version -from .._deserialize import _decode_error, process_storage_error, is_file_path +from .._deserialize import process_storage_error, is_file_path from .._generated.models import ListBlobsIncludeItem from ._data_lake_file_client_async import DataLakeFileClient @@ -764,62 +764,6 @@ async def delete_file(self, file, # type: Union[FileProperties, str] await file_client.delete_file(**kwargs) return file_client - @distributed_trace_async - async def delete_files( - self, - *files: str, - **kwargs) -> List[Optional[HttpResponseError]]: - """Marks the specified files or empty directories for deletion. - - The files/empty directories are later deleted during garbage collection. - - If a delete retention policy is enabled for the service, then this operation soft deletes the - files/empty directories and retains the files or snapshots for specified number of days. - After specified number of days, files' data is removed from the service during garbage collection. - Soft deleted files/empty directories are accessible through :func:`list_deleted_paths()`. - - :param str files: - The files/empty directories to delete. This can be a single file/empty directory, or multiple values can - be supplied, where each value is the name of the file/directory (str). - - :keyword ~datetime.datetime if_modified_since: - A DateTime value. Azure expects the date value passed in to be UTC. - If timezone is included, any non-UTC datetimes will be converted to UTC. - If a date is passed in without timezone info, it is assumed to be UTC. - Specify this header to perform the operation only - if the resource has been modified since the specified time. - :keyword ~datetime.datetime if_unmodified_since: - A DateTime value. Azure expects the date value passed in to be UTC. - If timezone is included, any non-UTC datetimes will be converted to UTC. - If a date is passed in without timezone info, it is assumed to be UTC. - Specify this header to perform the operation only if - the resource has not been modified since the specified date/time. - :keyword int timeout: - The timeout parameter is expressed in seconds. - :return: A list containing None for successful operations and - HttpResponseError objects for unsuccessful operations. - :rtype: List[Optional[HttpResponseError]] - - .. admonition:: Example: - - .. literalinclude:: ../samples/datalake_samples_file_system_async.py - :start-after: [START batch_delete_files_or_empty_directories] - :end-before: [END batch_delete_files_or_empty_directories] - :language: python - :dedent: 4 - :caption: Deleting multiple files or empty directories. - """ - response = await self._container_client.delete_blobs(raise_on_any_failure=False, *files, **kwargs) - - errors = [] - async for result in response: - if not 200 <= result.status_code < 300: - errors.append(_decode_error(result, result.reason)) - else: - errors.append(None) - - return errors - @distributed_trace_async async def _undelete_path(self, deleted_path_name, deletion_id, **kwargs): # type: (str, str, **Any) -> Union[DataLakeDirectoryClient, DataLakeFileClient] diff --git a/sdk/storage/azure-storage-file-datalake/samples/datalake_samples_file_system.py b/sdk/storage/azure-storage-file-datalake/samples/datalake_samples_file_system.py index ff08d989aba0..33c2955d10aa 100644 --- a/sdk/storage/azure-storage-file-datalake/samples/datalake_samples_file_system.py +++ b/sdk/storage/azure-storage-file-datalake/samples/datalake_samples_file_system.py @@ -209,49 +209,6 @@ def create_file_from_file_system(self): file_system_client.delete_file_system() - # [START batch_delete_files_or_empty_directories] - def batch_delete_files_or_empty_directories(self): - from azure.storage.filedatalake import FileSystemClient - file_system_client = FileSystemClient.from_connection_string(self.connection_string, "filesystem") - - file_system_client.create_file_system() - - data = b'hello world' - - try: - # create file1 - file_system_client.get_file_client('file1').upload_data(data, overwrite=True) - - # create file2, then pass file properties in batch delete later - file2 = file_system_client.get_file_client('file2') - file2.upload_data(data, overwrite=True) - - # create file3 and batch delete it later only etag matches this file3 etag - file3 = file_system_client.get_file_client('file3') - file3.upload_data(data, overwrite=True) - - # create dir1. Empty directory can be deleted using delete_files - file_system_client.get_directory_client('dir1').create_directory() - file_system_client.get_directory_client('dir1').create_file('file4') - - except: - pass - - response = file_system_client.delete_files( - 'file1', - 'file2', - 'file3', - 'dir1', # dir1 is not empty - 'dir8', # dir8 doesn't exist - ) - print("Total number of sub-responses: " + len(response) + "\n") - print("First failure error code: " + response[3].error_code + "\n") - print("First failure status code: " + response[3].status_code + "\n") - print("Second failure error code: " + response[4].error_code + "\n") - print("Second failure status code: " + response[4].status_code + "\n") - # [END batch_delete_files_or_empty_directories] - - if __name__ == '__main__': sample = FileSystemSamples() sample.file_system_sample() @@ -260,4 +217,3 @@ def batch_delete_files_or_empty_directories(self): sample.list_paths_in_file_system() sample.get_file_client_from_file_system() sample.create_file_from_file_system() - sample.batch_delete_files_or_empty_directories() diff --git a/sdk/storage/azure-storage-file-datalake/samples/datalake_samples_file_system_async.py b/sdk/storage/azure-storage-file-datalake/samples/datalake_samples_file_system_async.py index 466708a8955a..f130c9e60b1f 100644 --- a/sdk/storage/azure-storage-file-datalake/samples/datalake_samples_file_system_async.py +++ b/sdk/storage/azure-storage-file-datalake/samples/datalake_samples_file_system_async.py @@ -216,50 +216,6 @@ async def create_file_from_file_system(self): # [END delete_directory_from_file_system] await file_system_client.delete_file_system() - - # [START batch_delete_files_or_empty_directories] - async def batch_delete_files_or_empty_directories(self): - from azure.storage.filedatalake import FileSystemClient - file_system_client = FileSystemClient.from_connection_string(self.connection_string, "filesystem") - - async with file_system_client: - await file_system_client.create_file_system() - - data = b'hello world' - - try: - # create file1 - await file_system_client.get_file_client('file1').upload_data(data, overwrite=True) - - # create file2, then pass file properties in batch delete later - file2 = file_system_client.get_file_client('file2') - await file2.upload_data(data, overwrite=True) - - # create file3 and batch delete it later only etag matches this file3 etag - file3 = file_system_client.get_file_client('file3') - await file3.upload_data(data, overwrite=True) - - # create dir1. Empty directory can be deleted using delete_files - await file_system_client.get_directory_client('dir1').create_directory() - await file_system_client.get_directory_client('dir1').create_file('file4') - - except: - pass - - response = await file_system_client.delete_files( - 'file1', - 'file2', - 'file3', - 'dir1', # dir1 is not empty - 'dir8', # dir8 doesn't exist - ) - print("Total number of sub-responses: " + len(response) + "\n") - print("First failure error code: " + response[3].error_code + "\n") - print("First failure status code: " + response[3].status_code + "\n") - print("Second failure error code: " + response[4].error_code + "\n") - print("Second failure status code: " + response[4].status_code + "\n") - # [END batch_delete_files_or_empty_directories] - async def run(): sample = FileSystemSamplesAsync() @@ -269,7 +225,6 @@ async def run(): await sample.list_paths_in_file_system() await sample.get_file_client_from_file_system() await sample.create_file_from_file_system() - await sample.batch_delete_files_or_empty_directories() if __name__ == '__main__': loop = asyncio.get_event_loop() diff --git a/sdk/storage/azure-storage-file-datalake/tests/recordings/test_file_system.test_delete_files_simple_no_raise.yaml b/sdk/storage/azure-storage-file-datalake/tests/recordings/test_file_system.test_delete_files_simple_no_raise.yaml deleted file mode 100644 index 4440aacf13ec..000000000000 --- a/sdk/storage/azure-storage-file-datalake/tests/recordings/test_file_system.test_delete_files_simple_no_raise.yaml +++ /dev/null @@ -1,587 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - azsdk-python-storage-dfs/12.8.0b1 Python/3.10.2 (Windows-10-10.0.19044-SP0) - x-ms-date: - - Thu, 02 Jun 2022 22:50:59 GMT - x-ms-version: - - '2021-08-06' - method: PUT - uri: https://storagename.blob.core.windows.net/fs1d66148e?restype=container - response: - body: - string: '' - headers: - content-length: - - '0' - date: - - Thu, 02 Jun 2022 22:50:58 GMT - etag: - - '"0x8DA44EA5C3CB3DC"' - last-modified: - - Thu, 02 Jun 2022 22:50:58 GMT - server: - - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 - x-ms-version: - - '2021-08-06' - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - azsdk-python-storage-dfs/12.8.0b1 Python/3.10.2 (Windows-10-10.0.19044-SP0) - x-ms-date: - - Thu, 02 Jun 2022 22:50:59 GMT - x-ms-version: - - '2021-08-06' - method: PUT - uri: https://storagename.dfs.core.windows.net/fs1d66148e/file1?resource=file - response: - body: - string: '' - headers: - content-length: - - '0' - date: - - Thu, 02 Jun 2022 22:50:58 GMT - etag: - - '"0x8DA44EA5C700833"' - last-modified: - - Thu, 02 Jun 2022 22:50:59 GMT - server: - - Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-server-encrypted: - - 'true' - x-ms-version: - - '2021-08-06' - status: - code: 201 - message: Created -- request: - body: hello world - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '11' - Content-Type: - - application/json - User-Agent: - - azsdk-python-storage-dfs/12.8.0b1 Python/3.10.2 (Windows-10-10.0.19044-SP0) - x-ms-date: - - Thu, 02 Jun 2022 22:50:59 GMT - x-ms-version: - - '2021-08-06' - method: PATCH - uri: https://storagename.dfs.core.windows.net/fs1d66148e/file1?action=append&position=0 - response: - body: - string: '' - headers: - content-length: - - '0' - date: - - Thu, 02 Jun 2022 22:50:58 GMT - server: - - Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-server-encrypted: - - 'true' - x-ms-version: - - '2021-08-06' - status: - code: 202 - message: Accepted -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - If-Match: - - '"0x8DA44EA5C700833"' - User-Agent: - - azsdk-python-storage-dfs/12.8.0b1 Python/3.10.2 (Windows-10-10.0.19044-SP0) - x-ms-date: - - Thu, 02 Jun 2022 22:50:59 GMT - x-ms-version: - - '2021-08-06' - method: PATCH - uri: https://storagename.dfs.core.windows.net/fs1d66148e/file1?action=flush&position=11&close=true - response: - body: - string: '' - headers: - content-length: - - '0' - date: - - Thu, 02 Jun 2022 22:50:58 GMT - etag: - - '"0x8DA44EA5C88BDEC"' - last-modified: - - Thu, 02 Jun 2022 22:50:59 GMT - server: - - Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-server-encrypted: - - 'false' - x-ms-version: - - '2021-08-06' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - azsdk-python-storage-dfs/12.8.0b1 Python/3.10.2 (Windows-10-10.0.19044-SP0) - x-ms-date: - - Thu, 02 Jun 2022 22:51:00 GMT - x-ms-version: - - '2021-08-06' - method: PUT - uri: https://storagename.dfs.core.windows.net/fs1d66148e/file2?resource=file - response: - body: - string: '' - headers: - content-length: - - '0' - date: - - Thu, 02 Jun 2022 22:50:59 GMT - etag: - - '"0x8DA44EA5C953D76"' - last-modified: - - Thu, 02 Jun 2022 22:50:59 GMT - server: - - Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-server-encrypted: - - 'true' - x-ms-version: - - '2021-08-06' - status: - code: 201 - message: Created -- request: - body: hello world - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '11' - Content-Type: - - application/json - User-Agent: - - azsdk-python-storage-dfs/12.8.0b1 Python/3.10.2 (Windows-10-10.0.19044-SP0) - x-ms-date: - - Thu, 02 Jun 2022 22:51:00 GMT - x-ms-version: - - '2021-08-06' - method: PATCH - uri: https://storagename.dfs.core.windows.net/fs1d66148e/file2?action=append&position=0 - response: - body: - string: '' - headers: - content-length: - - '0' - date: - - Thu, 02 Jun 2022 22:50:59 GMT - server: - - Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-server-encrypted: - - 'true' - x-ms-version: - - '2021-08-06' - status: - code: 202 - message: Accepted -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - If-Match: - - '"0x8DA44EA5C953D76"' - User-Agent: - - azsdk-python-storage-dfs/12.8.0b1 Python/3.10.2 (Windows-10-10.0.19044-SP0) - x-ms-date: - - Thu, 02 Jun 2022 22:51:00 GMT - x-ms-version: - - '2021-08-06' - method: PATCH - uri: https://storagename.dfs.core.windows.net/fs1d66148e/file2?action=flush&position=11&close=true - response: - body: - string: '' - headers: - content-length: - - '0' - date: - - Thu, 02 Jun 2022 22:50:59 GMT - etag: - - '"0x8DA44EA5CAD2F12"' - last-modified: - - Thu, 02 Jun 2022 22:50:59 GMT - server: - - Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-server-encrypted: - - 'false' - x-ms-version: - - '2021-08-06' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - azsdk-python-storage-dfs/12.8.0b1 Python/3.10.2 (Windows-10-10.0.19044-SP0) - x-ms-date: - - Thu, 02 Jun 2022 22:51:00 GMT - x-ms-version: - - '2021-08-06' - method: PUT - uri: https://storagename.dfs.core.windows.net/fs1d66148e/file3?resource=file - response: - body: - string: '' - headers: - content-length: - - '0' - date: - - Thu, 02 Jun 2022 22:50:59 GMT - etag: - - '"0x8DA44EA5CBA58F1"' - last-modified: - - Thu, 02 Jun 2022 22:50:59 GMT - server: - - Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-server-encrypted: - - 'true' - x-ms-version: - - '2021-08-06' - status: - code: 201 - message: Created -- request: - body: hello world - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '11' - Content-Type: - - application/json - User-Agent: - - azsdk-python-storage-dfs/12.8.0b1 Python/3.10.2 (Windows-10-10.0.19044-SP0) - x-ms-date: - - Thu, 02 Jun 2022 22:51:00 GMT - x-ms-version: - - '2021-08-06' - method: PATCH - uri: https://storagename.dfs.core.windows.net/fs1d66148e/file3?action=append&position=0 - response: - body: - string: '' - headers: - content-length: - - '0' - date: - - Thu, 02 Jun 2022 22:50:59 GMT - server: - - Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-server-encrypted: - - 'true' - x-ms-version: - - '2021-08-06' - status: - code: 202 - message: Accepted -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - If-Match: - - '"0x8DA44EA5CBA58F1"' - User-Agent: - - azsdk-python-storage-dfs/12.8.0b1 Python/3.10.2 (Windows-10-10.0.19044-SP0) - x-ms-date: - - Thu, 02 Jun 2022 22:51:00 GMT - x-ms-version: - - '2021-08-06' - method: PATCH - uri: https://storagename.dfs.core.windows.net/fs1d66148e/file3?action=flush&position=11&close=true - response: - body: - string: '' - headers: - content-length: - - '0' - date: - - Thu, 02 Jun 2022 22:50:59 GMT - etag: - - '"0x8DA44EA5CD421A4"' - last-modified: - - Thu, 02 Jun 2022 22:50:59 GMT - server: - - Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-server-encrypted: - - 'false' - x-ms-version: - - '2021-08-06' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - azsdk-python-storage-dfs/12.8.0b1 Python/3.10.2 (Windows-10-10.0.19044-SP0) - x-ms-date: - - Thu, 02 Jun 2022 22:51:00 GMT - x-ms-version: - - '2021-08-06' - method: PUT - uri: https://storagename.dfs.core.windows.net/fs1d66148e/dir1?resource=directory - response: - body: - string: '' - headers: - content-length: - - '0' - date: - - Thu, 02 Jun 2022 22:50:59 GMT - etag: - - '"0x8DA44EA5CDFE9E8"' - last-modified: - - Thu, 02 Jun 2022 22:50:59 GMT - server: - - Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-server-encrypted: - - 'true' - x-ms-version: - - '2021-08-06' - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - azsdk-python-storage-dfs/12.8.0b1 Python/3.10.2 (Windows-10-10.0.19044-SP0) - x-ms-date: - - Thu, 02 Jun 2022 22:51:00 GMT - x-ms-version: - - '2021-08-06' - method: PUT - uri: https://storagename.dfs.core.windows.net/fs1d66148e/dir2?resource=directory - response: - body: - string: '' - headers: - content-length: - - '0' - date: - - Thu, 02 Jun 2022 22:50:59 GMT - etag: - - '"0x8DA44EA5CEBE139"' - last-modified: - - Thu, 02 Jun 2022 22:50:59 GMT - server: - - Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-server-encrypted: - - 'true' - x-ms-version: - - '2021-08-06' - status: - code: 201 - message: Created -- request: - body: "--batch_79395630-e2c6-11ec-8c1f-4851c58829e0\r\nContent-Type: application/http\r\nContent-ID: - 0\r\nContent-Transfer-Encoding: binary\r\n\r\nDELETE /fs1d66148e/file1? HTTP/1.1\r\nx-ms-date: - Thu, 02 Jun 2022 22:51:00 GMT\r\nx-ms-client-request-id: 7939cb0d-e2c6-11ec-adc2-4851c58829e0\r\r\nContent-Length: - 0\r\n\r\n\r\n--batch_79395630-e2c6-11ec-8c1f-4851c58829e0\r\nContent-Type: application/http\r\nContent-ID: - 1\r\nContent-Transfer-Encoding: binary\r\n\r\nDELETE /fs1d66148e/file2? HTTP/1.1\r\nx-ms-date: - Thu, 02 Jun 2022 22:51:00 GMT\r\nx-ms-client-request-id: 7939f076-e2c6-11ec-a360-4851c58829e0\r\r\nContent-Length: - 0\r\n\r\n\r\n--batch_79395630-e2c6-11ec-8c1f-4851c58829e0\r\nContent-Type: application/http\r\nContent-ID: - 2\r\nContent-Transfer-Encoding: binary\r\n\r\nDELETE /fs1d66148e/file3? HTTP/1.1\r\nx-ms-date: - Thu, 02 Jun 2022 22:51:00 GMT\r\nx-ms-client-request-id: 793a180d-e2c6-11ec-841a-4851c58829e0\r\r\nContent-Length: - 0\r\n\r\n\r\n--batch_79395630-e2c6-11ec-8c1f-4851c58829e0\r\nContent-Type: application/http\r\nContent-ID: - 3\r\nContent-Transfer-Encoding: binary\r\n\r\nDELETE /fs1d66148e/dir1? HTTP/1.1\r\nx-ms-date: - Thu, 02 Jun 2022 22:51:00 GMT\r\nx-ms-client-request-id: 793a180e-e2c6-11ec-9fca-4851c58829e0\r\r\nContent-Length: - 0\r\n\r\n\r\n--batch_79395630-e2c6-11ec-8c1f-4851c58829e0\r\nContent-Type: application/http\r\nContent-ID: - 4\r\nContent-Transfer-Encoding: binary\r\n\r\nDELETE /fs1d66148e/dir2? HTTP/1.1\r\nx-ms-date: - Thu, 02 Jun 2022 22:51:00 GMT\r\nx-ms-client-request-id: 793a180f-e2c6-11ec-95cf-4851c58829e0\r\r\nContent-Length: - 0\r\n\r\n\r\n--batch_79395630-e2c6-11ec-8c1f-4851c58829e0--\r\n" - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '1941' - Content-Type: - - multipart/mixed; boundary=batch_79395630-e2c6-11ec-8c1f-4851c58829e0 - User-Agent: - - azsdk-python-storage-dfs/12.8.0b1 Python/3.10.2 (Windows-10-10.0.19044-SP0) - x-ms-date: - - Thu, 02 Jun 2022 22:51:00 GMT - x-ms-version: - - '2021-08-06' - method: POST - uri: https://storagename.blob.core.windows.net/fs1d66148e?restype=container&comp=batch - response: - body: - string: "--batchresponse_43c8c3ec-c6dd-4df4-82d2-660996cc714a\r\nContent-Type: - application/http\r\nContent-ID: 0\r\n\r\nHTTP/1.1 202 Accepted\r\nx-ms-delete-type-permanent: - true\r\nx-ms-request-id: de1371b8-a01e-0078-52d3-7639791ea0dc\r\nx-ms-version: - 2021-08-06\r\nx-ms-client-request-id: 7939cb0d-e2c6-11ec-adc2-4851c58829e0\r\nServer: - Windows-Azure-Blob/1.0\r\n\r\n--batchresponse_43c8c3ec-c6dd-4df4-82d2-660996cc714a\r\nContent-Type: - application/http\r\nContent-ID: 1\r\n\r\nHTTP/1.1 202 Accepted\r\nx-ms-delete-type-permanent: - true\r\nx-ms-request-id: de1371b8-a01e-0078-52d3-7639791ea0de\r\nx-ms-version: - 2021-08-06\r\nx-ms-client-request-id: 7939f076-e2c6-11ec-a360-4851c58829e0\r\nServer: - Windows-Azure-Blob/1.0\r\n\r\n--batchresponse_43c8c3ec-c6dd-4df4-82d2-660996cc714a\r\nContent-Type: - application/http\r\nContent-ID: 2\r\n\r\nHTTP/1.1 202 Accepted\r\nx-ms-delete-type-permanent: - true\r\nx-ms-request-id: de1371b8-a01e-0078-52d3-7639791ea0df\r\nx-ms-version: - 2021-08-06\r\nx-ms-client-request-id: 793a180d-e2c6-11ec-841a-4851c58829e0\r\nServer: - Windows-Azure-Blob/1.0\r\n\r\n--batchresponse_43c8c3ec-c6dd-4df4-82d2-660996cc714a\r\nContent-Type: - application/http\r\nContent-ID: 3\r\n\r\nHTTP/1.1 202 Accepted\r\nx-ms-delete-type-permanent: - true\r\nx-ms-request-id: de1371b8-a01e-0078-52d3-7639791ea0e0\r\nx-ms-version: - 2021-08-06\r\nx-ms-client-request-id: 793a180e-e2c6-11ec-9fca-4851c58829e0\r\nServer: - Windows-Azure-Blob/1.0\r\n\r\n--batchresponse_43c8c3ec-c6dd-4df4-82d2-660996cc714a\r\nContent-Type: - application/http\r\nContent-ID: 4\r\n\r\nHTTP/1.1 202 Accepted\r\nx-ms-delete-type-permanent: - true\r\nx-ms-request-id: de1371b8-a01e-0078-52d3-7639791ea0e1\r\nx-ms-version: - 2021-08-06\r\nx-ms-client-request-id: 793a180f-e2c6-11ec-95cf-4851c58829e0\r\nServer: - Windows-Azure-Blob/1.0\r\n\r\n--batchresponse_43c8c3ec-c6dd-4df4-82d2-660996cc714a--" - headers: - content-type: - - multipart/mixed; boundary=batchresponse_43c8c3ec-c6dd-4df4-82d2-660996cc714a - date: - - Thu, 02 Jun 2022 22:50:59 GMT - server: - - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 - transfer-encoding: - - chunked - x-ms-version: - - '2021-08-06' - status: - code: 202 - message: Accepted -- request: - body: null - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - azsdk-python-storage-dfs/12.8.0b1 Python/3.10.2 (Windows-10-10.0.19044-SP0) - x-ms-date: - - Thu, 02 Jun 2022 22:51:00 GMT - x-ms-version: - - '2021-08-06' - method: DELETE - uri: https://storagename.blob.core.windows.net/fs1d66148e?restype=container - response: - body: - string: '' - headers: - content-length: - - '0' - date: - - Thu, 02 Jun 2022 22:50:59 GMT - server: - - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 - x-ms-version: - - '2021-08-06' - status: - code: 202 - message: Accepted -version: 1 diff --git a/sdk/storage/azure-storage-file-datalake/tests/recordings/test_file_system.test_delete_files_with_failed_subrequest.yaml b/sdk/storage/azure-storage-file-datalake/tests/recordings/test_file_system.test_delete_files_with_failed_subrequest.yaml deleted file mode 100644 index ff56c6a7c83c..000000000000 --- a/sdk/storage/azure-storage-file-datalake/tests/recordings/test_file_system.test_delete_files_with_failed_subrequest.yaml +++ /dev/null @@ -1,552 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - azsdk-python-storage-dfs/12.8.0b1 Python/3.10.2 (Windows-10-10.0.19044-SP0) - x-ms-date: - - Thu, 02 Jun 2022 22:50:44 GMT - x-ms-version: - - '2021-08-06' - method: PUT - uri: https://storagename.blob.core.windows.net/fs2a8621787?restype=container - response: - body: - string: '' - headers: - content-length: - - '0' - date: - - Thu, 02 Jun 2022 22:50:43 GMT - etag: - - '"0x8DA44EA535EB30C"' - last-modified: - - Thu, 02 Jun 2022 22:50:43 GMT - server: - - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 - x-ms-version: - - '2021-08-06' - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - azsdk-python-storage-dfs/12.8.0b1 Python/3.10.2 (Windows-10-10.0.19044-SP0) - x-ms-date: - - Thu, 02 Jun 2022 22:50:44 GMT - x-ms-version: - - '2021-08-06' - method: PUT - uri: https://storagename.dfs.core.windows.net/fs2a8621787/file1?resource=file - response: - body: - string: '' - headers: - content-length: - - '0' - date: - - Thu, 02 Jun 2022 22:50:44 GMT - etag: - - '"0x8DA44EA53A89162"' - last-modified: - - Thu, 02 Jun 2022 22:50:44 GMT - server: - - Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-server-encrypted: - - 'true' - x-ms-version: - - '2021-08-06' - status: - code: 201 - message: Created -- request: - body: hello world - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '11' - Content-Type: - - application/json - User-Agent: - - azsdk-python-storage-dfs/12.8.0b1 Python/3.10.2 (Windows-10-10.0.19044-SP0) - x-ms-date: - - Thu, 02 Jun 2022 22:50:45 GMT - x-ms-version: - - '2021-08-06' - method: PATCH - uri: https://storagename.dfs.core.windows.net/fs2a8621787/file1?action=append&position=0 - response: - body: - string: '' - headers: - content-length: - - '0' - date: - - Thu, 02 Jun 2022 22:50:44 GMT - server: - - Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-server-encrypted: - - 'true' - x-ms-version: - - '2021-08-06' - status: - code: 202 - message: Accepted -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - If-Match: - - '"0x8DA44EA53A89162"' - User-Agent: - - azsdk-python-storage-dfs/12.8.0b1 Python/3.10.2 (Windows-10-10.0.19044-SP0) - x-ms-date: - - Thu, 02 Jun 2022 22:50:45 GMT - x-ms-version: - - '2021-08-06' - method: PATCH - uri: https://storagename.dfs.core.windows.net/fs2a8621787/file1?action=flush&position=11&close=true - response: - body: - string: '' - headers: - content-length: - - '0' - date: - - Thu, 02 Jun 2022 22:50:44 GMT - etag: - - '"0x8DA44EA53C15F48"' - last-modified: - - Thu, 02 Jun 2022 22:50:44 GMT - server: - - Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-server-encrypted: - - 'false' - x-ms-version: - - '2021-08-06' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - azsdk-python-storage-dfs/12.8.0b1 Python/3.10.2 (Windows-10-10.0.19044-SP0) - x-ms-date: - - Thu, 02 Jun 2022 22:50:45 GMT - x-ms-version: - - '2021-08-06' - method: PUT - uri: https://storagename.dfs.core.windows.net/fs2a8621787/file2?resource=file - response: - body: - string: '' - headers: - content-length: - - '0' - date: - - Thu, 02 Jun 2022 22:50:44 GMT - etag: - - '"0x8DA44EA53CE02F5"' - last-modified: - - Thu, 02 Jun 2022 22:50:44 GMT - server: - - Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-server-encrypted: - - 'true' - x-ms-version: - - '2021-08-06' - status: - code: 201 - message: Created -- request: - body: hello world - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '11' - Content-Type: - - application/json - User-Agent: - - azsdk-python-storage-dfs/12.8.0b1 Python/3.10.2 (Windows-10-10.0.19044-SP0) - x-ms-date: - - Thu, 02 Jun 2022 22:50:45 GMT - x-ms-version: - - '2021-08-06' - method: PATCH - uri: https://storagename.dfs.core.windows.net/fs2a8621787/file2?action=append&position=0 - response: - body: - string: '' - headers: - content-length: - - '0' - date: - - Thu, 02 Jun 2022 22:50:44 GMT - server: - - Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-server-encrypted: - - 'true' - x-ms-version: - - '2021-08-06' - status: - code: 202 - message: Accepted -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - If-Match: - - '"0x8DA44EA53CE02F5"' - User-Agent: - - azsdk-python-storage-dfs/12.8.0b1 Python/3.10.2 (Windows-10-10.0.19044-SP0) - x-ms-date: - - Thu, 02 Jun 2022 22:50:45 GMT - x-ms-version: - - '2021-08-06' - method: PATCH - uri: https://storagename.dfs.core.windows.net/fs2a8621787/file2?action=flush&position=11&close=true - response: - body: - string: '' - headers: - content-length: - - '0' - date: - - Thu, 02 Jun 2022 22:50:44 GMT - etag: - - '"0x8DA44EA53E5D3AE"' - last-modified: - - Thu, 02 Jun 2022 22:50:44 GMT - server: - - Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-server-encrypted: - - 'false' - x-ms-version: - - '2021-08-06' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - azsdk-python-storage-dfs/12.8.0b1 Python/3.10.2 (Windows-10-10.0.19044-SP0) - x-ms-date: - - Thu, 02 Jun 2022 22:50:45 GMT - x-ms-version: - - '2021-08-06' - method: PUT - uri: https://storagename.dfs.core.windows.net/fs2a8621787/file3?resource=file - response: - body: - string: '' - headers: - content-length: - - '0' - date: - - Thu, 02 Jun 2022 22:50:44 GMT - etag: - - '"0x8DA44EA53F201AB"' - last-modified: - - Thu, 02 Jun 2022 22:50:44 GMT - server: - - Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-server-encrypted: - - 'true' - x-ms-version: - - '2021-08-06' - status: - code: 201 - message: Created -- request: - body: hello world - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '11' - Content-Type: - - application/json - User-Agent: - - azsdk-python-storage-dfs/12.8.0b1 Python/3.10.2 (Windows-10-10.0.19044-SP0) - x-ms-date: - - Thu, 02 Jun 2022 22:50:45 GMT - x-ms-version: - - '2021-08-06' - method: PATCH - uri: https://storagename.dfs.core.windows.net/fs2a8621787/file3?action=append&position=0 - response: - body: - string: '' - headers: - content-length: - - '0' - date: - - Thu, 02 Jun 2022 22:50:44 GMT - server: - - Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-server-encrypted: - - 'true' - x-ms-version: - - '2021-08-06' - status: - code: 202 - message: Accepted -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - If-Match: - - '"0x8DA44EA53F201AB"' - User-Agent: - - azsdk-python-storage-dfs/12.8.0b1 Python/3.10.2 (Windows-10-10.0.19044-SP0) - x-ms-date: - - Thu, 02 Jun 2022 22:50:45 GMT - x-ms-version: - - '2021-08-06' - method: PATCH - uri: https://storagename.dfs.core.windows.net/fs2a8621787/file3?action=flush&position=11&close=true - response: - body: - string: '' - headers: - content-length: - - '0' - date: - - Thu, 02 Jun 2022 22:50:44 GMT - etag: - - '"0x8DA44EA540B6288"' - last-modified: - - Thu, 02 Jun 2022 22:50:44 GMT - server: - - Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-server-encrypted: - - 'false' - x-ms-version: - - '2021-08-06' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - azsdk-python-storage-dfs/12.8.0b1 Python/3.10.2 (Windows-10-10.0.19044-SP0) - x-ms-date: - - Thu, 02 Jun 2022 22:50:45 GMT - x-ms-version: - - '2021-08-06' - method: PUT - uri: https://storagename.dfs.core.windows.net/fs2a8621787/dir1%2Ffile4?resource=file - response: - body: - string: '' - headers: - content-length: - - '0' - date: - - Thu, 02 Jun 2022 22:50:44 GMT - etag: - - '"0x8DA44EA541B16EA"' - last-modified: - - Thu, 02 Jun 2022 22:50:45 GMT - server: - - Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-server-encrypted: - - 'true' - x-ms-version: - - '2021-08-06' - status: - code: 201 - message: Created -- request: - body: "--batch_7068a476-e2c6-11ec-986b-4851c58829e0\r\nContent-Type: application/http\r\nContent-ID: - 0\r\nContent-Transfer-Encoding: binary\r\n\r\nDELETE /fs2a8621787/file1? HTTP/1.1\r\nx-ms-date: - Thu, 02 Jun 2022 22:50:45 GMT\r\nx-ms-client-request-id: 7068f114-e2c6-11ec-980f-4851c58829e0\r\r\nContent-Length: - 0\r\n\r\n\r\n--batch_7068a476-e2c6-11ec-986b-4851c58829e0\r\nContent-Type: application/http\r\nContent-ID: - 1\r\nContent-Transfer-Encoding: binary\r\n\r\nDELETE /fs2a8621787/file2? HTTP/1.1\r\nx-ms-date: - Thu, 02 Jun 2022 22:50:45 GMT\r\nx-ms-client-request-id: 7068f115-e2c6-11ec-b3eb-4851c58829e0\r\r\nContent-Length: - 0\r\n\r\n\r\n--batch_7068a476-e2c6-11ec-986b-4851c58829e0\r\nContent-Type: application/http\r\nContent-ID: - 2\r\nContent-Transfer-Encoding: binary\r\n\r\nDELETE /fs2a8621787/file3? HTTP/1.1\r\nx-ms-date: - Thu, 02 Jun 2022 22:50:45 GMT\r\nx-ms-client-request-id: 7068f116-e2c6-11ec-852c-4851c58829e0\r\r\nContent-Length: - 0\r\n\r\n\r\n--batch_7068a476-e2c6-11ec-986b-4851c58829e0\r\nContent-Type: application/http\r\nContent-ID: - 3\r\nContent-Transfer-Encoding: binary\r\n\r\nDELETE /fs2a8621787/dir1? HTTP/1.1\r\nx-ms-date: - Thu, 02 Jun 2022 22:50:45 GMT\r\nx-ms-client-request-id: 7068f117-e2c6-11ec-b4e1-4851c58829e0\r\r\nContent-Length: - 0\r\n\r\n\r\n--batch_7068a476-e2c6-11ec-986b-4851c58829e0\r\nContent-Type: application/http\r\nContent-ID: - 4\r\nContent-Transfer-Encoding: binary\r\n\r\nDELETE /fs2a8621787/dir8? HTTP/1.1\r\nx-ms-date: - Thu, 02 Jun 2022 22:50:45 GMT\r\nx-ms-client-request-id: 70691b56-e2c6-11ec-8fab-4851c58829e0\r\r\nContent-Length: - 0\r\n\r\n\r\n--batch_7068a476-e2c6-11ec-986b-4851c58829e0--\r\n" - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '1946' - Content-Type: - - multipart/mixed; boundary=batch_7068a476-e2c6-11ec-986b-4851c58829e0 - User-Agent: - - azsdk-python-storage-dfs/12.8.0b1 Python/3.10.2 (Windows-10-10.0.19044-SP0) - x-ms-date: - - Thu, 02 Jun 2022 22:50:45 GMT - x-ms-version: - - '2021-08-06' - method: POST - uri: https://storagename.blob.core.windows.net/fs2a8621787?restype=container&comp=batch - response: - body: - string: "--batchresponse_17796a07-cb06-4d65-9d79-aa0f8c6b6a8f\r\nContent-Type: - application/http\r\nContent-ID: 0\r\n\r\nHTTP/1.1 202 Accepted\r\nx-ms-delete-type-permanent: - true\r\nx-ms-request-id: 446a0760-701e-00c2-0dd3-76dc071ea5a1\r\nx-ms-version: - 2021-08-06\r\nx-ms-client-request-id: 7068f114-e2c6-11ec-980f-4851c58829e0\r\nServer: - Windows-Azure-Blob/1.0\r\n\r\n--batchresponse_17796a07-cb06-4d65-9d79-aa0f8c6b6a8f\r\nContent-Type: - application/http\r\nContent-ID: 1\r\n\r\nHTTP/1.1 202 Accepted\r\nx-ms-delete-type-permanent: - true\r\nx-ms-request-id: 446a0760-701e-00c2-0dd3-76dc071ea5a3\r\nx-ms-version: - 2021-08-06\r\nx-ms-client-request-id: 7068f115-e2c6-11ec-b3eb-4851c58829e0\r\nServer: - Windows-Azure-Blob/1.0\r\n\r\n--batchresponse_17796a07-cb06-4d65-9d79-aa0f8c6b6a8f\r\nContent-Type: - application/http\r\nContent-ID: 2\r\n\r\nHTTP/1.1 202 Accepted\r\nx-ms-delete-type-permanent: - true\r\nx-ms-request-id: 446a0760-701e-00c2-0dd3-76dc071ea5a4\r\nx-ms-version: - 2021-08-06\r\nx-ms-client-request-id: 7068f116-e2c6-11ec-852c-4851c58829e0\r\nServer: - Windows-Azure-Blob/1.0\r\n\r\n--batchresponse_17796a07-cb06-4d65-9d79-aa0f8c6b6a8f\r\nContent-Type: - application/http\r\nContent-ID: 3\r\n\r\nHTTP/1.1 409 The directory involved - in this operation is not empty\r\nx-ms-error-code: DirectoryNotEmpty\r\nx-ms-request-id: - 446a0760-701e-00c2-0dd3-76dc071ea5a5\r\nx-ms-version: 2021-08-06\r\nx-ms-client-request-id: - 7068f117-e2c6-11ec-b4e1-4851c58829e0\r\nContent-Length: 240\r\nContent-Type: - application/xml\r\nServer: Windows-Azure-Blob/1.0\r\n\r\n\uFEFF\nDirectoryNotEmptyThe directory - involved in this operation is not empty\nRequestId:446a0760-701e-00c2-0dd3-76dc071ea5a5\nTime:2022-06-02T22:50:45.1359939Z\r\n--batchresponse_17796a07-cb06-4d65-9d79-aa0f8c6b6a8f\r\nContent-Type: - application/http\r\nContent-ID: 4\r\n\r\nHTTP/1.1 404 The specified blob does - not exist.\r\nx-ms-error-code: BlobNotFound\r\nx-ms-request-id: 446a0760-701e-00c2-0dd3-76dc071ea5a6\r\nx-ms-version: - 2021-08-06\r\nx-ms-client-request-id: 70691b56-e2c6-11ec-8fab-4851c58829e0\r\nContent-Length: - 216\r\nContent-Type: application/xml\r\nServer: Windows-Azure-Blob/1.0\r\n\r\n\uFEFF\nBlobNotFoundThe - specified blob does not exist.\nRequestId:446a0760-701e-00c2-0dd3-76dc071ea5a6\nTime:2022-06-02T22:50:45.1439887Z\r\n--batchresponse_17796a07-cb06-4d65-9d79-aa0f8c6b6a8f--" - headers: - content-type: - - multipart/mixed; boundary=batchresponse_17796a07-cb06-4d65-9d79-aa0f8c6b6a8f - date: - - Thu, 02 Jun 2022 22:50:44 GMT - server: - - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 - transfer-encoding: - - chunked - x-ms-version: - - '2021-08-06' - status: - code: 202 - message: Accepted -- request: - body: null - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - azsdk-python-storage-dfs/12.8.0b1 Python/3.10.2 (Windows-10-10.0.19044-SP0) - x-ms-date: - - Thu, 02 Jun 2022 22:50:45 GMT - x-ms-version: - - '2021-08-06' - method: DELETE - uri: https://storagename.blob.core.windows.net/fs2a8621787?restype=container - response: - body: - string: '' - headers: - content-length: - - '0' - date: - - Thu, 02 Jun 2022 22:50:45 GMT - server: - - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 - x-ms-version: - - '2021-08-06' - status: - code: 202 - message: Accepted -version: 1 diff --git a/sdk/storage/azure-storage-file-datalake/tests/recordings/test_file_system.test_serialized_error.yaml b/sdk/storage/azure-storage-file-datalake/tests/recordings/test_file_system.test_serialized_error.yaml deleted file mode 100644 index 935cd8cdad44..000000000000 --- a/sdk/storage/azure-storage-file-datalake/tests/recordings/test_file_system.test_serialized_error.yaml +++ /dev/null @@ -1,189 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - azsdk-python-storage-dfs/12.7.0b1 Python/3.10.2 (Windows-10-10.0.19044-SP0) - x-ms-date: - - Fri, 15 Apr 2022 21:17:58 GMT - x-ms-version: - - '2021-06-08' - method: PUT - uri: https://storagename.blob.core.windows.net/filesystem335c0fc6?restype=container - response: - body: - string: '' - headers: - content-length: - - '0' - date: - - Fri, 15 Apr 2022 21:17:57 GMT - etag: - - '"0x8DA1F2569BE1133"' - last-modified: - - Fri, 15 Apr 2022 21:17:57 GMT - server: - - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 - x-ms-version: - - '2021-06-08' - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - azsdk-python-storage-dfs/12.7.0b1 Python/3.10.2 (Windows-10-10.0.19044-SP0) - x-ms-date: - - Fri, 15 Apr 2022 21:17:58 GMT - x-ms-version: - - '2021-06-08' - method: PUT - uri: https://storagename.dfs.core.windows.net/filesystem335c0fc6/dir1?resource=directory - response: - body: - string: '' - headers: - content-length: - - '0' - date: - - Fri, 15 Apr 2022 21:17:57 GMT - etag: - - '"0x8DA1F256A3A035A"' - last-modified: - - Fri, 15 Apr 2022 21:17:58 GMT - server: - - Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-server-encrypted: - - 'true' - x-ms-version: - - '2021-06-08' - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - azsdk-python-storage-dfs/12.7.0b1 Python/3.10.2 (Windows-10-10.0.19044-SP0) - x-ms-date: - - Fri, 15 Apr 2022 21:17:59 GMT - x-ms-version: - - '2021-06-08' - method: DELETE - uri: https://storagename.dfs.core.windows.net/filesystem335c0fc6/dir1?recursive=true - response: - body: - string: '' - headers: - content-length: - - '0' - date: - - Fri, 15 Apr 2022 21:17:57 GMT - server: - - Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 - x-ms-delete-type-permanent: - - 'true' - x-ms-version: - - '2021-06-08' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - azsdk-python-storage-dfs/12.7.0b1 Python/3.10.2 (Windows-10-10.0.19044-SP0) - x-ms-date: - - Fri, 15 Apr 2022 21:17:59 GMT - x-ms-version: - - '2021-06-08' - method: DELETE - uri: https://storagename.dfs.core.windows.net/filesystem335c0fc6/dir1?recursive=true - response: - body: - string: '{"error":{"code":"PathNotFound","message":"The specified path does - not exist.\nRequestId:65b8ed96-701f-0001-620e-51851e000000\nTime:2022-04-15T21:17:58.4834841Z"}}' - headers: - content-length: - - '163' - content-type: - - application/json;charset=utf-8 - date: - - Fri, 15 Apr 2022 21:17:57 GMT - server: - - Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 - x-ms-error-code: - - PathNotFound - x-ms-version: - - '2021-06-08' - status: - code: 404 - message: The specified path does not exist. -- request: - body: null - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - azsdk-python-storage-dfs/12.7.0b1 Python/3.10.2 (Windows-10-10.0.19044-SP0) - x-ms-date: - - Fri, 15 Apr 2022 21:17:59 GMT - x-ms-version: - - '2021-06-08' - method: DELETE - uri: https://storagename.blob.core.windows.net/filesystem335c0fc6?restype=container - response: - body: - string: '' - headers: - content-length: - - '0' - date: - - Fri, 15 Apr 2022 21:17:58 GMT - server: - - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 - x-ms-version: - - '2021-06-08' - status: - code: 202 - message: Accepted -version: 1 diff --git a/sdk/storage/azure-storage-file-datalake/tests/recordings/test_file_system_async.test_delete_files_simple_no_raise.yaml b/sdk/storage/azure-storage-file-datalake/tests/recordings/test_file_system_async.test_delete_files_simple_no_raise.yaml deleted file mode 100644 index 7c262c300208..000000000000 --- a/sdk/storage/azure-storage-file-datalake/tests/recordings/test_file_system_async.test_delete_files_simple_no_raise.yaml +++ /dev/null @@ -1,436 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/xml - User-Agent: - - azsdk-python-storage-dfs/12.8.0b1 Python/3.10.2 (Windows-10-10.0.19044-SP0) - x-ms-date: - - Thu, 02 Jun 2022 23:38:55 GMT - x-ms-version: - - '2021-08-06' - method: PUT - uri: https://storagename.blob.core.windows.net/fs2932d170b?restype=container - response: - body: - string: '' - headers: - content-length: '0' - date: Thu, 02 Jun 2022 23:38:54 GMT - etag: '"0x8DA44F10EA01B3C"' - last-modified: Thu, 02 Jun 2022 23:38:54 GMT - server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 - x-ms-version: '2021-08-06' - status: - code: 201 - message: Created - url: https://vincenttranhns.blob.core.windows.net/fs2932d170b?restype=container -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-storage-dfs/12.8.0b1 Python/3.10.2 (Windows-10-10.0.19044-SP0) - x-ms-date: - - Thu, 02 Jun 2022 23:38:55 GMT - x-ms-version: - - '2021-08-06' - method: PUT - uri: https://storagename.dfs.core.windows.net/fs2932d170b/file1?resource=file - response: - body: - string: '' - headers: - content-length: '0' - date: Thu, 02 Jun 2022 23:38:54 GMT - etag: '"0x8DA44F10EEA201F"' - last-modified: Thu, 02 Jun 2022 23:38:55 GMT - server: Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-server-encrypted: 'true' - x-ms-version: '2021-08-06' - status: - code: 201 - message: Created - url: https://vincenttranhns.dfs.core.windows.net/fs2932d170b/file1?resource=file -- request: - body: hello world - headers: - Accept: - - application/json - Content-Length: - - '11' - Content-Type: - - application/json - User-Agent: - - azsdk-python-storage-dfs/12.8.0b1 Python/3.10.2 (Windows-10-10.0.19044-SP0) - x-ms-date: - - Thu, 02 Jun 2022 23:38:56 GMT - x-ms-version: - - '2021-08-06' - method: PATCH - uri: https://storagename.dfs.core.windows.net/fs2932d170b/file1?action=append&position=0 - response: - body: - string: '' - headers: - content-length: '0' - date: Thu, 02 Jun 2022 23:38:54 GMT - server: Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-server-encrypted: 'true' - x-ms-version: '2021-08-06' - status: - code: 202 - message: Accepted - url: https://vincenttranhns.dfs.core.windows.net/fs2932d170b/file1?action=append&position=0 -- request: - body: null - headers: - Accept: - - application/json - If-Match: - - '"0x8DA44F10EEA201F"' - User-Agent: - - azsdk-python-storage-dfs/12.8.0b1 Python/3.10.2 (Windows-10-10.0.19044-SP0) - x-ms-date: - - Thu, 02 Jun 2022 23:38:56 GMT - x-ms-version: - - '2021-08-06' - method: PATCH - uri: https://storagename.dfs.core.windows.net/fs2932d170b/file1?action=flush&position=11&close=true - response: - body: - string: '' - headers: - content-length: '0' - date: Thu, 02 Jun 2022 23:38:54 GMT - etag: '"0x8DA44F10F0240E2"' - last-modified: Thu, 02 Jun 2022 23:38:55 GMT - server: Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-server-encrypted: 'false' - x-ms-version: '2021-08-06' - status: - code: 200 - message: OK - url: https://vincenttranhns.dfs.core.windows.net/fs2932d170b/file1?action=flush&position=11&close=true -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-storage-dfs/12.8.0b1 Python/3.10.2 (Windows-10-10.0.19044-SP0) - x-ms-date: - - Thu, 02 Jun 2022 23:38:56 GMT - x-ms-version: - - '2021-08-06' - method: PUT - uri: https://storagename.dfs.core.windows.net/fs2932d170b/file2?resource=file - response: - body: - string: '' - headers: - content-length: '0' - date: Thu, 02 Jun 2022 23:38:54 GMT - etag: '"0x8DA44F10F0D4613"' - last-modified: Thu, 02 Jun 2022 23:38:55 GMT - server: Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-server-encrypted: 'true' - x-ms-version: '2021-08-06' - status: - code: 201 - message: Created - url: https://vincenttranhns.dfs.core.windows.net/fs2932d170b/file2?resource=file -- request: - body: hello world - headers: - Accept: - - application/json - Content-Length: - - '11' - Content-Type: - - application/json - User-Agent: - - azsdk-python-storage-dfs/12.8.0b1 Python/3.10.2 (Windows-10-10.0.19044-SP0) - x-ms-date: - - Thu, 02 Jun 2022 23:38:56 GMT - x-ms-version: - - '2021-08-06' - method: PATCH - uri: https://storagename.dfs.core.windows.net/fs2932d170b/file2?action=append&position=0 - response: - body: - string: '' - headers: - content-length: '0' - date: Thu, 02 Jun 2022 23:38:54 GMT - server: Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-server-encrypted: 'true' - x-ms-version: '2021-08-06' - status: - code: 202 - message: Accepted - url: https://vincenttranhns.dfs.core.windows.net/fs2932d170b/file2?action=append&position=0 -- request: - body: null - headers: - Accept: - - application/json - If-Match: - - '"0x8DA44F10F0D4613"' - User-Agent: - - azsdk-python-storage-dfs/12.8.0b1 Python/3.10.2 (Windows-10-10.0.19044-SP0) - x-ms-date: - - Thu, 02 Jun 2022 23:38:56 GMT - x-ms-version: - - '2021-08-06' - method: PATCH - uri: https://storagename.dfs.core.windows.net/fs2932d170b/file2?action=flush&position=11&close=true - response: - body: - string: '' - headers: - content-length: '0' - date: Thu, 02 Jun 2022 23:38:54 GMT - etag: '"0x8DA44F10F2232FF"' - last-modified: Thu, 02 Jun 2022 23:38:55 GMT - server: Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-server-encrypted: 'false' - x-ms-version: '2021-08-06' - status: - code: 200 - message: OK - url: https://vincenttranhns.dfs.core.windows.net/fs2932d170b/file2?action=flush&position=11&close=true -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-storage-dfs/12.8.0b1 Python/3.10.2 (Windows-10-10.0.19044-SP0) - x-ms-date: - - Thu, 02 Jun 2022 23:38:56 GMT - x-ms-version: - - '2021-08-06' - method: PUT - uri: https://storagename.dfs.core.windows.net/fs2932d170b/file3?resource=file - response: - body: - string: '' - headers: - content-length: '0' - date: Thu, 02 Jun 2022 23:38:54 GMT - etag: '"0x8DA44F10F2BB435"' - last-modified: Thu, 02 Jun 2022 23:38:55 GMT - server: Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-server-encrypted: 'true' - x-ms-version: '2021-08-06' - status: - code: 201 - message: Created - url: https://vincenttranhns.dfs.core.windows.net/fs2932d170b/file3?resource=file -- request: - body: hello world - headers: - Accept: - - application/json - Content-Length: - - '11' - Content-Type: - - application/json - User-Agent: - - azsdk-python-storage-dfs/12.8.0b1 Python/3.10.2 (Windows-10-10.0.19044-SP0) - x-ms-date: - - Thu, 02 Jun 2022 23:38:56 GMT - x-ms-version: - - '2021-08-06' - method: PATCH - uri: https://storagename.dfs.core.windows.net/fs2932d170b/file3?action=append&position=0 - response: - body: - string: '' - headers: - content-length: '0' - date: Thu, 02 Jun 2022 23:38:54 GMT - server: Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-server-encrypted: 'true' - x-ms-version: '2021-08-06' - status: - code: 202 - message: Accepted - url: https://vincenttranhns.dfs.core.windows.net/fs2932d170b/file3?action=append&position=0 -- request: - body: null - headers: - Accept: - - application/json - If-Match: - - '"0x8DA44F10F2BB435"' - User-Agent: - - azsdk-python-storage-dfs/12.8.0b1 Python/3.10.2 (Windows-10-10.0.19044-SP0) - x-ms-date: - - Thu, 02 Jun 2022 23:38:56 GMT - x-ms-version: - - '2021-08-06' - method: PATCH - uri: https://storagename.dfs.core.windows.net/fs2932d170b/file3?action=flush&position=11&close=true - response: - body: - string: '' - headers: - content-length: '0' - date: Thu, 02 Jun 2022 23:38:55 GMT - etag: '"0x8DA44F10F415124"' - last-modified: Thu, 02 Jun 2022 23:38:56 GMT - server: Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-server-encrypted: 'false' - x-ms-version: '2021-08-06' - status: - code: 200 - message: OK - url: https://vincenttranhns.dfs.core.windows.net/fs2932d170b/file3?action=flush&position=11&close=true -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-storage-dfs/12.8.0b1 Python/3.10.2 (Windows-10-10.0.19044-SP0) - x-ms-date: - - Thu, 02 Jun 2022 23:38:56 GMT - x-ms-version: - - '2021-08-06' - method: PUT - uri: https://storagename.dfs.core.windows.net/fs2932d170b/dir1?resource=directory - response: - body: - string: '' - headers: - content-length: '0' - date: Thu, 02 Jun 2022 23:38:55 GMT - etag: '"0x8DA44F10F4A55EA"' - last-modified: Thu, 02 Jun 2022 23:38:56 GMT - server: Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-server-encrypted: 'true' - x-ms-version: '2021-08-06' - status: - code: 201 - message: Created - url: https://vincenttranhns.dfs.core.windows.net/fs2932d170b/dir1?resource=directory -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-storage-dfs/12.8.0b1 Python/3.10.2 (Windows-10-10.0.19044-SP0) - x-ms-date: - - Thu, 02 Jun 2022 23:38:56 GMT - x-ms-version: - - '2021-08-06' - method: PUT - uri: https://storagename.dfs.core.windows.net/fs2932d170b/dir2?resource=directory - response: - body: - string: '' - headers: - content-length: '0' - date: Thu, 02 Jun 2022 23:38:55 GMT - etag: '"0x8DA44F10F533476"' - last-modified: Thu, 02 Jun 2022 23:38:56 GMT - server: Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-server-encrypted: 'true' - x-ms-version: '2021-08-06' - status: - code: 201 - message: Created - url: https://vincenttranhns.dfs.core.windows.net/fs2932d170b/dir2?resource=directory -- request: - body: "--===============1178193531367231645==\r\nContent-Type: application/http\r\nContent-Transfer-Encoding: - binary\r\nContent-ID: 0\r\n\r\nDELETE /fs2932d170b/file1? HTTP/1.1\r\nx-ms-date: - Thu, 02 Jun 2022 23:38:56 GMT\r\nx-ms-client-request-id: 2b9cc30f-e2cd-11ec-8037-4851c58829e0\r\r\n\r\n\r\n--===============1178193531367231645==\r\nContent-Type: - application/http\r\nContent-Transfer-Encoding: binary\r\nContent-ID: 1\r\n\r\nDELETE - /fs2932d170b/file2? HTTP/1.1\r\nx-ms-date: Thu, 02 Jun 2022 23:38:56 GMT\r\nx-ms-client-request-id: - 2b9cc310-e2cd-11ec-bd17-4851c58829e0\r\r\n\r\n\r\n--===============1178193531367231645==\r\nContent-Type: - application/http\r\nContent-Transfer-Encoding: binary\r\nContent-ID: 2\r\n\r\nDELETE - /fs2932d170b/file3? HTTP/1.1\r\nx-ms-date: Thu, 02 Jun 2022 23:38:56 GMT\r\nx-ms-client-request-id: - 2b9ce90c-e2cd-11ec-a8ba-4851c58829e0\r\r\n\r\n\r\n--===============1178193531367231645==\r\nContent-Type: - application/http\r\nContent-Transfer-Encoding: binary\r\nContent-ID: 3\r\n\r\nDELETE - /fs2932d170b/dir1? HTTP/1.1\r\nx-ms-date: Thu, 02 Jun 2022 23:38:56 GMT\r\nx-ms-client-request-id: - 2b9ce90d-e2cd-11ec-997c-4851c58829e0\r\r\n\r\n\r\n--===============1178193531367231645==\r\nContent-Type: - application/http\r\nContent-Transfer-Encoding: binary\r\nContent-ID: 4\r\n\r\nDELETE - /fs2932d170b/dir2? HTTP/1.1\r\nx-ms-date: Thu, 02 Jun 2022 23:38:56 GMT\r\nx-ms-client-request-id: - 2b9ce90e-e2cd-11ec-9809-4851c58829e0\r\r\n\r\n\r\n--===============1178193531367231645==--\r\n" - headers: - Content-Length: - - '1815' - Content-Type: - - multipart/mixed; boundary================1178193531367231645== - User-Agent: - - azsdk-python-storage-dfs/12.8.0b1 Python/3.10.2 (Windows-10-10.0.19044-SP0) - x-ms-date: - - Thu, 02 Jun 2022 23:38:57 GMT - x-ms-version: - - '2021-08-06' - method: POST - uri: https://storagename.blob.core.windows.net/fs2932d170b?restype=container&comp=batch - response: - body: - string: "--batchresponse_cb90658f-da0e-4c9f-b2c6-60ac5f5004e5\r\nContent-Type: - application/http\r\nContent-ID: 0\r\n\r\nHTTP/1.1 202 Accepted\r\nx-ms-delete-type-permanent: - true\r\nx-ms-request-id: 40ce4e7b-401e-010d-23d9-76ac581eb91d\r\nx-ms-version: - 2021-08-06\r\nx-ms-client-request-id: 2b9cc30f-e2cd-11ec-8037-4851c58829e0\r\nServer: - Windows-Azure-Blob/1.0\r\n\r\n--batchresponse_cb90658f-da0e-4c9f-b2c6-60ac5f5004e5\r\nContent-Type: - application/http\r\nContent-ID: 1\r\n\r\nHTTP/1.1 202 Accepted\r\nx-ms-delete-type-permanent: - true\r\nx-ms-request-id: 40ce4e7b-401e-010d-23d9-76ac581eb91f\r\nx-ms-version: - 2021-08-06\r\nx-ms-client-request-id: 2b9cc310-e2cd-11ec-bd17-4851c58829e0\r\nServer: - Windows-Azure-Blob/1.0\r\n\r\n--batchresponse_cb90658f-da0e-4c9f-b2c6-60ac5f5004e5\r\nContent-Type: - application/http\r\nContent-ID: 2\r\n\r\nHTTP/1.1 202 Accepted\r\nx-ms-delete-type-permanent: - true\r\nx-ms-request-id: 40ce4e7b-401e-010d-23d9-76ac581eb920\r\nx-ms-version: - 2021-08-06\r\nx-ms-client-request-id: 2b9ce90c-e2cd-11ec-a8ba-4851c58829e0\r\nServer: - Windows-Azure-Blob/1.0\r\n\r\n--batchresponse_cb90658f-da0e-4c9f-b2c6-60ac5f5004e5\r\nContent-Type: - application/http\r\nContent-ID: 3\r\n\r\nHTTP/1.1 202 Accepted\r\nx-ms-delete-type-permanent: - true\r\nx-ms-request-id: 40ce4e7b-401e-010d-23d9-76ac581eb921\r\nx-ms-version: - 2021-08-06\r\nx-ms-client-request-id: 2b9ce90d-e2cd-11ec-997c-4851c58829e0\r\nServer: - Windows-Azure-Blob/1.0\r\n\r\n--batchresponse_cb90658f-da0e-4c9f-b2c6-60ac5f5004e5\r\nContent-Type: - application/http\r\nContent-ID: 4\r\n\r\nHTTP/1.1 202 Accepted\r\nx-ms-delete-type-permanent: - true\r\nx-ms-request-id: 40ce4e7b-401e-010d-23d9-76ac581eb922\r\nx-ms-version: - 2021-08-06\r\nx-ms-client-request-id: 2b9ce90e-e2cd-11ec-9809-4851c58829e0\r\nServer: - Windows-Azure-Blob/1.0\r\n\r\n--batchresponse_cb90658f-da0e-4c9f-b2c6-60ac5f5004e5--" - headers: - content-type: multipart/mixed; boundary=batchresponse_cb90658f-da0e-4c9f-b2c6-60ac5f5004e5 - date: Thu, 02 Jun 2022 23:38:55 GMT - server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 - transfer-encoding: chunked - x-ms-version: '2021-08-06' - status: - code: 202 - message: Accepted - url: https://vincenttranhns.blob.core.windows.net/fs2932d170b?restype=container&comp=batch -- request: - body: null - headers: - Accept: - - application/xml - User-Agent: - - azsdk-python-storage-dfs/12.8.0b1 Python/3.10.2 (Windows-10-10.0.19044-SP0) - x-ms-date: - - Thu, 02 Jun 2022 23:38:57 GMT - x-ms-version: - - '2021-08-06' - method: DELETE - uri: https://storagename.blob.core.windows.net/fs2932d170b?restype=container - response: - body: - string: '' - headers: - content-length: '0' - date: Thu, 02 Jun 2022 23:38:55 GMT - server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 - x-ms-version: '2021-08-06' - status: - code: 202 - message: Accepted - url: https://vincenttranhns.blob.core.windows.net/fs2932d170b?restype=container -version: 1 diff --git a/sdk/storage/azure-storage-file-datalake/tests/recordings/test_file_system_async.test_delete_files_with_failed_subrequest.yaml b/sdk/storage/azure-storage-file-datalake/tests/recordings/test_file_system_async.test_delete_files_with_failed_subrequest.yaml deleted file mode 100644 index 981bac7e0fac..000000000000 --- a/sdk/storage/azure-storage-file-datalake/tests/recordings/test_file_system_async.test_delete_files_with_failed_subrequest.yaml +++ /dev/null @@ -1,413 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/xml - User-Agent: - - azsdk-python-storage-dfs/12.8.0b1 Python/3.10.2 (Windows-10-10.0.19044-SP0) - x-ms-date: - - Thu, 02 Jun 2022 23:39:12 GMT - x-ms-version: - - '2021-08-06' - method: PUT - uri: https://storagename.blob.core.windows.net/fs13fa31a04?restype=container - response: - body: - string: '' - headers: - content-length: '0' - date: Thu, 02 Jun 2022 23:39:11 GMT - etag: '"0x8DA44F11882CBFA"' - last-modified: Thu, 02 Jun 2022 23:39:11 GMT - server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 - x-ms-version: '2021-08-06' - status: - code: 201 - message: Created - url: https://vincenttranhns.blob.core.windows.net/fs13fa31a04?restype=container -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-storage-dfs/12.8.0b1 Python/3.10.2 (Windows-10-10.0.19044-SP0) - x-ms-date: - - Thu, 02 Jun 2022 23:39:12 GMT - x-ms-version: - - '2021-08-06' - method: PUT - uri: https://storagename.dfs.core.windows.net/fs13fa31a04/file1?resource=file - response: - body: - string: '' - headers: - content-length: '0' - date: Thu, 02 Jun 2022 23:39:11 GMT - etag: '"0x8DA44F118B6F12F"' - last-modified: Thu, 02 Jun 2022 23:39:11 GMT - server: Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-server-encrypted: 'true' - x-ms-version: '2021-08-06' - status: - code: 201 - message: Created - url: https://vincenttranhns.dfs.core.windows.net/fs13fa31a04/file1?resource=file -- request: - body: hello world - headers: - Accept: - - application/json - Content-Length: - - '11' - Content-Type: - - application/json - User-Agent: - - azsdk-python-storage-dfs/12.8.0b1 Python/3.10.2 (Windows-10-10.0.19044-SP0) - x-ms-date: - - Thu, 02 Jun 2022 23:39:12 GMT - x-ms-version: - - '2021-08-06' - method: PATCH - uri: https://storagename.dfs.core.windows.net/fs13fa31a04/file1?action=append&position=0 - response: - body: - string: '' - headers: - content-length: '0' - date: Thu, 02 Jun 2022 23:39:11 GMT - server: Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-server-encrypted: 'true' - x-ms-version: '2021-08-06' - status: - code: 202 - message: Accepted - url: https://vincenttranhns.dfs.core.windows.net/fs13fa31a04/file1?action=append&position=0 -- request: - body: null - headers: - Accept: - - application/json - If-Match: - - '"0x8DA44F118B6F12F"' - User-Agent: - - azsdk-python-storage-dfs/12.8.0b1 Python/3.10.2 (Windows-10-10.0.19044-SP0) - x-ms-date: - - Thu, 02 Jun 2022 23:39:12 GMT - x-ms-version: - - '2021-08-06' - method: PATCH - uri: https://storagename.dfs.core.windows.net/fs13fa31a04/file1?action=flush&position=11&close=true - response: - body: - string: '' - headers: - content-length: '0' - date: Thu, 02 Jun 2022 23:39:11 GMT - etag: '"0x8DA44F118CDBCF9"' - last-modified: Thu, 02 Jun 2022 23:39:12 GMT - server: Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-server-encrypted: 'false' - x-ms-version: '2021-08-06' - status: - code: 200 - message: OK - url: https://vincenttranhns.dfs.core.windows.net/fs13fa31a04/file1?action=flush&position=11&close=true -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-storage-dfs/12.8.0b1 Python/3.10.2 (Windows-10-10.0.19044-SP0) - x-ms-date: - - Thu, 02 Jun 2022 23:39:12 GMT - x-ms-version: - - '2021-08-06' - method: PUT - uri: https://storagename.dfs.core.windows.net/fs13fa31a04/file2?resource=file - response: - body: - string: '' - headers: - content-length: '0' - date: Thu, 02 Jun 2022 23:39:11 GMT - etag: '"0x8DA44F118D8339C"' - last-modified: Thu, 02 Jun 2022 23:39:12 GMT - server: Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-server-encrypted: 'true' - x-ms-version: '2021-08-06' - status: - code: 201 - message: Created - url: https://vincenttranhns.dfs.core.windows.net/fs13fa31a04/file2?resource=file -- request: - body: hello world - headers: - Accept: - - application/json - Content-Length: - - '11' - Content-Type: - - application/json - User-Agent: - - azsdk-python-storage-dfs/12.8.0b1 Python/3.10.2 (Windows-10-10.0.19044-SP0) - x-ms-date: - - Thu, 02 Jun 2022 23:39:12 GMT - x-ms-version: - - '2021-08-06' - method: PATCH - uri: https://storagename.dfs.core.windows.net/fs13fa31a04/file2?action=append&position=0 - response: - body: - string: '' - headers: - content-length: '0' - date: Thu, 02 Jun 2022 23:39:11 GMT - server: Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-server-encrypted: 'true' - x-ms-version: '2021-08-06' - status: - code: 202 - message: Accepted - url: https://vincenttranhns.dfs.core.windows.net/fs13fa31a04/file2?action=append&position=0 -- request: - body: null - headers: - Accept: - - application/json - If-Match: - - '"0x8DA44F118D8339C"' - User-Agent: - - azsdk-python-storage-dfs/12.8.0b1 Python/3.10.2 (Windows-10-10.0.19044-SP0) - x-ms-date: - - Thu, 02 Jun 2022 23:39:12 GMT - x-ms-version: - - '2021-08-06' - method: PATCH - uri: https://storagename.dfs.core.windows.net/fs13fa31a04/file2?action=flush&position=11&close=true - response: - body: - string: '' - headers: - content-length: '0' - date: Thu, 02 Jun 2022 23:39:11 GMT - etag: '"0x8DA44F118EE59BF"' - last-modified: Thu, 02 Jun 2022 23:39:12 GMT - server: Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-server-encrypted: 'false' - x-ms-version: '2021-08-06' - status: - code: 200 - message: OK - url: https://vincenttranhns.dfs.core.windows.net/fs13fa31a04/file2?action=flush&position=11&close=true -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-storage-dfs/12.8.0b1 Python/3.10.2 (Windows-10-10.0.19044-SP0) - x-ms-date: - - Thu, 02 Jun 2022 23:39:13 GMT - x-ms-version: - - '2021-08-06' - method: PUT - uri: https://storagename.dfs.core.windows.net/fs13fa31a04/file3?resource=file - response: - body: - string: '' - headers: - content-length: '0' - date: Thu, 02 Jun 2022 23:39:12 GMT - etag: '"0x8DA44F118F93EBC"' - last-modified: Thu, 02 Jun 2022 23:39:12 GMT - server: Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-server-encrypted: 'true' - x-ms-version: '2021-08-06' - status: - code: 201 - message: Created - url: https://vincenttranhns.dfs.core.windows.net/fs13fa31a04/file3?resource=file -- request: - body: hello world - headers: - Accept: - - application/json - Content-Length: - - '11' - Content-Type: - - application/json - User-Agent: - - azsdk-python-storage-dfs/12.8.0b1 Python/3.10.2 (Windows-10-10.0.19044-SP0) - x-ms-date: - - Thu, 02 Jun 2022 23:39:13 GMT - x-ms-version: - - '2021-08-06' - method: PATCH - uri: https://storagename.dfs.core.windows.net/fs13fa31a04/file3?action=append&position=0 - response: - body: - string: '' - headers: - content-length: '0' - date: Thu, 02 Jun 2022 23:39:12 GMT - server: Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-server-encrypted: 'true' - x-ms-version: '2021-08-06' - status: - code: 202 - message: Accepted - url: https://vincenttranhns.dfs.core.windows.net/fs13fa31a04/file3?action=append&position=0 -- request: - body: null - headers: - Accept: - - application/json - If-Match: - - '"0x8DA44F118F93EBC"' - User-Agent: - - azsdk-python-storage-dfs/12.8.0b1 Python/3.10.2 (Windows-10-10.0.19044-SP0) - x-ms-date: - - Thu, 02 Jun 2022 23:39:13 GMT - x-ms-version: - - '2021-08-06' - method: PATCH - uri: https://storagename.dfs.core.windows.net/fs13fa31a04/file3?action=flush&position=11&close=true - response: - body: - string: '' - headers: - content-length: '0' - date: Thu, 02 Jun 2022 23:39:12 GMT - etag: '"0x8DA44F1190E8474"' - last-modified: Thu, 02 Jun 2022 23:39:12 GMT - server: Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-server-encrypted: 'false' - x-ms-version: '2021-08-06' - status: - code: 200 - message: OK - url: https://vincenttranhns.dfs.core.windows.net/fs13fa31a04/file3?action=flush&position=11&close=true -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-storage-dfs/12.8.0b1 Python/3.10.2 (Windows-10-10.0.19044-SP0) - x-ms-date: - - Thu, 02 Jun 2022 23:39:13 GMT - x-ms-version: - - '2021-08-06' - method: PUT - uri: https://storagename.dfs.core.windows.net/fs13fa31a04/dir1%2Ffile4?resource=file - response: - body: - string: '' - headers: - content-length: '0' - date: Thu, 02 Jun 2022 23:39:12 GMT - etag: '"0x8DA44F1191E30DA"' - last-modified: Thu, 02 Jun 2022 23:39:12 GMT - server: Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-server-encrypted: 'true' - x-ms-version: '2021-08-06' - status: - code: 201 - message: Created - url: https://vincenttranhns.dfs.core.windows.net/fs13fa31a04/dir1%2Ffile4?resource=file -- request: - body: "--===============0773684347739619427==\r\nContent-Type: application/http\r\nContent-Transfer-Encoding: - binary\r\nContent-ID: 0\r\n\r\nDELETE /fs13fa31a04/file1? HTTP/1.1\r\nx-ms-date: - Thu, 02 Jun 2022 23:39:13 GMT\r\nx-ms-client-request-id: 3568ae85-e2cd-11ec-8f4e-4851c58829e0\r\r\n\r\n\r\n--===============0773684347739619427==\r\nContent-Type: - application/http\r\nContent-Transfer-Encoding: binary\r\nContent-ID: 1\r\n\r\nDELETE - /fs13fa31a04/file2? HTTP/1.1\r\nx-ms-date: Thu, 02 Jun 2022 23:39:13 GMT\r\nx-ms-client-request-id: - 3568d54d-e2cd-11ec-810c-4851c58829e0\r\r\n\r\n\r\n--===============0773684347739619427==\r\nContent-Type: - application/http\r\nContent-Transfer-Encoding: binary\r\nContent-ID: 2\r\n\r\nDELETE - /fs13fa31a04/file3? HTTP/1.1\r\nx-ms-date: Thu, 02 Jun 2022 23:39:13 GMT\r\nx-ms-client-request-id: - 3568d54e-e2cd-11ec-9ae6-4851c58829e0\r\r\n\r\n\r\n--===============0773684347739619427==\r\nContent-Type: - application/http\r\nContent-Transfer-Encoding: binary\r\nContent-ID: 3\r\n\r\nDELETE - /fs13fa31a04/dir1? HTTP/1.1\r\nx-ms-date: Thu, 02 Jun 2022 23:39:13 GMT\r\nx-ms-client-request-id: - 3568d54f-e2cd-11ec-9eb2-4851c58829e0\r\r\n\r\n\r\n--===============0773684347739619427==\r\nContent-Type: - application/http\r\nContent-Transfer-Encoding: binary\r\nContent-ID: 4\r\n\r\nDELETE - /fs13fa31a04/dir8? HTTP/1.1\r\nx-ms-date: Thu, 02 Jun 2022 23:39:13 GMT\r\nx-ms-client-request-id: - 3568d550-e2cd-11ec-9150-4851c58829e0\r\r\n\r\n\r\n--===============0773684347739619427==--\r\n" - headers: - Content-Length: - - '1815' - Content-Type: - - multipart/mixed; boundary================0773684347739619427== - User-Agent: - - azsdk-python-storage-dfs/12.8.0b1 Python/3.10.2 (Windows-10-10.0.19044-SP0) - x-ms-date: - - Thu, 02 Jun 2022 23:39:13 GMT - x-ms-version: - - '2021-08-06' - method: POST - uri: https://storagename.blob.core.windows.net/fs13fa31a04?restype=container&comp=batch - response: - body: - string: "--batchresponse_14968008-83d1-40ed-8b80-f33a1f9b35b9\r\nContent-Type: - application/http\r\nContent-ID: 0\r\n\r\nHTTP/1.1 202 Accepted\r\nx-ms-delete-type-permanent: - true\r\nx-ms-request-id: fafae2bf-e01e-008d-7fd9-76ad531ec8eb\r\nx-ms-version: - 2021-08-06\r\nx-ms-client-request-id: 3568ae85-e2cd-11ec-8f4e-4851c58829e0\r\nServer: - Windows-Azure-Blob/1.0\r\n\r\n--batchresponse_14968008-83d1-40ed-8b80-f33a1f9b35b9\r\nContent-Type: - application/http\r\nContent-ID: 1\r\n\r\nHTTP/1.1 202 Accepted\r\nx-ms-delete-type-permanent: - true\r\nx-ms-request-id: fafae2bf-e01e-008d-7fd9-76ad531ec8ed\r\nx-ms-version: - 2021-08-06\r\nx-ms-client-request-id: 3568d54d-e2cd-11ec-810c-4851c58829e0\r\nServer: - Windows-Azure-Blob/1.0\r\n\r\n--batchresponse_14968008-83d1-40ed-8b80-f33a1f9b35b9\r\nContent-Type: - application/http\r\nContent-ID: 2\r\n\r\nHTTP/1.1 202 Accepted\r\nx-ms-delete-type-permanent: - true\r\nx-ms-request-id: fafae2bf-e01e-008d-7fd9-76ad531ec8ee\r\nx-ms-version: - 2021-08-06\r\nx-ms-client-request-id: 3568d54e-e2cd-11ec-9ae6-4851c58829e0\r\nServer: - Windows-Azure-Blob/1.0\r\n\r\n--batchresponse_14968008-83d1-40ed-8b80-f33a1f9b35b9\r\nContent-Type: - application/http\r\nContent-ID: 3\r\n\r\nHTTP/1.1 409 The directory involved - in this operation is not empty\r\nx-ms-error-code: DirectoryNotEmpty\r\nx-ms-request-id: - fafae2bf-e01e-008d-7fd9-76ad531ec8ef\r\nx-ms-version: 2021-08-06\r\nx-ms-client-request-id: - 3568d54f-e2cd-11ec-9eb2-4851c58829e0\r\nContent-Length: 240\r\nContent-Type: - application/xml\r\nServer: Windows-Azure-Blob/1.0\r\n\r\n\uFEFF\nDirectoryNotEmptyThe directory - involved in this operation is not empty\nRequestId:fafae2bf-e01e-008d-7fd9-76ad531ec8ef\nTime:2022-06-02T23:39:12.7081861Z\r\n--batchresponse_14968008-83d1-40ed-8b80-f33a1f9b35b9\r\nContent-Type: - application/http\r\nContent-ID: 4\r\n\r\nHTTP/1.1 404 The specified blob does - not exist.\r\nx-ms-error-code: BlobNotFound\r\nx-ms-request-id: fafae2bf-e01e-008d-7fd9-76ad531ec8f0\r\nx-ms-version: - 2021-08-06\r\nx-ms-client-request-id: 3568d550-e2cd-11ec-9150-4851c58829e0\r\nContent-Length: - 216\r\nContent-Type: application/xml\r\nServer: Windows-Azure-Blob/1.0\r\n\r\n\uFEFF\nBlobNotFoundThe - specified blob does not exist.\nRequestId:fafae2bf-e01e-008d-7fd9-76ad531ec8f0\nTime:2022-06-02T23:39:12.6901965Z\r\n--batchresponse_14968008-83d1-40ed-8b80-f33a1f9b35b9--" - headers: - content-type: multipart/mixed; boundary=batchresponse_14968008-83d1-40ed-8b80-f33a1f9b35b9 - date: Thu, 02 Jun 2022 23:39:12 GMT - server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 - transfer-encoding: chunked - x-ms-version: '2021-08-06' - status: - code: 202 - message: Accepted - url: https://vincenttranhns.blob.core.windows.net/fs13fa31a04?restype=container&comp=batch -- request: - body: null - headers: - Accept: - - application/xml - User-Agent: - - azsdk-python-storage-dfs/12.8.0b1 Python/3.10.2 (Windows-10-10.0.19044-SP0) - x-ms-date: - - Thu, 02 Jun 2022 23:39:13 GMT - x-ms-version: - - '2021-08-06' - method: DELETE - uri: https://storagename.blob.core.windows.net/fs13fa31a04?restype=container - response: - body: - string: '' - headers: - content-length: '0' - date: Thu, 02 Jun 2022 23:39:12 GMT - server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 - x-ms-version: '2021-08-06' - status: - code: 202 - message: Accepted - url: https://vincenttranhns.blob.core.windows.net/fs13fa31a04?restype=container -version: 1 diff --git a/sdk/storage/azure-storage-file-datalake/tests/recordings/test_file_system_async.test_serialized_error.yaml b/sdk/storage/azure-storage-file-datalake/tests/recordings/test_file_system_async.test_serialized_error.yaml deleted file mode 100644 index 3bdb7a1f681e..000000000000 --- a/sdk/storage/azure-storage-file-datalake/tests/recordings/test_file_system_async.test_serialized_error.yaml +++ /dev/null @@ -1,136 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/xml - User-Agent: - - azsdk-python-storage-dfs/12.7.0b1 Python/3.10.2 (Windows-10-10.0.19044-SP0) - x-ms-date: - - Fri, 15 Apr 2022 21:18:13 GMT - x-ms-version: - - '2021-06-08' - method: PUT - uri: https://storagename.blob.core.windows.net/filesystem9b471243?restype=container - response: - body: - string: '' - headers: - content-length: '0' - date: Fri, 15 Apr 2022 21:18:13 GMT - etag: '"0x8DA1F25733E59CA"' - last-modified: Fri, 15 Apr 2022 21:18:13 GMT - server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 - x-ms-version: '2021-06-08' - status: - code: 201 - message: Created - url: https://vincenttrancanary.blob.core.windows.net/filesystem9b471243?restype=container -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-storage-dfs/12.7.0b1 Python/3.10.2 (Windows-10-10.0.19044-SP0) - x-ms-date: - - Fri, 15 Apr 2022 21:18:14 GMT - x-ms-version: - - '2021-06-08' - method: PUT - uri: https://storagename.dfs.core.windows.net/filesystem9b471243/dir1?resource=directory - response: - body: - string: '' - headers: - content-length: '0' - date: Fri, 15 Apr 2022 21:18:13 GMT - etag: '"0x8DA1F2573C3F455"' - last-modified: Fri, 15 Apr 2022 21:18:14 GMT - server: Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 - x-ms-request-server-encrypted: 'true' - x-ms-version: '2021-06-08' - status: - code: 201 - message: Created - url: https://vincenttrancanary.dfs.core.windows.net/filesystem9b471243/dir1?resource=directory -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-storage-dfs/12.7.0b1 Python/3.10.2 (Windows-10-10.0.19044-SP0) - x-ms-date: - - Fri, 15 Apr 2022 21:18:15 GMT - x-ms-version: - - '2021-06-08' - method: DELETE - uri: https://storagename.dfs.core.windows.net/filesystem9b471243/dir1?recursive=true - response: - body: - string: '' - headers: - content-length: '0' - date: Fri, 15 Apr 2022 21:18:13 GMT - server: Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 - x-ms-delete-type-permanent: 'true' - x-ms-version: '2021-06-08' - status: - code: 200 - message: OK - url: https://vincenttrancanary.dfs.core.windows.net/filesystem9b471243/dir1?recursive=true -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-storage-dfs/12.7.0b1 Python/3.10.2 (Windows-10-10.0.19044-SP0) - x-ms-date: - - Fri, 15 Apr 2022 21:18:15 GMT - x-ms-version: - - '2021-06-08' - method: DELETE - uri: https://storagename.dfs.core.windows.net/filesystem9b471243/dir1?recursive=true - response: - body: - string: '{"error":{"code":"PathNotFound","message":"The specified path does - not exist.\nRequestId:93d995c5-901f-008f-1f0e-5153a8000000\nTime:2022-04-15T21:18:14.4773670Z"}}' - headers: - content-length: '163' - content-type: application/json;charset=utf-8 - date: Fri, 15 Apr 2022 21:18:13 GMT - server: Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 - x-ms-error-code: PathNotFound - x-ms-version: '2021-06-08' - status: - code: 404 - message: The specified path does not exist. - url: https://vincenttrancanary.dfs.core.windows.net/filesystem9b471243/dir1?recursive=true -- request: - body: null - headers: - Accept: - - application/xml - User-Agent: - - azsdk-python-storage-dfs/12.7.0b1 Python/3.10.2 (Windows-10-10.0.19044-SP0) - x-ms-date: - - Fri, 15 Apr 2022 21:18:15 GMT - x-ms-version: - - '2021-06-08' - method: DELETE - uri: https://storagename.blob.core.windows.net/filesystem9b471243?restype=container - response: - body: - string: '' - headers: - content-length: '0' - date: Fri, 15 Apr 2022 21:18:14 GMT - server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 - x-ms-version: '2021-06-08' - status: - code: 202 - message: Accepted - url: https://vincenttrancanary.blob.core.windows.net/filesystem9b471243?restype=container -version: 1 diff --git a/sdk/storage/azure-storage-file-datalake/tests/test_file_system.py b/sdk/storage/azure-storage-file-datalake/tests/test_file_system.py index 66931837727c..e87ad9ff728e 100644 --- a/sdk/storage/azure-storage-file-datalake/tests/test_file_system.py +++ b/sdk/storage/azure-storage-file-datalake/tests/test_file_system.py @@ -10,7 +10,7 @@ from datetime import datetime, timedelta from azure.core import MatchConditions -from azure.core.exceptions import ResourceNotFoundError, HttpResponseError, ResourceExistsError +from azure.core.exceptions import ResourceNotFoundError, HttpResponseError from azure.storage.filedatalake import( AccessPolicy, @@ -21,7 +21,6 @@ ResourceTypes, generate_account_sas) -from azure.storage.blob import StorageErrorCode from settings.testcase import DataLakePreparer from devtools_testutils.storage import StorageTestCase @@ -693,114 +692,6 @@ def test_undelete_file_with_version_id(self, datalake_storage_account_name, data resp = restored_file_client.get_file_properties() self.assertIsNotNone(resp) - @DataLakePreparer() - def test_delete_files_simple_no_raise(self, datalake_storage_account_name, datalake_storage_account_key): - # Arrange - self._setUp(datalake_storage_account_name, datalake_storage_account_key) - filesystem = self._create_file_system("fs1") - data = b'hello world' - files = ['file1', 'file2', 'file3', 'dir1', 'dir2'] - - try: - # create file1 - filesystem.get_file_client(files[0]).upload_data(data, overwrite=True) - - # create file2 - file2 = filesystem.get_file_client(files[1]) - file2.upload_data(data, overwrite=True) - - # create file3 - file3 = filesystem.get_file_client(files[2]) - file3.upload_data(data, overwrite=True) - - # create dir1 - # empty directory can be deleted using delete_files - filesystem.get_directory_client(files[3]).create_directory(), - - # create dir2 - dir2 = filesystem.get_directory_client(files[4]) - dir2.create_directory() - - except: - pass - - # Act - response = filesystem.delete_files( - files[0], - files[1], - files[2], - files[3], - files[4], - ) - - # Assert - self.assertEqual(len(response), len(files)) - self.assertIsNone(response[0]) - self.assertIsNone(response[1]) - self.assertIsNone(response[2]) - self.assertIsNone(response[3]) - self.assertIsNone(response[4]) - - @DataLakePreparer() - def test_delete_files_with_failed_subrequest(self, datalake_storage_account_name, datalake_storage_account_key): - # Arrange - self._setUp(datalake_storage_account_name, datalake_storage_account_key) - filesystem = self._create_file_system("fs2") - data = b'hello world' - files = ['file1', 'file2', 'file3', 'dir1', 'dir8'] - - try: - # create file1 - filesystem.get_file_client(files[0]).upload_data(data, overwrite=True) - - # create file2 - file2 = filesystem.get_file_client(files[1]) - file2.upload_data(data, overwrite=True) - - # create file3 - file3 = filesystem.get_file_client(files[2]) - file3.upload_data(data, overwrite=True) - - # create dir1 with file4 inside - dir1 = filesystem.get_directory_client(files[3]) - dir1.create_file("file4") - except: - pass - - # Act - response = filesystem.delete_files( - files[0], - files[1], - files[2], - files[3], # dir1 is not empty - files[4], # dir8 doesn't exist - ) - - # Assert - self.assertEqual(len(response), len(files)) - self.assertIsNone(response[0]) - self.assertIsNone(response[1]) - self.assertIsNone(response[2]) - self.assertEqual(response[3].error_code, StorageErrorCode.directory_not_empty) - self.assertEqual(response[3].status_code, 409) - self.assertEqual(response[4].error_code, StorageErrorCode.path_not_found) - self.assertEqual(response[4].status_code, 404) - - @DataLakePreparer() - def test_serialized_error(self, datalake_storage_account_name, datalake_storage_account_key): - self._setUp(datalake_storage_account_name, datalake_storage_account_key) - # Arrange - file_system = self._create_file_system() - dir = file_system.create_directory("dir1") - dir.delete_directory() - - # Assert - try: - dir.delete_directory() - except HttpResponseError as e: - self.assertEqual(e.error_code, StorageErrorCode.path_not_found) - self.assertEqual(e.status_code, 404) - # ------------------------------------------------------------------------------ if __name__ == '__main__': unittest.main() diff --git a/sdk/storage/azure-storage-file-datalake/tests/test_file_system_async.py b/sdk/storage/azure-storage-file-datalake/tests/test_file_system_async.py index db30a7453d54..cbb64c84190b 100644 --- a/sdk/storage/azure-storage-file-datalake/tests/test_file_system_async.py +++ b/sdk/storage/azure-storage-file-datalake/tests/test_file_system_async.py @@ -29,7 +29,6 @@ from devtools_testutils.storage.aio import AsyncStorageTestCase as StorageTestCase -from azure.storage.blob import StorageErrorCode from settings.testcase import DataLakePreparer # ------------------------------------------------------------------------------ @@ -850,115 +849,6 @@ async def test_undelete_file_with_version_id(self, datalake_storage_account_name resp = await restored_file_client.get_file_properties() self.assertIsNotNone(resp) - @DataLakePreparer() - async def test_delete_files_simple_no_raise(self, datalake_storage_account_name, datalake_storage_account_key): - # Arrange - self._setUp(datalake_storage_account_name, datalake_storage_account_key) - filesystem = await self._create_file_system("fs2") - data = b'hello world' - files = ['file1', 'file2', 'file3', 'dir1', 'dir2'] - - try: - # create file1 - await filesystem.get_file_client(files[0]).upload_data(data, overwrite=True) - - # create file2 - file2 = filesystem.get_file_client(files[1]) - await file2.upload_data(data, overwrite=True) - - # create file3 - file3 = filesystem.get_file_client(files[2]) - await file3.upload_data(data, overwrite=True) - - # create dir1 - # empty directory can be deleted using delete_files - await filesystem.get_directory_client(files[3]).create_directory(), - - # create dir2 - dir2 = filesystem.get_directory_client(files[4]) - await dir2.create_directory() - - except: - pass - - # Act - response = await filesystem.delete_files( - files[0], - files[1], - files[2], - files[3], - files[4], - ) - - # Assert - self.assertEqual(len(response), len(files)) - self.assertIsNone(response[0]) - self.assertIsNone(response[1]) - self.assertIsNone(response[2]) - self.assertIsNone(response[3]) - self.assertIsNone(response[4]) - - @DataLakePreparer() - async def test_delete_files_with_failed_subrequest(self, datalake_storage_account_name, datalake_storage_account_key): - # Arrange - self._setUp(datalake_storage_account_name, datalake_storage_account_key) - filesystem = await self._create_file_system("fs1") - data = b'hello world' - files = ['file1', 'file2', 'file3', 'dir1', 'dir8'] - - try: - # create file1 - await filesystem.get_file_client(files[0]).upload_data(data, overwrite=True) - - # create file2 - file2 = filesystem.get_file_client(files[1]) - await file2.upload_data(data, overwrite=True) - - # create file3 - file3 = filesystem.get_file_client(files[2]) - await file3.upload_data(data, overwrite=True) - - # create dir1 - dir1 = filesystem.get_directory_client(files[3]) - await dir1.create_file("file4") - except: - pass - - # Act - response = await filesystem.delete_files( - files[0], - files[1], - files[2], - files[3], # dir1 is not empty - files[4], # dir8 doesn't exist - ) - - # Assert - self.assertEqual(len(response), len(files)) - self.assertIsNone(response[0]) - self.assertIsNone(response[1]) - self.assertIsNone(response[2]) - self.assertEqual(response[3].error_code, StorageErrorCode.directory_not_empty) - self.assertEqual(response[3].status_code, 409) - self.assertEqual(response[4].error_code, StorageErrorCode.path_not_found) - self.assertEqual(response[4].status_code, 404) - - @DataLakePreparer() - async def test_serialized_error( - self, datalake_storage_account_name, datalake_storage_account_key): - self._setUp(datalake_storage_account_name, datalake_storage_account_key) - # Arrange - file_system = await self._create_file_system() - dir = await file_system.create_directory("dir1") - await dir.delete_directory() - - # Assert - try: - await dir.delete_directory() - except HttpResponseError as e: - self.assertEqual(e.error_code, StorageErrorCode.path_not_found) - self.assertEqual(e.status_code, 404) - # ------------------------------------------------------------------------------ if __name__ == '__main__': unittest.main()