From b4e64058c479d2d7000a344ccc3235ae8f497128 Mon Sep 17 00:00:00 2001 From: Sean McCullough Date: Wed, 27 Oct 2021 12:16:17 -0500 Subject: [PATCH 01/21] Rename File --- .../src/Generated/DirectoryRenameHeaders.cs | 40 ++++ .../src/Generated/DirectoryRestClient.cs | 136 ++++++++++- .../src/Generated/FileRenameHeaders.cs | 40 ++++ .../src/Generated/FileRestClient.cs | 135 ++++++++++- .../src/Generated/Models/CopyFileSmbInfo.cs | 8 +- .../src/Generated/ServiceRestClient.cs | 2 +- .../src/Generated/ShareRestClient.cs | 2 +- .../src/Models/ShareFileRenameOptions.cs | 89 +++++++ .../src/ShareFileClient.cs | 225 ++++++++++++++++++ .../src/autorest.md | 12 +- 10 files changed, 680 insertions(+), 9 deletions(-) create mode 100644 sdk/storage/Azure.Storage.Files.Shares/src/Generated/DirectoryRenameHeaders.cs create mode 100644 sdk/storage/Azure.Storage.Files.Shares/src/Generated/FileRenameHeaders.cs create mode 100644 sdk/storage/Azure.Storage.Files.Shares/src/Models/ShareFileRenameOptions.cs diff --git a/sdk/storage/Azure.Storage.Files.Shares/src/Generated/DirectoryRenameHeaders.cs b/sdk/storage/Azure.Storage.Files.Shares/src/Generated/DirectoryRenameHeaders.cs new file mode 100644 index 000000000000..f500ac8c56c2 --- /dev/null +++ b/sdk/storage/Azure.Storage.Files.Shares/src/Generated/DirectoryRenameHeaders.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure; +using Azure.Core; + +namespace Azure.Storage.Files.Shares +{ + internal partial class DirectoryRenameHeaders + { + private readonly Response _response; + public DirectoryRenameHeaders(Response response) + { + _response = response; + } + /// Returns the date and time the share was last modified. Any operation that modifies the directory or its properties updates the last modified time. Operations on files do not affect the last modified time of the directory. + public DateTimeOffset? LastModified => _response.Headers.TryGetValue("Last-Modified", out DateTimeOffset? value) ? value : null; + /// Indicates the version of the File service used to execute the request. + public string Version => _response.Headers.TryGetValue("x-ms-version", out string value) ? value : null; + /// The value of this header is set to true if the contents of the request are successfully encrypted using the specified algorithm, and false otherwise. + public bool? IsServerEncrypted => _response.Headers.TryGetValue("x-ms-request-server-encrypted", out bool? value) ? value : null; + /// Key of the permission set for the file. + public string FilePermissionKey => _response.Headers.TryGetValue("x-ms-file-permission-key", out string value) ? value : null; + /// Attributes set for the file. + public string FileAttributes => _response.Headers.TryGetValue("x-ms-file-attributes", out string value) ? value : null; + /// Creation time for the file. + public DateTimeOffset? FileCreationTime => _response.Headers.TryGetValue("x-ms-file-creation-time", out DateTimeOffset? value) ? value : null; + /// Last write time for the file. + public DateTimeOffset? FileLastWriteTime => _response.Headers.TryGetValue("x-ms-file-last-write-time", out DateTimeOffset? value) ? value : null; + /// Change time for the file. + public DateTimeOffset? FileChangeTime => _response.Headers.TryGetValue("x-ms-file-change-time", out DateTimeOffset? value) ? value : null; + /// The fileId of the file. + public string FileId => _response.Headers.TryGetValue("x-ms-file-id", out string value) ? value : null; + } +} diff --git a/sdk/storage/Azure.Storage.Files.Shares/src/Generated/DirectoryRestClient.cs b/sdk/storage/Azure.Storage.Files.Shares/src/Generated/DirectoryRestClient.cs index 241ef9edda6d..0838fd740b6b 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/src/Generated/DirectoryRestClient.cs +++ b/sdk/storage/Azure.Storage.Files.Shares/src/Generated/DirectoryRestClient.cs @@ -29,7 +29,7 @@ internal partial class DirectoryRestClient /// The URL of the service account, share, directory or file that is the target of the desired operation. /// Specifies the version of the operation to use for this request. /// or is null. - public DirectoryRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string url, string version = "2021-02-12") + public DirectoryRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string url, string version = "2021-04-10") { this.url = url ?? throw new ArgumentNullException(nameof(url)); this.version = version ?? throw new ArgumentNullException(nameof(version)); @@ -697,6 +697,140 @@ public ResponseWithHeaders ForceCloseHandles( } } + internal HttpMessage CreateRenameRequest(string renameSource, int? timeout, bool? replaceIfExists, bool? ignoreReadOnly, IDictionary metadata, string sourceLeaseId, string destinationLeaseId, string filePermission, string filePermissionKey, CopyFileSmbInfo copyFileSmbInfo, FileHttpHeaders fileHttpHeaders) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.AppendRaw(url, false); + uri.AppendQuery("restype", "directory", true); + uri.AppendQuery("comp", "list", true); + if (timeout != null) + { + uri.AppendQuery("timeout", timeout.Value, true); + } + request.Uri = uri; + request.Headers.Add("x-ms-version", version); + request.Headers.Add("x-ms-file-rename-source", renameSource); + if (replaceIfExists != null) + { + request.Headers.Add("x-ms-file-rename-replace-if-exists", replaceIfExists.Value); + } + if (ignoreReadOnly != null) + { + request.Headers.Add("x-ms-file-rename-ignore-read-only", ignoreReadOnly.Value); + } + if (metadata != null) + { + request.Headers.Add("x-ms-meta-", metadata); + } + if (sourceLeaseId != null) + { + request.Headers.Add("x-ms-source-lease-id", sourceLeaseId); + } + if (destinationLeaseId != null) + { + request.Headers.Add("x-ms-destination-lease-id", destinationLeaseId); + } + if (copyFileSmbInfo?.FileAttributes != null) + { + request.Headers.Add("x-ms-file-attributes", copyFileSmbInfo.FileAttributes); + } + if (copyFileSmbInfo?.FileCreationTime != null) + { + request.Headers.Add("x-ms-file-creation-time", copyFileSmbInfo.FileCreationTime); + } + if (copyFileSmbInfo?.FileLastWriteTime != null) + { + request.Headers.Add("x-ms-file-last-write-time", copyFileSmbInfo.FileLastWriteTime); + } + if (copyFileSmbInfo?.SetArchiveAttribute != null) + { + request.Headers.Add("x-ms-file-copy-set-archive", copyFileSmbInfo.SetArchiveAttribute.Value); + } + if (filePermission != null) + { + request.Headers.Add("x-ms-file-permission", filePermission); + } + if (filePermissionKey != null) + { + request.Headers.Add("x-ms-file-permission-key", filePermissionKey); + } + if (fileHttpHeaders?.FileContentType != null) + { + request.Headers.Add("x-ms-content-type", fileHttpHeaders.FileContentType); + } + request.Headers.Add("Accept", "application/xml"); + return message; + } + + /// Renames a directory. + /// Required. Specifies the URI-style path of the source file, up to 2 KB in length. + /// The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/Setting-Timeouts-for-File-Service-Operations?redirectedfrom=MSDN">Setting Timeouts for File Service Operations.</a>. + /// Optional. A boolean value for if the destination file already exists, whether this request will overwrite the file or not. If true, the rename will succeed and will overwrite the destination file. If not provided or if false and the destination file does exist, the request will not overwrite the destination file. If provided and the destination file doesn’t exist, the rename will succeed. Note: This value does not override the x-ms-file-copy-ignore-read-only header value. + /// Optional. A boolean value that specifies whether the ReadOnly attribute on a preexisting destination file should be respected. If true, the rename will succeed, otherwise, a previous file at the destination with the ReadOnly attribute set will cause the rename to fail. + /// A name-value pair to associate with a file storage object. + /// Required if the source file has an active infinite lease. + /// Required if the destination file has an active infinite lease. The lease ID specified for this header must match the lease ID of the destination file. If the request does not include the lease ID or it is not valid, the operation fails with status code 412 (Precondition Failed). If this header is specified and the destination file does not currently have an active lease, the operation will also fail with status code 412 (Precondition Failed). + /// If specified the permission (security descriptor) shall be set for the directory/file. This header can be used if Permission size is <= 8KB, else x-ms-file-permission-key header shall be used. Default value: Inherit. If SDDL is specified as input, it must have owner, group and dacl. Note: Only one of the x-ms-file-permission or x-ms-file-permission-key should be specified. + /// Key of the permission to be set for the directory/file. Note: Only one of the x-ms-file-permission or x-ms-file-permission-key should be specified. + /// Parameter group. + /// Parameter group. + /// The cancellation token to use. + /// is null. + public async Task> RenameAsync(string renameSource, int? timeout = null, bool? replaceIfExists = null, bool? ignoreReadOnly = null, IDictionary metadata = null, string sourceLeaseId = null, string destinationLeaseId = null, string filePermission = null, string filePermissionKey = null, CopyFileSmbInfo copyFileSmbInfo = null, FileHttpHeaders fileHttpHeaders = null, CancellationToken cancellationToken = default) + { + if (renameSource == null) + { + throw new ArgumentNullException(nameof(renameSource)); + } + + using var message = CreateRenameRequest(renameSource, timeout, replaceIfExists, ignoreReadOnly, metadata, sourceLeaseId, destinationLeaseId, filePermission, filePermissionKey, copyFileSmbInfo, fileHttpHeaders); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + var headers = new DirectoryRenameHeaders(message.Response); + switch (message.Response.Status) + { + case 200: + return ResponseWithHeaders.FromValue(headers, message.Response); + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Renames a directory. + /// Required. Specifies the URI-style path of the source file, up to 2 KB in length. + /// The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/Setting-Timeouts-for-File-Service-Operations?redirectedfrom=MSDN">Setting Timeouts for File Service Operations.</a>. + /// Optional. A boolean value for if the destination file already exists, whether this request will overwrite the file or not. If true, the rename will succeed and will overwrite the destination file. If not provided or if false and the destination file does exist, the request will not overwrite the destination file. If provided and the destination file doesn’t exist, the rename will succeed. Note: This value does not override the x-ms-file-copy-ignore-read-only header value. + /// Optional. A boolean value that specifies whether the ReadOnly attribute on a preexisting destination file should be respected. If true, the rename will succeed, otherwise, a previous file at the destination with the ReadOnly attribute set will cause the rename to fail. + /// A name-value pair to associate with a file storage object. + /// Required if the source file has an active infinite lease. + /// Required if the destination file has an active infinite lease. The lease ID specified for this header must match the lease ID of the destination file. If the request does not include the lease ID or it is not valid, the operation fails with status code 412 (Precondition Failed). If this header is specified and the destination file does not currently have an active lease, the operation will also fail with status code 412 (Precondition Failed). + /// If specified the permission (security descriptor) shall be set for the directory/file. This header can be used if Permission size is <= 8KB, else x-ms-file-permission-key header shall be used. Default value: Inherit. If SDDL is specified as input, it must have owner, group and dacl. Note: Only one of the x-ms-file-permission or x-ms-file-permission-key should be specified. + /// Key of the permission to be set for the directory/file. Note: Only one of the x-ms-file-permission or x-ms-file-permission-key should be specified. + /// Parameter group. + /// Parameter group. + /// The cancellation token to use. + /// is null. + public ResponseWithHeaders Rename(string renameSource, int? timeout = null, bool? replaceIfExists = null, bool? ignoreReadOnly = null, IDictionary metadata = null, string sourceLeaseId = null, string destinationLeaseId = null, string filePermission = null, string filePermissionKey = null, CopyFileSmbInfo copyFileSmbInfo = null, FileHttpHeaders fileHttpHeaders = null, CancellationToken cancellationToken = default) + { + if (renameSource == null) + { + throw new ArgumentNullException(nameof(renameSource)); + } + + using var message = CreateRenameRequest(renameSource, timeout, replaceIfExists, ignoreReadOnly, metadata, sourceLeaseId, destinationLeaseId, filePermission, filePermissionKey, copyFileSmbInfo, fileHttpHeaders); + _pipeline.Send(message, cancellationToken); + var headers = new DirectoryRenameHeaders(message.Response); + switch (message.Response.Status) + { + case 200: + return ResponseWithHeaders.FromValue(headers, message.Response); + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + internal HttpMessage CreateListFilesAndDirectoriesSegmentNextPageRequest(string nextLink, string prefix, string sharesnapshot, string marker, int? maxresults, int? timeout, IEnumerable include, bool? includeExtendedInfo) { var message = _pipeline.CreateMessage(); diff --git a/sdk/storage/Azure.Storage.Files.Shares/src/Generated/FileRenameHeaders.cs b/sdk/storage/Azure.Storage.Files.Shares/src/Generated/FileRenameHeaders.cs new file mode 100644 index 000000000000..80a54f824894 --- /dev/null +++ b/sdk/storage/Azure.Storage.Files.Shares/src/Generated/FileRenameHeaders.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure; +using Azure.Core; + +namespace Azure.Storage.Files.Shares +{ + internal partial class FileRenameHeaders + { + private readonly Response _response; + public FileRenameHeaders(Response response) + { + _response = response; + } + /// Returns the date and time the share was last modified. Any operation that modifies the directory or its properties updates the last modified time. Operations on files do not affect the last modified time of the directory. + public DateTimeOffset? LastModified => _response.Headers.TryGetValue("Last-Modified", out DateTimeOffset? value) ? value : null; + /// Indicates the version of the File service used to execute the request. + public string Version => _response.Headers.TryGetValue("x-ms-version", out string value) ? value : null; + /// The value of this header is set to true if the contents of the request are successfully encrypted using the specified algorithm, and false otherwise. + public bool? IsServerEncrypted => _response.Headers.TryGetValue("x-ms-request-server-encrypted", out bool? value) ? value : null; + /// Key of the permission set for the file. + public string FilePermissionKey => _response.Headers.TryGetValue("x-ms-file-permission-key", out string value) ? value : null; + /// Attributes set for the file. + public string FileAttributes => _response.Headers.TryGetValue("x-ms-file-attributes", out string value) ? value : null; + /// Creation time for the file. + public DateTimeOffset? FileCreationTime => _response.Headers.TryGetValue("x-ms-file-creation-time", out DateTimeOffset? value) ? value : null; + /// Last write time for the file. + public DateTimeOffset? FileLastWriteTime => _response.Headers.TryGetValue("x-ms-file-last-write-time", out DateTimeOffset? value) ? value : null; + /// Change time for the file. + public DateTimeOffset? FileChangeTime => _response.Headers.TryGetValue("x-ms-file-change-time", out DateTimeOffset? value) ? value : null; + /// The fileId of the file. + public string FileId => _response.Headers.TryGetValue("x-ms-file-id", out string value) ? value : null; + } +} diff --git a/sdk/storage/Azure.Storage.Files.Shares/src/Generated/FileRestClient.cs b/sdk/storage/Azure.Storage.Files.Shares/src/Generated/FileRestClient.cs index 6041cda9a90f..97de6104634d 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/src/Generated/FileRestClient.cs +++ b/sdk/storage/Azure.Storage.Files.Shares/src/Generated/FileRestClient.cs @@ -32,7 +32,7 @@ internal partial class FileRestClient /// Specifies the version of the operation to use for this request. /// Only update is supported: - Update: Writes the bytes downloaded from the source url into the specified range. /// , , or is null. - public FileRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string url, string version = "2021-02-12", string fileRangeWriteFromUrl = "update") + public FileRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string url, string version = "2021-04-10", string fileRangeWriteFromUrl = "update") { this.url = url ?? throw new ArgumentNullException(nameof(url)); this.version = version ?? throw new ArgumentNullException(nameof(version)); @@ -1503,5 +1503,138 @@ public ResponseWithHeaders ForceCloseHandles(strin throw _clientDiagnostics.CreateRequestFailedException(message.Response); } } + + internal HttpMessage CreateRenameRequest(string renameSource, int? timeout, bool? replaceIfExists, bool? ignoreReadOnly, IDictionary metadata, string sourceLeaseId, string destinationLeaseId, string filePermission, string filePermissionKey, CopyFileSmbInfo copyFileSmbInfo, FileHttpHeaders fileHttpHeaders) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.AppendRaw(url, false); + uri.AppendQuery("comp", "rename", true); + if (timeout != null) + { + uri.AppendQuery("timeout", timeout.Value, true); + } + request.Uri = uri; + request.Headers.Add("x-ms-version", version); + request.Headers.Add("x-ms-file-rename-source", renameSource); + if (replaceIfExists != null) + { + request.Headers.Add("x-ms-file-rename-replace-if-exists", replaceIfExists.Value); + } + if (ignoreReadOnly != null) + { + request.Headers.Add("x-ms-file-rename-ignore-read-only", ignoreReadOnly.Value); + } + if (metadata != null) + { + request.Headers.Add("x-ms-meta-", metadata); + } + if (sourceLeaseId != null) + { + request.Headers.Add("x-ms-source-lease-id", sourceLeaseId); + } + if (destinationLeaseId != null) + { + request.Headers.Add("x-ms-destination-lease-id", destinationLeaseId); + } + if (copyFileSmbInfo?.FileAttributes != null) + { + request.Headers.Add("x-ms-file-attributes", copyFileSmbInfo.FileAttributes); + } + if (copyFileSmbInfo?.FileCreationTime != null) + { + request.Headers.Add("x-ms-file-creation-time", copyFileSmbInfo.FileCreationTime); + } + if (copyFileSmbInfo?.FileLastWriteTime != null) + { + request.Headers.Add("x-ms-file-last-write-time", copyFileSmbInfo.FileLastWriteTime); + } + if (copyFileSmbInfo?.SetArchiveAttribute != null) + { + request.Headers.Add("x-ms-file-copy-set-archive", copyFileSmbInfo.SetArchiveAttribute.Value); + } + if (filePermission != null) + { + request.Headers.Add("x-ms-file-permission", filePermission); + } + if (filePermissionKey != null) + { + request.Headers.Add("x-ms-file-permission-key", filePermissionKey); + } + if (fileHttpHeaders?.FileContentType != null) + { + request.Headers.Add("x-ms-content-type", fileHttpHeaders.FileContentType); + } + request.Headers.Add("Accept", "application/xml"); + return message; + } + + /// Renames a file. + /// Required. Specifies the URI-style path of the source file, up to 2 KB in length. + /// The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/Setting-Timeouts-for-File-Service-Operations?redirectedfrom=MSDN">Setting Timeouts for File Service Operations.</a>. + /// Optional. A boolean value for if the destination file already exists, whether this request will overwrite the file or not. If true, the rename will succeed and will overwrite the destination file. If not provided or if false and the destination file does exist, the request will not overwrite the destination file. If provided and the destination file doesn’t exist, the rename will succeed. Note: This value does not override the x-ms-file-copy-ignore-read-only header value. + /// Optional. A boolean value that specifies whether the ReadOnly attribute on a preexisting destination file should be respected. If true, the rename will succeed, otherwise, a previous file at the destination with the ReadOnly attribute set will cause the rename to fail. + /// A name-value pair to associate with a file storage object. + /// Required if the source file has an active infinite lease. + /// Required if the destination file has an active infinite lease. The lease ID specified for this header must match the lease ID of the destination file. If the request does not include the lease ID or it is not valid, the operation fails with status code 412 (Precondition Failed). If this header is specified and the destination file does not currently have an active lease, the operation will also fail with status code 412 (Precondition Failed). + /// If specified the permission (security descriptor) shall be set for the directory/file. This header can be used if Permission size is <= 8KB, else x-ms-file-permission-key header shall be used. Default value: Inherit. If SDDL is specified as input, it must have owner, group and dacl. Note: Only one of the x-ms-file-permission or x-ms-file-permission-key should be specified. + /// Key of the permission to be set for the directory/file. Note: Only one of the x-ms-file-permission or x-ms-file-permission-key should be specified. + /// Parameter group. + /// Parameter group. + /// The cancellation token to use. + /// is null. + public async Task> RenameAsync(string renameSource, int? timeout = null, bool? replaceIfExists = null, bool? ignoreReadOnly = null, IDictionary metadata = null, string sourceLeaseId = null, string destinationLeaseId = null, string filePermission = null, string filePermissionKey = null, CopyFileSmbInfo copyFileSmbInfo = null, FileHttpHeaders fileHttpHeaders = null, CancellationToken cancellationToken = default) + { + if (renameSource == null) + { + throw new ArgumentNullException(nameof(renameSource)); + } + + using var message = CreateRenameRequest(renameSource, timeout, replaceIfExists, ignoreReadOnly, metadata, sourceLeaseId, destinationLeaseId, filePermission, filePermissionKey, copyFileSmbInfo, fileHttpHeaders); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + var headers = new FileRenameHeaders(message.Response); + switch (message.Response.Status) + { + case 200: + return ResponseWithHeaders.FromValue(headers, message.Response); + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Renames a file. + /// Required. Specifies the URI-style path of the source file, up to 2 KB in length. + /// The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/Setting-Timeouts-for-File-Service-Operations?redirectedfrom=MSDN">Setting Timeouts for File Service Operations.</a>. + /// Optional. A boolean value for if the destination file already exists, whether this request will overwrite the file or not. If true, the rename will succeed and will overwrite the destination file. If not provided or if false and the destination file does exist, the request will not overwrite the destination file. If provided and the destination file doesn’t exist, the rename will succeed. Note: This value does not override the x-ms-file-copy-ignore-read-only header value. + /// Optional. A boolean value that specifies whether the ReadOnly attribute on a preexisting destination file should be respected. If true, the rename will succeed, otherwise, a previous file at the destination with the ReadOnly attribute set will cause the rename to fail. + /// A name-value pair to associate with a file storage object. + /// Required if the source file has an active infinite lease. + /// Required if the destination file has an active infinite lease. The lease ID specified for this header must match the lease ID of the destination file. If the request does not include the lease ID or it is not valid, the operation fails with status code 412 (Precondition Failed). If this header is specified and the destination file does not currently have an active lease, the operation will also fail with status code 412 (Precondition Failed). + /// If specified the permission (security descriptor) shall be set for the directory/file. This header can be used if Permission size is <= 8KB, else x-ms-file-permission-key header shall be used. Default value: Inherit. If SDDL is specified as input, it must have owner, group and dacl. Note: Only one of the x-ms-file-permission or x-ms-file-permission-key should be specified. + /// Key of the permission to be set for the directory/file. Note: Only one of the x-ms-file-permission or x-ms-file-permission-key should be specified. + /// Parameter group. + /// Parameter group. + /// The cancellation token to use. + /// is null. + public ResponseWithHeaders Rename(string renameSource, int? timeout = null, bool? replaceIfExists = null, bool? ignoreReadOnly = null, IDictionary metadata = null, string sourceLeaseId = null, string destinationLeaseId = null, string filePermission = null, string filePermissionKey = null, CopyFileSmbInfo copyFileSmbInfo = null, FileHttpHeaders fileHttpHeaders = null, CancellationToken cancellationToken = default) + { + if (renameSource == null) + { + throw new ArgumentNullException(nameof(renameSource)); + } + + using var message = CreateRenameRequest(renameSource, timeout, replaceIfExists, ignoreReadOnly, metadata, sourceLeaseId, destinationLeaseId, filePermission, filePermissionKey, copyFileSmbInfo, fileHttpHeaders); + _pipeline.Send(message, cancellationToken); + var headers = new FileRenameHeaders(message.Response); + switch (message.Response.Status) + { + case 200: + return ResponseWithHeaders.FromValue(headers, message.Response); + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } } } diff --git a/sdk/storage/Azure.Storage.Files.Shares/src/Generated/Models/CopyFileSmbInfo.cs b/sdk/storage/Azure.Storage.Files.Shares/src/Generated/Models/CopyFileSmbInfo.cs index f79f81871c8d..055ee7986a1d 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/src/Generated/Models/CopyFileSmbInfo.cs +++ b/sdk/storage/Azure.Storage.Files.Shares/src/Generated/Models/CopyFileSmbInfo.cs @@ -15,10 +15,6 @@ public CopyFileSmbInfo() { } - /// Specifies the option to copy file security descriptor from source file or to set it using the value which is defined by the header value of x-ms-file-permission or x-ms-file-permission-key. - public PermissionCopyMode? FilePermissionCopyMode { get; set; } - /// Specifies the option to overwrite the target file if it already exists and has read-only attribute set. - public bool? IgnoreReadOnly { get; set; } /// Specifies either the option to copy file attributes from a source file(source) to a target file or a list of attributes to set on a target file. public string FileAttributes { get; set; } /// Specifies either the option to copy file creation time from a source file(source) to a target file or a time value in ISO 8601 format to set as creation time on a target file. @@ -27,5 +23,9 @@ public CopyFileSmbInfo() public string FileLastWriteTime { get; set; } /// Specifies the option to set archive attribute on a target file. True means archive attribute will be set on a target file despite attribute overrides or a source file state. public bool? SetArchiveAttribute { get; set; } + /// Specifies the option to copy file security descriptor from source file or to set it using the value which is defined by the header value of x-ms-file-permission or x-ms-file-permission-key. + public PermissionCopyMode? FilePermissionCopyMode { get; set; } + /// Specifies the option to overwrite the target file if it already exists and has read-only attribute set. + public bool? IgnoreReadOnly { get; set; } } } diff --git a/sdk/storage/Azure.Storage.Files.Shares/src/Generated/ServiceRestClient.cs b/sdk/storage/Azure.Storage.Files.Shares/src/Generated/ServiceRestClient.cs index 60d10c4d8006..d2ef47d5c287 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/src/Generated/ServiceRestClient.cs +++ b/sdk/storage/Azure.Storage.Files.Shares/src/Generated/ServiceRestClient.cs @@ -29,7 +29,7 @@ internal partial class ServiceRestClient /// The URL of the service account, share, directory or file that is the target of the desired operation. /// Specifies the version of the operation to use for this request. /// or is null. - public ServiceRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string url, string version = "2021-02-12") + public ServiceRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string url, string version = "2021-04-10") { this.url = url ?? throw new ArgumentNullException(nameof(url)); this.version = version ?? throw new ArgumentNullException(nameof(version)); diff --git a/sdk/storage/Azure.Storage.Files.Shares/src/Generated/ShareRestClient.cs b/sdk/storage/Azure.Storage.Files.Shares/src/Generated/ShareRestClient.cs index 03f35ad5c126..8c7d551fff7e 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/src/Generated/ShareRestClient.cs +++ b/sdk/storage/Azure.Storage.Files.Shares/src/Generated/ShareRestClient.cs @@ -30,7 +30,7 @@ internal partial class ShareRestClient /// The URL of the service account, share, directory or file that is the target of the desired operation. /// Specifies the version of the operation to use for this request. /// or is null. - public ShareRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string url, string version = "2021-02-12") + public ShareRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string url, string version = "2021-04-10") { this.url = url ?? throw new ArgumentNullException(nameof(url)); this.version = version ?? throw new ArgumentNullException(nameof(version)); diff --git a/sdk/storage/Azure.Storage.Files.Shares/src/Models/ShareFileRenameOptions.cs b/sdk/storage/Azure.Storage.Files.Shares/src/Models/ShareFileRenameOptions.cs new file mode 100644 index 000000000000..6072a34ae00b --- /dev/null +++ b/sdk/storage/Azure.Storage.Files.Shares/src/Models/ShareFileRenameOptions.cs @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Text; +using Metadata = System.Collections.Generic.IDictionary; + +namespace Azure.Storage.Files.Shares.Models +{ + /// + /// Optional parameters for renaming a File or Directory. + /// + public class ShareFileRenameOptions + { + /// + /// Optional. A boolean value for if the destination file already exists, whether this request will overwrite the file or not. + /// If true, the rename will succeed and will overwrite the destination file. If not provided or if false and the destination + /// file does exist, the request will not overwrite the destination file. If provided and the destination file doesn’t exist, + /// the rename will succeed. + /// + public bool ReplaceIfExists { get; set; } + + /// + /// Optional. A boolean value that specifies whether the ReadOnly attribute on a preexisting destination file should be respected. + /// If true, the rename will succeed, otherwise, a previous file at the destination with the ReadOnly attribute set will cause the + /// rename to fail. + /// + public bool IgnoreReadOnly { get; set; } + + /// + /// Optional. Name-value pairs associated with the file as metadata. If no name-value pairs are specified, the operation will copy + /// the metadata from the source blob or file to the destination file. If one or more name-value pairs are specified, the + /// destination file is created with the specified metadata, and the metadata is not copied from the source file. Metadata names + /// must adhere to the naming rules for C# identifiers. + /// +#pragma warning disable CA2227 // Collection properties should be read only + public Metadata Metadata { get; set; } +#pragma warning restore CA2227 // Collection properties should be read only + + /// + /// Source request conditions. + /// + public ShareFileRequestConditions SourceRequestConditions { get; set; } + + /// + /// Destination request conditions. + /// + public ShareFileRequestConditions DestinationRequestConditions { get; set; } + + /// + /// The file system attributes for this file. + /// + public NtfsFileAttributes? FileAttributes { get; set; } + + /// + /// The creation time of the file. + /// + public DateTimeOffset? FileCreatedOn { get; set; } + + /// + /// The last write time of the file. + /// + public DateTimeOffset? FileLastWrittenOn { get; set; } + + /// + /// Optional. A  boolean value that specifies whether the Archive attribute should be set, + /// irrespective of the x-ms-file-attributes header value. + /// + public bool SetArchiveAttribute { get; set; } + + /// + /// Optional file permission to set on the destination. + /// + public string FilePermission { get; set; } + + /// + /// Optional if FilePermission is not specified. This can only be specified if FilePermission is not specified. + /// + public string FilePermissionKey { get; set; } + + /// + /// Optional. Sets the file’s content type. If this property is not specified on the request, then the property will + /// be cleared for the file. Subsequent calls to Get File Properties will not return this property, unless it is explicitly + /// set on the file again. + /// + public string ContentType { get; set; } + } +} diff --git a/sdk/storage/Azure.Storage.Files.Shares/src/ShareFileClient.cs b/sdk/storage/Azure.Storage.Files.Shares/src/ShareFileClient.cs index b2ea930faa93..0da0450c0d91 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/src/ShareFileClient.cs +++ b/sdk/storage/Azure.Storage.Files.Shares/src/ShareFileClient.cs @@ -5821,6 +5821,231 @@ private async Task> ForceCloseHandlesInter } #endregion ForceCloseHandles + #region Rename + /// + /// Renames a file. + /// + /// + /// The destination path to rename the file to. + /// + /// + /// Optional destination share. If null, the file will be renamed with the + /// current share. + /// + /// + /// Optional parameters. + /// + /// + /// Optional to propagate + /// notifications that the operation should be cancelled. + /// + /// + /// A pointed at the newly renamed File. + /// + /// + /// A will be thrown if + /// a failure occurs. + /// + public virtual Response Rename( + string destinationPath, + string destinationShare = default, + ShareFileRenameOptions options = default, + CancellationToken cancellationToken = default) + => RenameInternal( + destinationPath: destinationPath, + destinationShare: destinationShare, + options: options, + async: false, + cancellationToken: cancellationToken) + .EnsureCompleted(); + + /// + /// Renames a file. + /// + /// + /// The destination path to rename the file to. + /// + /// + /// Optional destination share. If null, the file will be renamed with the + /// current share. + /// + /// + /// Optional parameters. + /// + /// + /// Optional to propagate + /// notifications that the operation should be cancelled. + /// + /// + /// A pointed at the newly renamed File. + /// + /// + /// A will be thrown if + /// a failure occurs. + /// + public virtual async Task> RenameAsync( + string destinationPath, + string destinationShare = default, + ShareFileRenameOptions options = default, + CancellationToken cancellationToken = default) + => await RenameInternal( + destinationPath: destinationPath, + destinationShare: destinationShare, + options: options, + async: true, + cancellationToken: cancellationToken) + .ConfigureAwait(false); + + /// + /// Renames a file. + /// + /// + /// The destination path to rename the file to. + /// + /// + /// Optional destination share. If null, the file will be renamed with the + /// current share. + /// + /// + /// Optional parameters. + /// + /// + /// Whether to invoke the operation asynchronously. + /// + /// + /// Optional to propagate + /// notifications that the operation should be cancelled. + /// + /// + /// A pointed at the newly renamed File. + /// + /// + /// A will be thrown if + /// a failure occurs. + /// + private async Task> RenameInternal( + string destinationPath, + string destinationShare, + ShareFileRenameOptions options, + bool async, + CancellationToken cancellationToken) + { + using (ClientConfiguration.Pipeline.BeginLoggingScope(nameof(ShareFileClient))) + { + ClientConfiguration.Pipeline.LogMethodEnter( + nameof(ShareFileClient), + message: + $"{nameof(Uri)}: {Uri}\n" + + $"{nameof(destinationShare)}: {destinationShare}\n" + + $"{nameof(destinationPath)}: {destinationPath}\n" + + $"{nameof(options)}: {options}\n"); + + DiagnosticScope scope = ClientConfiguration.ClientDiagnostics.CreateScope($"{nameof(ShareFileClient)}.{nameof(Rename)}"); + + try + { + scope.Start(); + + // Build renameSource + ShareUriBuilder sourceUriBuilder = new ShareUriBuilder(Uri); + string renameSource = "/" + sourceUriBuilder.ShareName + "/" + sourceUriBuilder.DirectoryOrFilePath.EscapePath(); + + if (sourceUriBuilder.Sas != null) + { + renameSource += "?" + sourceUriBuilder.Sas; + } + + // Build destination URI + ShareUriBuilder destUriBuilder = new ShareUriBuilder(Uri) + { + Sas = null, + Query = null + }; + destUriBuilder.ShareName = destinationShare ?? destUriBuilder.ShareName; + + // ShareUriBuider will encode the DirectoryOrFilePath. We don't want the query parameters, + // especially SAS, to be encoded. + string[] split = destinationPath.Split('?'); + if (split.Length == 2) + { + destUriBuilder.DirectoryOrFilePath = split[0]; + destUriBuilder.Query = split[1]; + } + else + { + destUriBuilder.DirectoryOrFilePath = destinationPath; + } + + // Build destFileClient + ShareFileClient destFileClient = new ShareFileClient(destUriBuilder.ToUri(), ClientConfiguration); + + ResponseWithHeaders response; + + CopyFileSmbInfo copyFileSmbInfo = new CopyFileSmbInfo + { + FileAttributes = options?.FileAttributes?.ToAttributesString(), + FileCreationTime = options?.FileCreatedOn.ToFileDateTimeString(), + FileLastWriteTime = options?.FileLastWrittenOn.ToFileDateTimeString(), + SetArchiveAttribute = options?.SetArchiveAttribute, + IgnoreReadOnly = options?.IgnoreReadOnly + }; + + FileHttpHeaders fileHttpHeaders = new FileHttpHeaders + { + FileContentType = options?.ContentType + }; + + if (async) + { + response = await destFileClient.FileRestClient.RenameAsync( + renameSource: renameSource, + replaceIfExists: options?.ReplaceIfExists, + ignoreReadOnly: options?.IgnoreReadOnly, + metadata: options?.Metadata, + sourceLeaseId: options?.SourceRequestConditions?.LeaseId, + destinationLeaseId: options?.DestinationRequestConditions?.LeaseId, + filePermission: options?.FilePermission, + filePermissionKey: options?.FilePermissionKey, + copyFileSmbInfo: copyFileSmbInfo, + fileHttpHeaders: fileHttpHeaders, + cancellationToken: cancellationToken) + .ConfigureAwait(false); + } + else + { + response = destFileClient.FileRestClient.Rename( + renameSource: renameSource, + replaceIfExists: options?.ReplaceIfExists, + ignoreReadOnly: options?.IgnoreReadOnly, + metadata: options?.Metadata, + sourceLeaseId: options?.SourceRequestConditions?.LeaseId, + destinationLeaseId: options?.DestinationRequestConditions?.LeaseId, + filePermission: options?.FilePermission, + filePermissionKey: options?.FilePermissionKey, + copyFileSmbInfo: copyFileSmbInfo, + fileHttpHeaders: fileHttpHeaders, + cancellationToken: cancellationToken); + } + + return Response.FromValue( + destFileClient, + response.GetRawResponse()); + } + catch (Exception ex) + { + ClientConfiguration.Pipeline.LogException(ex); + scope.Failed(ex); + throw; + } + finally + { + ClientConfiguration.Pipeline.LogMethodExit(nameof(ShareFileClient)); + scope.Dispose(); + } + } + } + #endregion Rename + #region OpenWrite /// /// Opens a stream for writing to the file. diff --git a/sdk/storage/Azure.Storage.Files.Shares/src/autorest.md b/sdk/storage/Azure.Storage.Files.Shares/src/autorest.md index ef0c2b659092..e48b5e6b548e 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/src/autorest.md +++ b/sdk/storage/Azure.Storage.Files.Shares/src/autorest.md @@ -4,7 +4,7 @@ Run `dotnet build /t:GenerateCode` to generate code. ``` yaml input-file: - - https://raw.githubusercontent.com/Azure/azure-rest-api-specs/60723d13309c8f8060d020a7f3dd9d6e380f0bbd/specification/storage/data-plane/Microsoft.FileStorage/preview/2021-02-12/file.json + - C:\Users\seanmcc\git\azure-rest-api-specs\specification\storage\data-plane\Microsoft.FileStorage\preview\2021-04-10\file.json # https://github.com/Azure/autorest/issues/4075 skip-semantics-validation: true modelerfour: @@ -134,4 +134,14 @@ directive: - from: swagger-document where: $..[?(@.operationId=='File_Download')] transform: $["x-csharp-buffer-response"] = false; +``` + +### Remove conditions parameter groupings +``` yaml +directive: +- from: swagger-document + where: $.parameters + transform: > + delete $.SourceLeaseId["x-ms-parameter-grouping"]; + delete $.DestinationLeaseId["x-ms-parameter-grouping"]; ``` \ No newline at end of file From 62a047647aeda3e479a21bab771a2b94bef854ca Mon Sep 17 00:00:00 2001 From: Sean McCullough Date: Wed, 27 Oct 2021 12:31:18 -0500 Subject: [PATCH 02/21] first test --- .../tests/FileClientTests.cs | 17 +++++++++++++++++ .../tests/FileTestBase.cs | 4 ++-- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/sdk/storage/Azure.Storage.Files.Shares/tests/FileClientTests.cs b/sdk/storage/Azure.Storage.Files.Shares/tests/FileClientTests.cs index 9280ea718b6c..af9871d80555 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/tests/FileClientTests.cs +++ b/sdk/storage/Azure.Storage.Files.Shares/tests/FileClientTests.cs @@ -4140,6 +4140,23 @@ await TestHelper.AssertExpectedExceptionAsync( e => Assert.AreEqual("LeaseNotPresentWithFileOperation", e.ErrorCode)); } + [RecordedTest] + [ServiceVersion(Min = ShareClientOptions.ServiceVersion.V2021_04_10)] + public async Task RenameAsync() + { + // Arrange + await using DisposingDirectory test = await SharesClientBuilder.GetTestDirectoryAsync(); + string sourceFileName = GetNewFileName(); + ShareFileClient sourceFile = InstrumentClient(test.Directory.GetFileClient(sourceFileName)); + await sourceFile.CreateAsync(Constants.KB); + + // Act + ShareFileClient destFile = await sourceFile.RenameAsync(destinationPath: test.Directory.Name + "/" + sourceFileName); + + // Assert + Response response = await destFile.GetPropertiesAsync(); + } + #region GenerateSasTests [RecordedTest] public void CanGenerateSas_ClientConstructors() diff --git a/sdk/storage/Azure.Storage.Files.Shares/tests/FileTestBase.cs b/sdk/storage/Azure.Storage.Files.Shares/tests/FileTestBase.cs index 43972c559a9d..b5d7eff659e0 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/tests/FileTestBase.cs +++ b/sdk/storage/Azure.Storage.Files.Shares/tests/FileTestBase.cs @@ -31,7 +31,7 @@ namespace Azure.Storage.Files.Shares.Tests StorageVersionExtensions.LatestVersion, StorageVersionExtensions.MaxVersion, RecordingServiceVersion = StorageVersionExtensions.MaxVersion, - LiveServiceVersions = new object[] { StorageVersionExtensions.LatestVersion, })] + LiveServiceVersions = new object[] { StorageVersionExtensions.MaxVersion, })] public class FileTestBase : StorageTestBase { /// @@ -44,7 +44,7 @@ public class FileTestBase : StorageTestBase public static Uri s_invalidUri = new Uri("https://error.file.core.windows.net"); public FileTestBase(bool async, ShareClientOptions.ServiceVersion serviceVersion, RecordedTestMode? mode = null) - : base(async, mode) + : base(async, RecordedTestMode.Live) { _serviceVersion = serviceVersion; SharesClientBuilder = ClientBuilderExtensions.GetNewShareClientBuilder(Tenants, _serviceVersion); From 5396fb72e25d571333029b3fb4c45201177d52f8 Mon Sep 17 00:00:00 2001 From: Sean McCullough Date: Wed, 27 Oct 2021 14:06:25 -0500 Subject: [PATCH 03/21] more tests --- .../src/ShareFileClient.cs | 35 +++---------------- .../tests/FileClientTests.cs | 29 +++++++++++++-- 2 files changed, 31 insertions(+), 33 deletions(-) diff --git a/sdk/storage/Azure.Storage.Files.Shares/src/ShareFileClient.cs b/sdk/storage/Azure.Storage.Files.Shares/src/ShareFileClient.cs index 0da0450c0d91..f63d3cd5b3ff 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/src/ShareFileClient.cs +++ b/sdk/storage/Azure.Storage.Files.Shares/src/ShareFileClient.cs @@ -5824,14 +5824,11 @@ private async Task> ForceCloseHandlesInter #region Rename /// /// Renames a file. + /// This API does not support renaming a file from one share to another, or between storage accounts. /// /// /// The destination path to rename the file to. /// - /// - /// Optional destination share. If null, the file will be renamed with the - /// current share. - /// /// /// Optional parameters. /// @@ -5848,12 +5845,10 @@ private async Task> ForceCloseHandlesInter /// public virtual Response Rename( string destinationPath, - string destinationShare = default, ShareFileRenameOptions options = default, CancellationToken cancellationToken = default) => RenameInternal( destinationPath: destinationPath, - destinationShare: destinationShare, options: options, async: false, cancellationToken: cancellationToken) @@ -5861,14 +5856,11 @@ public virtual Response Rename( /// /// Renames a file. + /// This API does not support renaming a file from one share to another, or between storage accounts. /// /// /// The destination path to rename the file to. /// - /// - /// Optional destination share. If null, the file will be renamed with the - /// current share. - /// /// /// Optional parameters. /// @@ -5885,12 +5877,10 @@ public virtual Response Rename( /// public virtual async Task> RenameAsync( string destinationPath, - string destinationShare = default, ShareFileRenameOptions options = default, CancellationToken cancellationToken = default) => await RenameInternal( destinationPath: destinationPath, - destinationShare: destinationShare, options: options, async: true, cancellationToken: cancellationToken) @@ -5898,14 +5888,11 @@ public virtual async Task> RenameAsync( /// /// Renames a file. + /// This API does not support renaming a file from one share to another, or between storage accounts. /// /// /// The destination path to rename the file to. /// - /// - /// Optional destination share. If null, the file will be renamed with the - /// current share. - /// /// /// Optional parameters. /// @@ -5925,7 +5912,6 @@ public virtual async Task> RenameAsync( /// private async Task> RenameInternal( string destinationPath, - string destinationShare, ShareFileRenameOptions options, bool async, CancellationToken cancellationToken) @@ -5936,7 +5922,6 @@ private async Task> RenameInternal( nameof(ShareFileClient), message: $"{nameof(Uri)}: {Uri}\n" + - $"{nameof(destinationShare)}: {destinationShare}\n" + $"{nameof(destinationPath)}: {destinationPath}\n" + $"{nameof(options)}: {options}\n"); @@ -5946,22 +5931,12 @@ private async Task> RenameInternal( { scope.Start(); - // Build renameSource - ShareUriBuilder sourceUriBuilder = new ShareUriBuilder(Uri); - string renameSource = "/" + sourceUriBuilder.ShareName + "/" + sourceUriBuilder.DirectoryOrFilePath.EscapePath(); - - if (sourceUriBuilder.Sas != null) - { - renameSource += "?" + sourceUriBuilder.Sas; - } - // Build destination URI ShareUriBuilder destUriBuilder = new ShareUriBuilder(Uri) { Sas = null, Query = null }; - destUriBuilder.ShareName = destinationShare ?? destUriBuilder.ShareName; // ShareUriBuider will encode the DirectoryOrFilePath. We don't want the query parameters, // especially SAS, to be encoded. @@ -5998,7 +5973,7 @@ private async Task> RenameInternal( if (async) { response = await destFileClient.FileRestClient.RenameAsync( - renameSource: renameSource, + renameSource: Uri.AbsoluteUri, replaceIfExists: options?.ReplaceIfExists, ignoreReadOnly: options?.IgnoreReadOnly, metadata: options?.Metadata, @@ -6014,7 +5989,7 @@ private async Task> RenameInternal( else { response = destFileClient.FileRestClient.Rename( - renameSource: renameSource, + renameSource: Uri.AbsoluteUri, replaceIfExists: options?.ReplaceIfExists, ignoreReadOnly: options?.IgnoreReadOnly, metadata: options?.Metadata, diff --git a/sdk/storage/Azure.Storage.Files.Shares/tests/FileClientTests.cs b/sdk/storage/Azure.Storage.Files.Shares/tests/FileClientTests.cs index af9871d80555..b21475421e62 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/tests/FileClientTests.cs +++ b/sdk/storage/Azure.Storage.Files.Shares/tests/FileClientTests.cs @@ -4146,12 +4146,35 @@ public async Task RenameAsync() { // Arrange await using DisposingDirectory test = await SharesClientBuilder.GetTestDirectoryAsync(); - string sourceFileName = GetNewFileName(); - ShareFileClient sourceFile = InstrumentClient(test.Directory.GetFileClient(sourceFileName)); + string destFileName = GetNewFileName(); + ShareFileClient sourceFile = InstrumentClient(test.Directory.GetFileClient(GetNewFileName())); await sourceFile.CreateAsync(Constants.KB); // Act - ShareFileClient destFile = await sourceFile.RenameAsync(destinationPath: test.Directory.Name + "/" + sourceFileName); + ShareFileClient destFile = await sourceFile.RenameAsync(destinationPath: test.Directory.Name + "/" + destFileName); + + // Assert + Response response = await destFile.GetPropertiesAsync(); + } + + [RecordedTest] + [ServiceVersion(Min = ShareClientOptions.ServiceVersion.V2021_04_10)] + public async Task RenameAsync_DifferentDirectory() + { + // Arrange + await using DisposingShare test = await SharesClientBuilder.GetTestShareAsync(); + + ShareDirectoryClient sourceDirectory = InstrumentClient(test.Share.GetDirectoryClient(GetNewDirectoryName())); + await sourceDirectory.CreateAsync(); + ShareFileClient sourceFile = InstrumentClient(sourceDirectory.GetFileClient(GetNewFileName())); + await sourceFile.CreateAsync(Constants.KB); + + ShareDirectoryClient destDirectory = InstrumentClient(test.Share.GetDirectoryClient(GetNewDirectoryName())); + await destDirectory.CreateAsync(); + string destFileName = GetNewFileName(); + + // Act + ShareFileClient destFile = await sourceFile.RenameAsync(destinationPath: destDirectory.Name + "/" + destFileName); // Assert Response response = await destFile.GetPropertiesAsync(); From b977c90e781f1acb383362b949775d42aa5adc93 Mon Sep 17 00:00:00 2001 From: Sean McCullough Date: Wed, 27 Oct 2021 14:29:43 -0500 Subject: [PATCH 04/21] File Rename replace if exists --- .../tests/FileClientTests.cs | 50 ++++++++++++++++++- 1 file changed, 49 insertions(+), 1 deletion(-) diff --git a/sdk/storage/Azure.Storage.Files.Shares/tests/FileClientTests.cs b/sdk/storage/Azure.Storage.Files.Shares/tests/FileClientTests.cs index b21475421e62..ff26efd2b24d 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/tests/FileClientTests.cs +++ b/sdk/storage/Azure.Storage.Files.Shares/tests/FileClientTests.cs @@ -4150,11 +4150,21 @@ public async Task RenameAsync() ShareFileClient sourceFile = InstrumentClient(test.Directory.GetFileClient(GetNewFileName())); await sourceFile.CreateAsync(Constants.KB); + byte[] data = GetRandomBuffer(Constants.KB); + using Stream stream = new MemoryStream(data); + await sourceFile.UploadAsync(stream); + // Act ShareFileClient destFile = await sourceFile.RenameAsync(destinationPath: test.Directory.Name + "/" + destFileName); // Assert - Response response = await destFile.GetPropertiesAsync(); + Response downloadResponse = await destFile.DownloadAsync( + range: new HttpRange(0, Constants.KB)); + + Assert.AreEqual(data.Length, downloadResponse.Value.ContentLength); + var actual = new MemoryStream(); + await downloadResponse.Value.Content.CopyToAsync(actual); + TestHelper.AssertSequenceEqual(data, actual.ToArray()); } [RecordedTest] @@ -4180,6 +4190,44 @@ public async Task RenameAsync_DifferentDirectory() Response response = await destFile.GetPropertiesAsync(); } + [RecordedTest] + [ServiceVersion(Min = ShareClientOptions.ServiceVersion.V2021_04_10)] + [TestCase(true)] + [TestCase(false)] + public async Task RenameAsync_ReplaceIfExists(bool replaceIfExists) + { + // Arrange + await using DisposingDirectory test = await SharesClientBuilder.GetTestDirectoryAsync(); + ShareFileClient sourceFile = InstrumentClient(test.Directory.GetFileClient(GetNewFileName())); + await sourceFile.CreateAsync(Constants.KB); + ShareFileClient destFile = InstrumentClient(test.Directory.GetFileClient(GetNewFileName())); + await destFile.CreateAsync(Constants.KB); + + ShareFileRenameOptions options = new ShareFileRenameOptions + { + ReplaceIfExists = replaceIfExists + }; + + // Act + if (replaceIfExists) + { + destFile = await sourceFile.RenameAsync( + destinationPath: test.Directory.Name + "/" + destFile.Name, + options: options); + + // Assert + Response response = await destFile.GetPropertiesAsync(); + } + else + { + await TestHelper.AssertExpectedExceptionAsync( + sourceFile.RenameAsync( + destinationPath: test.Directory.Name + "/" + destFile.Name, + options: options), + e => Assert.AreEqual(ShareErrorCode.ResourceAlreadyExists.ToString(), e.ErrorCode)); + } + } + #region GenerateSasTests [RecordedTest] public void CanGenerateSas_ClientConstructors() From 9a2cd8dbb7356d43e4a3bbbe51766cf1f6db128f Mon Sep 17 00:00:00 2001 From: Sean McCullough Date: Wed, 27 Oct 2021 14:47:46 -0500 Subject: [PATCH 05/21] Rename file ignore readonly --- .../tests/FileClientTests.cs | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/sdk/storage/Azure.Storage.Files.Shares/tests/FileClientTests.cs b/sdk/storage/Azure.Storage.Files.Shares/tests/FileClientTests.cs index ff26efd2b24d..ed958a782779 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/tests/FileClientTests.cs +++ b/sdk/storage/Azure.Storage.Files.Shares/tests/FileClientTests.cs @@ -4228,6 +4228,52 @@ await TestHelper.AssertExpectedExceptionAsync( } } + [RecordedTest] + [ServiceVersion(Min = ShareClientOptions.ServiceVersion.V2021_04_10)] + [TestCase(true)] + [TestCase(false)] + public async Task RenameAsync_IgnoreReadOnly(bool ignoreReadOnly) + { + // Arrange + await using DisposingDirectory test = await SharesClientBuilder.GetTestDirectoryAsync(); + ShareFileClient sourceFile = InstrumentClient(test.Directory.GetFileClient(GetNewFileName())); + await sourceFile.CreateAsync(Constants.KB); + ShareFileClient destFile = InstrumentClient(test.Directory.GetFileClient(GetNewFileName())); + + FileSmbProperties fileSmbProperties = new FileSmbProperties + { + FileAttributes = NtfsFileAttributes.ReadOnly + }; + await destFile.CreateAsync( + maxSize: Constants.KB, + smbProperties: fileSmbProperties); + + ShareFileRenameOptions options = new ShareFileRenameOptions + { + ReplaceIfExists = true, + IgnoreReadOnly = ignoreReadOnly + }; + + // Act + if (ignoreReadOnly) + { + destFile = await sourceFile.RenameAsync( + destinationPath: test.Directory.Name + "/" + destFile.Name, + options: options); + + // Assert + Response response = await destFile.GetPropertiesAsync(); + } + else + { + await TestHelper.AssertExpectedExceptionAsync( + sourceFile.RenameAsync( + destinationPath: test.Directory.Name + "/" + destFile.Name, + options: options), + e => Assert.AreEqual(ShareErrorCode.ReadOnlyAttribute.ToString(), e.ErrorCode)); + } + } + #region GenerateSasTests [RecordedTest] public void CanGenerateSas_ClientConstructors() From 27c66ca017bce373838e5f029901fd61c47af469 Mon Sep 17 00:00:00 2001 From: Sean McCullough Date: Wed, 27 Oct 2021 15:09:59 -0500 Subject: [PATCH 06/21] Removed metadata --- .../src/Generated/DirectoryRestClient.cs | 16 +++++----------- .../src/Generated/FileRestClient.cs | 16 +++++----------- .../src/Models/ShareFileRenameOptions.cs | 14 ++------------ .../src/ShareFileClient.cs | 2 -- 4 files changed, 12 insertions(+), 36 deletions(-) diff --git a/sdk/storage/Azure.Storage.Files.Shares/src/Generated/DirectoryRestClient.cs b/sdk/storage/Azure.Storage.Files.Shares/src/Generated/DirectoryRestClient.cs index 0838fd740b6b..60c4ebee23c9 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/src/Generated/DirectoryRestClient.cs +++ b/sdk/storage/Azure.Storage.Files.Shares/src/Generated/DirectoryRestClient.cs @@ -697,7 +697,7 @@ public ResponseWithHeaders ForceCloseHandles( } } - internal HttpMessage CreateRenameRequest(string renameSource, int? timeout, bool? replaceIfExists, bool? ignoreReadOnly, IDictionary metadata, string sourceLeaseId, string destinationLeaseId, string filePermission, string filePermissionKey, CopyFileSmbInfo copyFileSmbInfo, FileHttpHeaders fileHttpHeaders) + internal HttpMessage CreateRenameRequest(string renameSource, int? timeout, bool? replaceIfExists, bool? ignoreReadOnly, string sourceLeaseId, string destinationLeaseId, string filePermission, string filePermissionKey, CopyFileSmbInfo copyFileSmbInfo, FileHttpHeaders fileHttpHeaders) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -721,10 +721,6 @@ internal HttpMessage CreateRenameRequest(string renameSource, int? timeout, bool { request.Headers.Add("x-ms-file-rename-ignore-read-only", ignoreReadOnly.Value); } - if (metadata != null) - { - request.Headers.Add("x-ms-meta-", metadata); - } if (sourceLeaseId != null) { request.Headers.Add("x-ms-source-lease-id", sourceLeaseId); @@ -770,7 +766,6 @@ internal HttpMessage CreateRenameRequest(string renameSource, int? timeout, bool /// The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/Setting-Timeouts-for-File-Service-Operations?redirectedfrom=MSDN">Setting Timeouts for File Service Operations.</a>. /// Optional. A boolean value for if the destination file already exists, whether this request will overwrite the file or not. If true, the rename will succeed and will overwrite the destination file. If not provided or if false and the destination file does exist, the request will not overwrite the destination file. If provided and the destination file doesn’t exist, the rename will succeed. Note: This value does not override the x-ms-file-copy-ignore-read-only header value. /// Optional. A boolean value that specifies whether the ReadOnly attribute on a preexisting destination file should be respected. If true, the rename will succeed, otherwise, a previous file at the destination with the ReadOnly attribute set will cause the rename to fail. - /// A name-value pair to associate with a file storage object. /// Required if the source file has an active infinite lease. /// Required if the destination file has an active infinite lease. The lease ID specified for this header must match the lease ID of the destination file. If the request does not include the lease ID or it is not valid, the operation fails with status code 412 (Precondition Failed). If this header is specified and the destination file does not currently have an active lease, the operation will also fail with status code 412 (Precondition Failed). /// If specified the permission (security descriptor) shall be set for the directory/file. This header can be used if Permission size is <= 8KB, else x-ms-file-permission-key header shall be used. Default value: Inherit. If SDDL is specified as input, it must have owner, group and dacl. Note: Only one of the x-ms-file-permission or x-ms-file-permission-key should be specified. @@ -779,14 +774,14 @@ internal HttpMessage CreateRenameRequest(string renameSource, int? timeout, bool /// Parameter group. /// The cancellation token to use. /// is null. - public async Task> RenameAsync(string renameSource, int? timeout = null, bool? replaceIfExists = null, bool? ignoreReadOnly = null, IDictionary metadata = null, string sourceLeaseId = null, string destinationLeaseId = null, string filePermission = null, string filePermissionKey = null, CopyFileSmbInfo copyFileSmbInfo = null, FileHttpHeaders fileHttpHeaders = null, CancellationToken cancellationToken = default) + public async Task> RenameAsync(string renameSource, int? timeout = null, bool? replaceIfExists = null, bool? ignoreReadOnly = null, string sourceLeaseId = null, string destinationLeaseId = null, string filePermission = null, string filePermissionKey = null, CopyFileSmbInfo copyFileSmbInfo = null, FileHttpHeaders fileHttpHeaders = null, CancellationToken cancellationToken = default) { if (renameSource == null) { throw new ArgumentNullException(nameof(renameSource)); } - using var message = CreateRenameRequest(renameSource, timeout, replaceIfExists, ignoreReadOnly, metadata, sourceLeaseId, destinationLeaseId, filePermission, filePermissionKey, copyFileSmbInfo, fileHttpHeaders); + using var message = CreateRenameRequest(renameSource, timeout, replaceIfExists, ignoreReadOnly, sourceLeaseId, destinationLeaseId, filePermission, filePermissionKey, copyFileSmbInfo, fileHttpHeaders); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); var headers = new DirectoryRenameHeaders(message.Response); switch (message.Response.Status) @@ -803,7 +798,6 @@ public async Task> RenameAsync(strin /// The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/Setting-Timeouts-for-File-Service-Operations?redirectedfrom=MSDN">Setting Timeouts for File Service Operations.</a>. /// Optional. A boolean value for if the destination file already exists, whether this request will overwrite the file or not. If true, the rename will succeed and will overwrite the destination file. If not provided or if false and the destination file does exist, the request will not overwrite the destination file. If provided and the destination file doesn’t exist, the rename will succeed. Note: This value does not override the x-ms-file-copy-ignore-read-only header value. /// Optional. A boolean value that specifies whether the ReadOnly attribute on a preexisting destination file should be respected. If true, the rename will succeed, otherwise, a previous file at the destination with the ReadOnly attribute set will cause the rename to fail. - /// A name-value pair to associate with a file storage object. /// Required if the source file has an active infinite lease. /// Required if the destination file has an active infinite lease. The lease ID specified for this header must match the lease ID of the destination file. If the request does not include the lease ID or it is not valid, the operation fails with status code 412 (Precondition Failed). If this header is specified and the destination file does not currently have an active lease, the operation will also fail with status code 412 (Precondition Failed). /// If specified the permission (security descriptor) shall be set for the directory/file. This header can be used if Permission size is <= 8KB, else x-ms-file-permission-key header shall be used. Default value: Inherit. If SDDL is specified as input, it must have owner, group and dacl. Note: Only one of the x-ms-file-permission or x-ms-file-permission-key should be specified. @@ -812,14 +806,14 @@ public async Task> RenameAsync(strin /// Parameter group. /// The cancellation token to use. /// is null. - public ResponseWithHeaders Rename(string renameSource, int? timeout = null, bool? replaceIfExists = null, bool? ignoreReadOnly = null, IDictionary metadata = null, string sourceLeaseId = null, string destinationLeaseId = null, string filePermission = null, string filePermissionKey = null, CopyFileSmbInfo copyFileSmbInfo = null, FileHttpHeaders fileHttpHeaders = null, CancellationToken cancellationToken = default) + public ResponseWithHeaders Rename(string renameSource, int? timeout = null, bool? replaceIfExists = null, bool? ignoreReadOnly = null, string sourceLeaseId = null, string destinationLeaseId = null, string filePermission = null, string filePermissionKey = null, CopyFileSmbInfo copyFileSmbInfo = null, FileHttpHeaders fileHttpHeaders = null, CancellationToken cancellationToken = default) { if (renameSource == null) { throw new ArgumentNullException(nameof(renameSource)); } - using var message = CreateRenameRequest(renameSource, timeout, replaceIfExists, ignoreReadOnly, metadata, sourceLeaseId, destinationLeaseId, filePermission, filePermissionKey, copyFileSmbInfo, fileHttpHeaders); + using var message = CreateRenameRequest(renameSource, timeout, replaceIfExists, ignoreReadOnly, sourceLeaseId, destinationLeaseId, filePermission, filePermissionKey, copyFileSmbInfo, fileHttpHeaders); _pipeline.Send(message, cancellationToken); var headers = new DirectoryRenameHeaders(message.Response); switch (message.Response.Status) diff --git a/sdk/storage/Azure.Storage.Files.Shares/src/Generated/FileRestClient.cs b/sdk/storage/Azure.Storage.Files.Shares/src/Generated/FileRestClient.cs index 97de6104634d..3c0f5d3da34c 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/src/Generated/FileRestClient.cs +++ b/sdk/storage/Azure.Storage.Files.Shares/src/Generated/FileRestClient.cs @@ -1504,7 +1504,7 @@ public ResponseWithHeaders ForceCloseHandles(strin } } - internal HttpMessage CreateRenameRequest(string renameSource, int? timeout, bool? replaceIfExists, bool? ignoreReadOnly, IDictionary metadata, string sourceLeaseId, string destinationLeaseId, string filePermission, string filePermissionKey, CopyFileSmbInfo copyFileSmbInfo, FileHttpHeaders fileHttpHeaders) + internal HttpMessage CreateRenameRequest(string renameSource, int? timeout, bool? replaceIfExists, bool? ignoreReadOnly, string sourceLeaseId, string destinationLeaseId, string filePermission, string filePermissionKey, CopyFileSmbInfo copyFileSmbInfo, FileHttpHeaders fileHttpHeaders) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -1527,10 +1527,6 @@ internal HttpMessage CreateRenameRequest(string renameSource, int? timeout, bool { request.Headers.Add("x-ms-file-rename-ignore-read-only", ignoreReadOnly.Value); } - if (metadata != null) - { - request.Headers.Add("x-ms-meta-", metadata); - } if (sourceLeaseId != null) { request.Headers.Add("x-ms-source-lease-id", sourceLeaseId); @@ -1576,7 +1572,6 @@ internal HttpMessage CreateRenameRequest(string renameSource, int? timeout, bool /// The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/Setting-Timeouts-for-File-Service-Operations?redirectedfrom=MSDN">Setting Timeouts for File Service Operations.</a>. /// Optional. A boolean value for if the destination file already exists, whether this request will overwrite the file or not. If true, the rename will succeed and will overwrite the destination file. If not provided or if false and the destination file does exist, the request will not overwrite the destination file. If provided and the destination file doesn’t exist, the rename will succeed. Note: This value does not override the x-ms-file-copy-ignore-read-only header value. /// Optional. A boolean value that specifies whether the ReadOnly attribute on a preexisting destination file should be respected. If true, the rename will succeed, otherwise, a previous file at the destination with the ReadOnly attribute set will cause the rename to fail. - /// A name-value pair to associate with a file storage object. /// Required if the source file has an active infinite lease. /// Required if the destination file has an active infinite lease. The lease ID specified for this header must match the lease ID of the destination file. If the request does not include the lease ID or it is not valid, the operation fails with status code 412 (Precondition Failed). If this header is specified and the destination file does not currently have an active lease, the operation will also fail with status code 412 (Precondition Failed). /// If specified the permission (security descriptor) shall be set for the directory/file. This header can be used if Permission size is <= 8KB, else x-ms-file-permission-key header shall be used. Default value: Inherit. If SDDL is specified as input, it must have owner, group and dacl. Note: Only one of the x-ms-file-permission or x-ms-file-permission-key should be specified. @@ -1585,14 +1580,14 @@ internal HttpMessage CreateRenameRequest(string renameSource, int? timeout, bool /// Parameter group. /// The cancellation token to use. /// is null. - public async Task> RenameAsync(string renameSource, int? timeout = null, bool? replaceIfExists = null, bool? ignoreReadOnly = null, IDictionary metadata = null, string sourceLeaseId = null, string destinationLeaseId = null, string filePermission = null, string filePermissionKey = null, CopyFileSmbInfo copyFileSmbInfo = null, FileHttpHeaders fileHttpHeaders = null, CancellationToken cancellationToken = default) + public async Task> RenameAsync(string renameSource, int? timeout = null, bool? replaceIfExists = null, bool? ignoreReadOnly = null, string sourceLeaseId = null, string destinationLeaseId = null, string filePermission = null, string filePermissionKey = null, CopyFileSmbInfo copyFileSmbInfo = null, FileHttpHeaders fileHttpHeaders = null, CancellationToken cancellationToken = default) { if (renameSource == null) { throw new ArgumentNullException(nameof(renameSource)); } - using var message = CreateRenameRequest(renameSource, timeout, replaceIfExists, ignoreReadOnly, metadata, sourceLeaseId, destinationLeaseId, filePermission, filePermissionKey, copyFileSmbInfo, fileHttpHeaders); + using var message = CreateRenameRequest(renameSource, timeout, replaceIfExists, ignoreReadOnly, sourceLeaseId, destinationLeaseId, filePermission, filePermissionKey, copyFileSmbInfo, fileHttpHeaders); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); var headers = new FileRenameHeaders(message.Response); switch (message.Response.Status) @@ -1609,7 +1604,6 @@ public async Task> RenameAsync(string ren /// The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/Setting-Timeouts-for-File-Service-Operations?redirectedfrom=MSDN">Setting Timeouts for File Service Operations.</a>. /// Optional. A boolean value for if the destination file already exists, whether this request will overwrite the file or not. If true, the rename will succeed and will overwrite the destination file. If not provided or if false and the destination file does exist, the request will not overwrite the destination file. If provided and the destination file doesn’t exist, the rename will succeed. Note: This value does not override the x-ms-file-copy-ignore-read-only header value. /// Optional. A boolean value that specifies whether the ReadOnly attribute on a preexisting destination file should be respected. If true, the rename will succeed, otherwise, a previous file at the destination with the ReadOnly attribute set will cause the rename to fail. - /// A name-value pair to associate with a file storage object. /// Required if the source file has an active infinite lease. /// Required if the destination file has an active infinite lease. The lease ID specified for this header must match the lease ID of the destination file. If the request does not include the lease ID or it is not valid, the operation fails with status code 412 (Precondition Failed). If this header is specified and the destination file does not currently have an active lease, the operation will also fail with status code 412 (Precondition Failed). /// If specified the permission (security descriptor) shall be set for the directory/file. This header can be used if Permission size is <= 8KB, else x-ms-file-permission-key header shall be used. Default value: Inherit. If SDDL is specified as input, it must have owner, group and dacl. Note: Only one of the x-ms-file-permission or x-ms-file-permission-key should be specified. @@ -1618,14 +1612,14 @@ public async Task> RenameAsync(string ren /// Parameter group. /// The cancellation token to use. /// is null. - public ResponseWithHeaders Rename(string renameSource, int? timeout = null, bool? replaceIfExists = null, bool? ignoreReadOnly = null, IDictionary metadata = null, string sourceLeaseId = null, string destinationLeaseId = null, string filePermission = null, string filePermissionKey = null, CopyFileSmbInfo copyFileSmbInfo = null, FileHttpHeaders fileHttpHeaders = null, CancellationToken cancellationToken = default) + public ResponseWithHeaders Rename(string renameSource, int? timeout = null, bool? replaceIfExists = null, bool? ignoreReadOnly = null, string sourceLeaseId = null, string destinationLeaseId = null, string filePermission = null, string filePermissionKey = null, CopyFileSmbInfo copyFileSmbInfo = null, FileHttpHeaders fileHttpHeaders = null, CancellationToken cancellationToken = default) { if (renameSource == null) { throw new ArgumentNullException(nameof(renameSource)); } - using var message = CreateRenameRequest(renameSource, timeout, replaceIfExists, ignoreReadOnly, metadata, sourceLeaseId, destinationLeaseId, filePermission, filePermissionKey, copyFileSmbInfo, fileHttpHeaders); + using var message = CreateRenameRequest(renameSource, timeout, replaceIfExists, ignoreReadOnly, sourceLeaseId, destinationLeaseId, filePermission, filePermissionKey, copyFileSmbInfo, fileHttpHeaders); _pipeline.Send(message, cancellationToken); var headers = new FileRenameHeaders(message.Response); switch (message.Response.Status) diff --git a/sdk/storage/Azure.Storage.Files.Shares/src/Models/ShareFileRenameOptions.cs b/sdk/storage/Azure.Storage.Files.Shares/src/Models/ShareFileRenameOptions.cs index 6072a34ae00b..997c0c9daaec 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/src/Models/ShareFileRenameOptions.cs +++ b/sdk/storage/Azure.Storage.Files.Shares/src/Models/ShareFileRenameOptions.cs @@ -19,24 +19,14 @@ public class ShareFileRenameOptions /// file does exist, the request will not overwrite the destination file. If provided and the destination file doesn’t exist, /// the rename will succeed. /// - public bool ReplaceIfExists { get; set; } + public bool? ReplaceIfExists { get; set; } /// /// Optional. A boolean value that specifies whether the ReadOnly attribute on a preexisting destination file should be respected. /// If true, the rename will succeed, otherwise, a previous file at the destination with the ReadOnly attribute set will cause the /// rename to fail. /// - public bool IgnoreReadOnly { get; set; } - - /// - /// Optional. Name-value pairs associated with the file as metadata. If no name-value pairs are specified, the operation will copy - /// the metadata from the source blob or file to the destination file. If one or more name-value pairs are specified, the - /// destination file is created with the specified metadata, and the metadata is not copied from the source file. Metadata names - /// must adhere to the naming rules for C# identifiers. - /// -#pragma warning disable CA2227 // Collection properties should be read only - public Metadata Metadata { get; set; } -#pragma warning restore CA2227 // Collection properties should be read only + public bool? IgnoreReadOnly { get; set; } /// /// Source request conditions. diff --git a/sdk/storage/Azure.Storage.Files.Shares/src/ShareFileClient.cs b/sdk/storage/Azure.Storage.Files.Shares/src/ShareFileClient.cs index f63d3cd5b3ff..8e35f1b97199 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/src/ShareFileClient.cs +++ b/sdk/storage/Azure.Storage.Files.Shares/src/ShareFileClient.cs @@ -5976,7 +5976,6 @@ private async Task> RenameInternal( renameSource: Uri.AbsoluteUri, replaceIfExists: options?.ReplaceIfExists, ignoreReadOnly: options?.IgnoreReadOnly, - metadata: options?.Metadata, sourceLeaseId: options?.SourceRequestConditions?.LeaseId, destinationLeaseId: options?.DestinationRequestConditions?.LeaseId, filePermission: options?.FilePermission, @@ -5992,7 +5991,6 @@ private async Task> RenameInternal( renameSource: Uri.AbsoluteUri, replaceIfExists: options?.ReplaceIfExists, ignoreReadOnly: options?.IgnoreReadOnly, - metadata: options?.Metadata, sourceLeaseId: options?.SourceRequestConditions?.LeaseId, destinationLeaseId: options?.DestinationRequestConditions?.LeaseId, filePermission: options?.FilePermission, From ee93ff98981d8a393ff0f445769347de5cca724d Mon Sep 17 00:00:00 2001 From: Sean McCullough Date: Wed, 27 Oct 2021 15:19:46 -0500 Subject: [PATCH 07/21] Rename File Source Lease --- .../tests/FileClientTests.cs | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/sdk/storage/Azure.Storage.Files.Shares/tests/FileClientTests.cs b/sdk/storage/Azure.Storage.Files.Shares/tests/FileClientTests.cs index ed958a782779..431fe3c9102e 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/tests/FileClientTests.cs +++ b/sdk/storage/Azure.Storage.Files.Shares/tests/FileClientTests.cs @@ -4274,6 +4274,48 @@ await TestHelper.AssertExpectedExceptionAsync( } } + [RecordedTest] + [ServiceVersion(Min = ShareClientOptions.ServiceVersion.V2021_04_10)] + [TestCase(true)] + [TestCase(false)] + public async Task RenameAsync_SourceLeaseId(bool includeLeaseId) + { + // Arrange + await using DisposingDirectory test = await SharesClientBuilder.GetTestDirectoryAsync(); + ShareFileClient sourceFile = InstrumentClient(test.Directory.GetFileClient(GetNewFileName())); + await sourceFile.CreateAsync(Constants.KB); + string leaseId = Recording.Random.NewGuid().ToString(); + ShareLeaseClient shareLeaseClient = InstrumentClient(sourceFile.GetShareLeaseClient(leaseId)); + await shareLeaseClient.AcquireAsync(); + string destFileName = GetNewFileName(); + + // Act + if (includeLeaseId) + { + ShareFileRenameOptions options = new ShareFileRenameOptions + { + SourceRequestConditions = new ShareFileRequestConditions + { + LeaseId = leaseId + } + }; + + ShareFileClient destFile = await sourceFile.RenameAsync( + destinationPath: test.Directory.Name + "/" + destFileName, + options: options); + + // Assert + await destFile.GetPropertiesAsync(); + } + else + { + await TestHelper.AssertExpectedExceptionAsync( + sourceFile.RenameAsync( + destinationPath: test.Directory.Name + "/" + destFileName), + e => Assert.AreEqual("LeaseIdMissing", e.ErrorCode)); + } + } + #region GenerateSasTests [RecordedTest] public void CanGenerateSas_ClientConstructors() From 4b6d2c7b6f586516833d1a6b5e902617816df25c Mon Sep 17 00:00:00 2001 From: Sean McCullough Date: Wed, 27 Oct 2021 15:23:03 -0500 Subject: [PATCH 08/21] Rename file dest lease --- .../tests/FileClientTests.cs | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/sdk/storage/Azure.Storage.Files.Shares/tests/FileClientTests.cs b/sdk/storage/Azure.Storage.Files.Shares/tests/FileClientTests.cs index 431fe3c9102e..4958b1aa4e14 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/tests/FileClientTests.cs +++ b/sdk/storage/Azure.Storage.Files.Shares/tests/FileClientTests.cs @@ -4316,6 +4316,51 @@ await TestHelper.AssertExpectedExceptionAsync( } } + [RecordedTest] + [ServiceVersion(Min = ShareClientOptions.ServiceVersion.V2021_04_10)] + [TestCase(true)] + [TestCase(false)] + public async Task RenameAsync_DestinationLeaseId(bool includeLeaseId) + { + // Arrange + await using DisposingDirectory test = await SharesClientBuilder.GetTestDirectoryAsync(); + ShareFileClient sourceFile = InstrumentClient(test.Directory.GetFileClient(GetNewFileName())); + await sourceFile.CreateAsync(Constants.KB); + ShareFileClient destFile = InstrumentClient(test.Directory.GetFileClient(GetNewFileName())); + await destFile.CreateAsync(Constants.KB); + string leaseId = Recording.Random.NewGuid().ToString(); + ShareLeaseClient shareLeaseClient = InstrumentClient(destFile.GetShareLeaseClient(leaseId)); + await shareLeaseClient.AcquireAsync(); + + ShareFileRenameOptions options = new ShareFileRenameOptions + { + ReplaceIfExists = true + }; + + // Act + if (includeLeaseId) + { + options.DestinationRequestConditions = new ShareFileRequestConditions + { + LeaseId = leaseId + }; + destFile = await sourceFile.RenameAsync( + destinationPath: test.Directory.Name + "/" + destFile.Name, + options: options); + + // Assert + await destFile.GetPropertiesAsync(); + } + else + { + await TestHelper.AssertExpectedExceptionAsync( + sourceFile.RenameAsync( + destinationPath: test.Directory.Name + "/" + destFile.Name, + options: options), + e => Assert.AreEqual("LeaseIdMissing", e.ErrorCode)); + } + } + #region GenerateSasTests [RecordedTest] public void CanGenerateSas_ClientConstructors() From 31549e74bc248439107b29b070e6830a22ab31b8 Mon Sep 17 00:00:00 2001 From: Sean McCullough Date: Thu, 28 Oct 2021 10:48:49 -0500 Subject: [PATCH 09/21] Rename File Content Type --- .../tests/FileClientTests.cs | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/sdk/storage/Azure.Storage.Files.Shares/tests/FileClientTests.cs b/sdk/storage/Azure.Storage.Files.Shares/tests/FileClientTests.cs index 4958b1aa4e14..fc8e1b58bc30 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/tests/FileClientTests.cs +++ b/sdk/storage/Azure.Storage.Files.Shares/tests/FileClientTests.cs @@ -4361,6 +4361,32 @@ await TestHelper.AssertExpectedExceptionAsync( } } + [Ignore("Service bug")] + [RecordedTest] + [ServiceVersion(Min = ShareClientOptions.ServiceVersion.V2021_04_10)] + public async Task RenameAsync_ContentType() + { + // Arrange + await using DisposingDirectory test = await SharesClientBuilder.GetTestDirectoryAsync(); + ShareFileClient sourceFile = InstrumentClient(test.Directory.GetFileClient(GetNewFileName())); + await sourceFile.CreateAsync(Constants.KB); + string destFileName = GetNewFileName(); + + ShareFileRenameOptions options = new ShareFileRenameOptions + { + ContentType = "contentType" + }; + + // Act + ShareFileClient destFile = await sourceFile.RenameAsync( + destinationPath: test.Directory.Name + "/" + destFileName, + options: options); + + // Assert + Response response = await destFile.GetPropertiesAsync(); + Assert.AreEqual(options.ContentType, response.Value.ContentType); + } + #region GenerateSasTests [RecordedTest] public void CanGenerateSas_ClientConstructors() From 1c46a9ee0f7c9648ba07b665f6e0beaab55a81c0 Mon Sep 17 00:00:00 2001 From: Sean McCullough Date: Thu, 28 Oct 2021 11:02:59 -0500 Subject: [PATCH 10/21] update --- .../src/Generated/DirectoryRestClient.cs | 4 ---- .../src/Generated/FileRestClient.cs | 4 ---- .../src/Generated/Models/CopyFileSmbInfo.cs | 4 ++-- .../src/Models/ShareFileRenameOptions.cs | 6 ------ .../Azure.Storage.Files.Shares/src/ShareFileClient.cs | 1 - 5 files changed, 2 insertions(+), 17 deletions(-) diff --git a/sdk/storage/Azure.Storage.Files.Shares/src/Generated/DirectoryRestClient.cs b/sdk/storage/Azure.Storage.Files.Shares/src/Generated/DirectoryRestClient.cs index 60c4ebee23c9..79fe1fbbe0df 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/src/Generated/DirectoryRestClient.cs +++ b/sdk/storage/Azure.Storage.Files.Shares/src/Generated/DirectoryRestClient.cs @@ -741,10 +741,6 @@ internal HttpMessage CreateRenameRequest(string renameSource, int? timeout, bool { request.Headers.Add("x-ms-file-last-write-time", copyFileSmbInfo.FileLastWriteTime); } - if (copyFileSmbInfo?.SetArchiveAttribute != null) - { - request.Headers.Add("x-ms-file-copy-set-archive", copyFileSmbInfo.SetArchiveAttribute.Value); - } if (filePermission != null) { request.Headers.Add("x-ms-file-permission", filePermission); diff --git a/sdk/storage/Azure.Storage.Files.Shares/src/Generated/FileRestClient.cs b/sdk/storage/Azure.Storage.Files.Shares/src/Generated/FileRestClient.cs index 3c0f5d3da34c..fb9f4b526fe5 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/src/Generated/FileRestClient.cs +++ b/sdk/storage/Azure.Storage.Files.Shares/src/Generated/FileRestClient.cs @@ -1547,10 +1547,6 @@ internal HttpMessage CreateRenameRequest(string renameSource, int? timeout, bool { request.Headers.Add("x-ms-file-last-write-time", copyFileSmbInfo.FileLastWriteTime); } - if (copyFileSmbInfo?.SetArchiveAttribute != null) - { - request.Headers.Add("x-ms-file-copy-set-archive", copyFileSmbInfo.SetArchiveAttribute.Value); - } if (filePermission != null) { request.Headers.Add("x-ms-file-permission", filePermission); diff --git a/sdk/storage/Azure.Storage.Files.Shares/src/Generated/Models/CopyFileSmbInfo.cs b/sdk/storage/Azure.Storage.Files.Shares/src/Generated/Models/CopyFileSmbInfo.cs index 055ee7986a1d..b85054f2c286 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/src/Generated/Models/CopyFileSmbInfo.cs +++ b/sdk/storage/Azure.Storage.Files.Shares/src/Generated/Models/CopyFileSmbInfo.cs @@ -21,11 +21,11 @@ public CopyFileSmbInfo() public string FileCreationTime { get; set; } /// Specifies either the option to copy file last write time from a source file(source) to a target file or a time value in ISO 8601 format to set as last write time on a target file. public string FileLastWriteTime { get; set; } - /// Specifies the option to set archive attribute on a target file. True means archive attribute will be set on a target file despite attribute overrides or a source file state. - public bool? SetArchiveAttribute { get; set; } /// Specifies the option to copy file security descriptor from source file or to set it using the value which is defined by the header value of x-ms-file-permission or x-ms-file-permission-key. public PermissionCopyMode? FilePermissionCopyMode { get; set; } /// Specifies the option to overwrite the target file if it already exists and has read-only attribute set. public bool? IgnoreReadOnly { get; set; } + /// Specifies the option to set archive attribute on a target file. True means archive attribute will be set on a target file despite attribute overrides or a source file state. + public bool? SetArchiveAttribute { get; set; } } } diff --git a/sdk/storage/Azure.Storage.Files.Shares/src/Models/ShareFileRenameOptions.cs b/sdk/storage/Azure.Storage.Files.Shares/src/Models/ShareFileRenameOptions.cs index 997c0c9daaec..5b7f4e5655b3 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/src/Models/ShareFileRenameOptions.cs +++ b/sdk/storage/Azure.Storage.Files.Shares/src/Models/ShareFileRenameOptions.cs @@ -53,12 +53,6 @@ public class ShareFileRenameOptions /// public DateTimeOffset? FileLastWrittenOn { get; set; } - /// - /// Optional. A  boolean value that specifies whether the Archive attribute should be set, - /// irrespective of the x-ms-file-attributes header value. - /// - public bool SetArchiveAttribute { get; set; } - /// /// Optional file permission to set on the destination. /// diff --git a/sdk/storage/Azure.Storage.Files.Shares/src/ShareFileClient.cs b/sdk/storage/Azure.Storage.Files.Shares/src/ShareFileClient.cs index 8e35f1b97199..f805c4b8508f 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/src/ShareFileClient.cs +++ b/sdk/storage/Azure.Storage.Files.Shares/src/ShareFileClient.cs @@ -5961,7 +5961,6 @@ private async Task> RenameInternal( FileAttributes = options?.FileAttributes?.ToAttributesString(), FileCreationTime = options?.FileCreatedOn.ToFileDateTimeString(), FileLastWriteTime = options?.FileLastWrittenOn.ToFileDateTimeString(), - SetArchiveAttribute = options?.SetArchiveAttribute, IgnoreReadOnly = options?.IgnoreReadOnly }; From 6f243423243c13adf4f79ce66bb73ea2d69af6d0 Mon Sep 17 00:00:00 2001 From: Sean McCullough Date: Thu, 28 Oct 2021 11:33:22 -0500 Subject: [PATCH 11/21] SAS test --- .../tests/FileClientTests.cs | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/sdk/storage/Azure.Storage.Files.Shares/tests/FileClientTests.cs b/sdk/storage/Azure.Storage.Files.Shares/tests/FileClientTests.cs index fc8e1b58bc30..bf7c6c0d1c71 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/tests/FileClientTests.cs +++ b/sdk/storage/Azure.Storage.Files.Shares/tests/FileClientTests.cs @@ -4387,6 +4387,58 @@ public async Task RenameAsync_ContentType() Assert.AreEqual(options.ContentType, response.Value.ContentType); } + [RecordedTest] + [ServiceVersion(Min = ShareClientOptions.ServiceVersion.V2021_04_10)] + public async Task RenameAsync_NonAsciiSourceAndDestination() + { + // Arrange + await using DisposingDirectory test = await SharesClientBuilder.GetTestDirectoryAsync(); + ShareFileClient sourceFile = InstrumentClient(test.Directory.GetFileClient(GetNewNonAsciiFileName())); + await sourceFile.CreateAsync(Constants.KB); + + string destFileName = GetNewNonAsciiFileName(); + + // Act + ShareFileClient destFile = await sourceFile.RenameAsync(destinationPath: test.Directory.Name + "/" + destFileName); + + // Assert + await destFile.GetPropertiesAsync(); + } + + [RecordedTest] + [ServiceVersion(Min = ShareClientOptions.ServiceVersion.V2021_04_10)] + public async Task RenameAsync_ShareSAS() + { + // Arrange + await using DisposingDirectory test = await SharesClientBuilder.GetTestDirectoryAsync(); + ShareFileClient sourceFile = InstrumentClient(test.Directory.GetFileClient(GetNewFileName())); + await sourceFile.CreateAsync(Constants.KB); + string destFileName = GetNewFileName(); + + ShareSasBuilder shareSasBuilder = new ShareSasBuilder + { + ShareName = test.Share.Name, + ExpiresOn = Recording.UtcNow.AddDays(-1) + }; + shareSasBuilder.SetPermissions(ShareSasPermissions.All); + SasQueryParameters sasQueryParameters = shareSasBuilder.ToSasQueryParameters(Tenants.GetNewSharedKeyCredentials()); + + ShareUriBuilder shareUriBuilder = new ShareUriBuilder(sourceFile.Uri) + { + Sas = sasQueryParameters + }; + + sourceFile = InstrumentClient(new ShareFileClient(shareUriBuilder.ToUri(), GetOptions())); + await sourceFile.GetPropertiesAsync(); + + // Act + ShareFileClient destFile = await sourceFile.RenameAsync( + destinationPath: test.Directory.Name + "/" + destFileName + "?" + sasQueryParameters); + + // Assert + await destFile.GetPropertiesAsync(); + } + #region GenerateSasTests [RecordedTest] public void CanGenerateSas_ClientConstructors() From e82e9ccd6bd180211ca16cf69f537327f0f325f2 Mon Sep 17 00:00:00 2001 From: Sean McCullough Date: Fri, 29 Oct 2021 12:06:18 -0500 Subject: [PATCH 12/21] Fixed SAS test --- .../Azure.Storage.Files.Shares/tests/FileClientTests.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sdk/storage/Azure.Storage.Files.Shares/tests/FileClientTests.cs b/sdk/storage/Azure.Storage.Files.Shares/tests/FileClientTests.cs index 5aa7010e1a88..3bbda3a29580 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/tests/FileClientTests.cs +++ b/sdk/storage/Azure.Storage.Files.Shares/tests/FileClientTests.cs @@ -4469,7 +4469,7 @@ public async Task RenameAsync_ShareSAS() ShareSasBuilder shareSasBuilder = new ShareSasBuilder { ShareName = test.Share.Name, - ExpiresOn = Recording.UtcNow.AddDays(-1) + ExpiresOn = Recording.UtcNow.AddDays(1) }; shareSasBuilder.SetPermissions(ShareSasPermissions.All); SasQueryParameters sasQueryParameters = shareSasBuilder.ToSasQueryParameters(Tenants.GetNewSharedKeyCredentials()); @@ -4480,7 +4480,6 @@ public async Task RenameAsync_ShareSAS() }; sourceFile = InstrumentClient(new ShareFileClient(shareUriBuilder.ToUri(), GetOptions())); - await sourceFile.GetPropertiesAsync(); // Act ShareFileClient destFile = await sourceFile.RenameAsync( From 40ae3a6ae1f30439691b326f1d5734fd82562698 Mon Sep 17 00:00:00 2001 From: Sean McCullough Date: Fri, 29 Oct 2021 13:18:49 -0500 Subject: [PATCH 13/21] Directory Rename --- .../src/Generated/DirectoryRestClient.cs | 2 +- .../src/ShareDirectoryClient.cs | 197 ++++++++++++++++++ .../tests/DirectoryClientTests.cs | 17 ++ 3 files changed, 215 insertions(+), 1 deletion(-) diff --git a/sdk/storage/Azure.Storage.Files.Shares/src/Generated/DirectoryRestClient.cs b/sdk/storage/Azure.Storage.Files.Shares/src/Generated/DirectoryRestClient.cs index 79fe1fbbe0df..fe55d68eb1f6 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/src/Generated/DirectoryRestClient.cs +++ b/sdk/storage/Azure.Storage.Files.Shares/src/Generated/DirectoryRestClient.cs @@ -705,7 +705,7 @@ internal HttpMessage CreateRenameRequest(string renameSource, int? timeout, bool var uri = new RawRequestUriBuilder(); uri.AppendRaw(url, false); uri.AppendQuery("restype", "directory", true); - uri.AppendQuery("comp", "list", true); + uri.AppendQuery("comp", "rename", true); if (timeout != null) { uri.AppendQuery("timeout", timeout.Value, true); diff --git a/sdk/storage/Azure.Storage.Files.Shares/src/ShareDirectoryClient.cs b/sdk/storage/Azure.Storage.Files.Shares/src/ShareDirectoryClient.cs index 09f30428c47b..ab93cb7aff3d 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/src/ShareDirectoryClient.cs +++ b/sdk/storage/Azure.Storage.Files.Shares/src/ShareDirectoryClient.cs @@ -2321,6 +2321,203 @@ private async Task> ForceCloseHandlesInter } #endregion ForceCloseHandles + #region Rename + /// + /// Renames a directory. + /// This API does not support renaming a directory from one share to another, or between storage accounts. + /// + /// + /// The destination path to rename the directory to. + /// + /// + /// Optional parameters. + /// + /// + /// Optional to propagate + /// notifications that the operation should be cancelled. + /// + /// + /// A pointed at the newly renamed directory. + /// + /// + /// A will be thrown if + /// a failure occurs. + /// + public virtual Response Rename( + string destinationPath, + ShareFileRenameOptions options = default, + CancellationToken cancellationToken = default) + => RenameInternal( + destinationPath: destinationPath, + options: options, + async: false, + cancellationToken: cancellationToken) + .EnsureCompleted(); + + /// + /// Renames a directory. + /// This API does not support renaming a directory from one share to another, or between storage accounts. + /// + /// + /// The destination path to rename the directory to. + /// + /// + /// Optional parameters. + /// + /// + /// Optional to propagate + /// notifications that the operation should be cancelled. + /// + /// + /// A pointed at the newly renamed directory. + /// + /// + /// A will be thrown if + /// a failure occurs. + /// + public virtual async Task> RenameAsync( + string destinationPath, + ShareFileRenameOptions options = default, + CancellationToken cancellationToken = default) + => await RenameInternal( + destinationPath: destinationPath, + options: options, + async: true, + cancellationToken: cancellationToken) + .ConfigureAwait(false); + + /// + /// Renames a directory. + /// This API does not support renaming a directory from one share to another, or between storage accounts. + /// + /// + /// The destination path to rename the directory to. + /// + /// + /// Optional parameters. + /// + /// + /// Whether to invoke the operation asynchronously. + /// + /// + /// Optional to propagate + /// notifications that the operation should be cancelled. + /// + /// + /// A pointed at the newly renamed directory. + /// + /// + /// A will be thrown if + /// a failure occurs. + /// + private async Task> RenameInternal( + string destinationPath, + ShareFileRenameOptions options, + bool async, + CancellationToken cancellationToken) + { + using (ClientConfiguration.Pipeline.BeginLoggingScope(nameof(ShareFileClient))) + { + ClientConfiguration.Pipeline.LogMethodEnter( + nameof(ShareDirectoryClient), + message: + $"{nameof(Uri)}: {Uri}\n" + + $"{nameof(destinationPath)}: {destinationPath}\n" + + $"{nameof(options)}: {options}\n"); + + DiagnosticScope scope = ClientConfiguration.ClientDiagnostics.CreateScope($"{nameof(ShareDirectoryClient)}.{nameof(Rename)}"); + + try + { + scope.Start(); + + // Build destination URI + ShareUriBuilder destUriBuilder = new ShareUriBuilder(Uri) + { + Sas = null, + Query = null + }; + + // ShareUriBuider will encode the DirectoryOrFilePath. We don't want the query parameters, + // especially SAS, to be encoded. + string[] split = destinationPath.Split('?'); + if (split.Length == 2) + { + destUriBuilder.DirectoryOrFilePath = split[0]; + destUriBuilder.Query = split[1]; + } + else + { + destUriBuilder.DirectoryOrFilePath = destinationPath; + } + + // Build destDirectoryClient + ShareDirectoryClient destDirectoryClient = new ShareDirectoryClient(destUriBuilder.ToUri(), ClientConfiguration); + + ResponseWithHeaders response; + + CopyFileSmbInfo copyFileSmbInfo = new CopyFileSmbInfo + { + FileAttributes = options?.FileAttributes?.ToAttributesString(), + FileCreationTime = options?.FileCreatedOn.ToFileDateTimeString(), + FileLastWriteTime = options?.FileLastWrittenOn.ToFileDateTimeString(), + IgnoreReadOnly = options?.IgnoreReadOnly + }; + + FileHttpHeaders fileHttpHeaders = new FileHttpHeaders + { + FileContentType = options?.ContentType + }; + + if (async) + { + response = await destDirectoryClient.DirectoryRestClient.RenameAsync( + renameSource: Uri.AbsoluteUri, + replaceIfExists: options?.ReplaceIfExists, + ignoreReadOnly: options?.IgnoreReadOnly, + sourceLeaseId: options?.SourceRequestConditions?.LeaseId, + destinationLeaseId: options?.DestinationRequestConditions?.LeaseId, + filePermission: options?.FilePermission, + filePermissionKey: options?.FilePermissionKey, + copyFileSmbInfo: copyFileSmbInfo, + fileHttpHeaders: fileHttpHeaders, + cancellationToken: cancellationToken) + .ConfigureAwait(false); + } + else + { + response = destDirectoryClient.DirectoryRestClient.Rename( + renameSource: Uri.AbsoluteUri, + replaceIfExists: options?.ReplaceIfExists, + ignoreReadOnly: options?.IgnoreReadOnly, + sourceLeaseId: options?.SourceRequestConditions?.LeaseId, + destinationLeaseId: options?.DestinationRequestConditions?.LeaseId, + filePermission: options?.FilePermission, + filePermissionKey: options?.FilePermissionKey, + copyFileSmbInfo: copyFileSmbInfo, + fileHttpHeaders: fileHttpHeaders, + cancellationToken: cancellationToken); + } + + return Response.FromValue( + destDirectoryClient, + response.GetRawResponse()); + } + catch (Exception ex) + { + ClientConfiguration.Pipeline.LogException(ex); + scope.Failed(ex); + throw; + } + finally + { + ClientConfiguration.Pipeline.LogMethodExit(nameof(ShareFileClient)); + scope.Dispose(); + } + } + } + #endregion Rename + #region CreateSubdirectory /// /// The operation creates a new diff --git a/sdk/storage/Azure.Storage.Files.Shares/tests/DirectoryClientTests.cs b/sdk/storage/Azure.Storage.Files.Shares/tests/DirectoryClientTests.cs index 4139b864b8f2..6296e260e552 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/tests/DirectoryClientTests.cs +++ b/sdk/storage/Azure.Storage.Files.Shares/tests/DirectoryClientTests.cs @@ -1228,6 +1228,23 @@ public async Task GetSubDirectoryClient_SpecialCharacters(string directoryName, Assert.AreEqual(expectedUri, shareUriBuilder.ToUri()); } + [RecordedTest] + [ServiceVersion(Min = ShareClientOptions.ServiceVersion.V2021_04_10)] + public async Task RenameAsync() + { + // Arrange + await using DisposingShare test = await SharesClientBuilder.GetTestShareAsync(); + string destDirectoryName = GetNewDirectoryName(); + ShareDirectoryClient sourceDirectory = InstrumentClient(test.Share.GetDirectoryClient(GetNewDirectoryName())); + await sourceDirectory.CreateAsync(); + + // Act + ShareDirectoryClient destDirectory = await sourceDirectory.RenameAsync(destDirectoryName); + + // Assert + await destDirectory.GetPropertiesAsync(); + } + #region GenerateSasTests [RecordedTest] public void CanGenerateSas_ClientConstructors() From f7771f829df994f270cf697cb3a09e416a6ee668 Mon Sep 17 00:00:00 2001 From: Sean McCullough Date: Fri, 29 Oct 2021 14:26:40 -0500 Subject: [PATCH 14/21] Directory Rename tests --- .../tests/DirectoryClientTests.cs | 212 ++++++++++++++++++ 1 file changed, 212 insertions(+) diff --git a/sdk/storage/Azure.Storage.Files.Shares/tests/DirectoryClientTests.cs b/sdk/storage/Azure.Storage.Files.Shares/tests/DirectoryClientTests.cs index 6296e260e552..421e8621e11c 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/tests/DirectoryClientTests.cs +++ b/sdk/storage/Azure.Storage.Files.Shares/tests/DirectoryClientTests.cs @@ -9,6 +9,7 @@ using Azure.Core.TestFramework; using Azure.Identity; using Azure.Storage.Files.Shares.Models; +using Azure.Storage.Files.Shares.Specialized; using Azure.Storage.Sas; using Azure.Storage.Test; using Moq; @@ -1245,6 +1246,217 @@ public async Task RenameAsync() await destDirectory.GetPropertiesAsync(); } + [RecordedTest] + [ServiceVersion(Min = ShareClientOptions.ServiceVersion.V2021_04_10)] + public async Task RenameAsync_DifferentDirectory() + { + // Arrange + await using DisposingShare test = await SharesClientBuilder.GetTestShareAsync(); + ShareDirectoryClient sourceParentDirectory = InstrumentClient(test.Share.GetDirectoryClient(GetNewDirectoryName())); + await sourceParentDirectory.CreateAsync(); + ShareDirectoryClient sourceDirectory = InstrumentClient(sourceParentDirectory.GetSubdirectoryClient(GetNewDirectoryName())); + await sourceDirectory.CreateAsync(); + + ShareDirectoryClient destParentDirectory = InstrumentClient(test.Share.GetDirectoryClient(GetNewDirectoryName())); + await destParentDirectory.CreateAsync(); + + string destDirectoryName = GetNewDirectoryName(); + + // Act + ShareDirectoryClient destDirectory = await sourceDirectory.RenameAsync(destParentDirectory.Name + "/" + destDirectoryName); + + // Assert + await destDirectory.GetPropertiesAsync(); + } + + [RecordedTest] + [ServiceVersion(Min = ShareClientOptions.ServiceVersion.V2021_04_10)] + [TestCase(true)] + [TestCase(false)] + public async Task RenameAsync_ReplaceIfExists(bool replaceIfExists) + { + // Arrange + await using DisposingShare test = await SharesClientBuilder.GetTestShareAsync(); + ShareDirectoryClient sourceDir = InstrumentClient(test.Share.GetDirectoryClient(GetNewDirectoryName())); + await sourceDir.CreateAsync(); + ShareDirectoryClient destParentDirectory = InstrumentClient(test.Share.GetDirectoryClient(GetNewDirectoryName())); + await destParentDirectory.CreateAsync(); + ShareFileClient destFile = InstrumentClient(destParentDirectory.GetFileClient(GetNewFileName())); + await destFile.CreateAsync(Constants.KB); + + ShareFileRenameOptions options = new ShareFileRenameOptions + { + ReplaceIfExists = replaceIfExists + }; + + // Act + if (replaceIfExists) + { + ShareDirectoryClient destDir = await sourceDir.RenameAsync( + destinationPath: destParentDirectory.Name + "/" + destFile.Name, + options: options); + + // Assert + Response response = await destDir.GetPropertiesAsync(); + } + else + { + await TestHelper.AssertExpectedExceptionAsync( + sourceDir.RenameAsync( + destinationPath: destParentDirectory.Name + "/" + destFile.Name, + options: options), + e => Assert.AreEqual(ShareErrorCode.ResourceAlreadyExists.ToString(), e.ErrorCode)); + } + } + + [RecordedTest] + [ServiceVersion(Min = ShareClientOptions.ServiceVersion.V2021_04_10)] + [TestCase(true)] + [TestCase(false)] + public async Task RenameAsync_IgnoreReadOnly(bool ignoreReadOnly) + { + // Arrange + await using DisposingShare test = await SharesClientBuilder.GetTestShareAsync(); + ShareDirectoryClient sourceDir = InstrumentClient(test.Share.GetDirectoryClient(GetNewDirectoryName())); + await sourceDir.CreateAsync(); + ShareDirectoryClient destParentDirectory = InstrumentClient(test.Share.GetDirectoryClient(GetNewDirectoryName())); + await destParentDirectory.CreateAsync(); + ShareFileClient destFile = InstrumentClient(destParentDirectory.GetFileClient(GetNewFileName())); + + FileSmbProperties fileSmbProperties = new FileSmbProperties + { + FileAttributes = NtfsFileAttributes.ReadOnly + }; + await destFile.CreateAsync( + maxSize: Constants.KB, + smbProperties: fileSmbProperties); + + ShareFileRenameOptions options = new ShareFileRenameOptions + { + ReplaceIfExists = true, + IgnoreReadOnly = ignoreReadOnly, + FileAttributes = NtfsFileAttributes.Directory + }; + + // Act + if (ignoreReadOnly) + { + ShareDirectoryClient destDirectory = await sourceDir.RenameAsync( + destinationPath: destParentDirectory.Name + "/" + destFile.Name, + options: options); + + // Assert + Response response = await destFile.GetPropertiesAsync(); + } + else + { + await TestHelper.AssertExpectedExceptionAsync( + sourceDir.RenameAsync( + destinationPath: destParentDirectory.Name + "/" + destFile.Name, + options: options), + e => Assert.AreEqual(ShareErrorCode.ReadOnlyAttribute.ToString(), e.ErrorCode)); + } + } + + [RecordedTest] + [ServiceVersion(Min = ShareClientOptions.ServiceVersion.V2021_04_10)] + [TestCase(true)] + [TestCase(false)] + public async Task RenameAsync_DestinationLeaseId(bool includeLeaseId) + { + // Arrange + await using DisposingShare test = await SharesClientBuilder.GetTestShareAsync(); + ShareDirectoryClient sourceDir = InstrumentClient(test.Share.GetDirectoryClient(GetNewDirectoryName())); + await sourceDir.CreateAsync(); + + ShareDirectoryClient destParentDir = InstrumentClient(test.Share.GetDirectoryClient(GetNewDirectoryName())); + await destParentDir.CreateAsync(); + ShareFileClient destFile = InstrumentClient(destParentDir.GetFileClient(GetNewFileName())); + await destFile.CreateAsync(Constants.KB); + string leaseId = Recording.Random.NewGuid().ToString(); + ShareLeaseClient shareLeaseClient = InstrumentClient(destFile.GetShareLeaseClient(leaseId)); + await shareLeaseClient.AcquireAsync(); + + ShareFileRenameOptions options = new ShareFileRenameOptions + { + ReplaceIfExists = true + }; + + // Act + if (includeLeaseId) + { + options.DestinationRequestConditions = new ShareFileRequestConditions + { + LeaseId = leaseId + }; + ShareDirectoryClient destDir = await sourceDir.RenameAsync( + destinationPath: destParentDir.Name + "/" + destFile.Name, + options: options); + + // Assert + await destDir.GetPropertiesAsync(); + } + else + { + await TestHelper.AssertExpectedExceptionAsync( + sourceDir.RenameAsync( + destinationPath: destParentDir.Name + "/" + destFile.Name, + options: options), + e => Assert.AreEqual("LeaseIdMissing", e.ErrorCode)); + } + } + + [RecordedTest] + [ServiceVersion(Min = ShareClientOptions.ServiceVersion.V2021_04_10)] + public async Task RenameAsync_NonAsciiSourceAndDestination() + { + // Arrange + await using DisposingShare test = await SharesClientBuilder.GetTestShareAsync(); + ShareDirectoryClient SourceDir = InstrumentClient(test.Share.GetDirectoryClient(GetNewNonAsciiDirectoryName())); + await SourceDir.CreateAsync(); + + string destDirName = GetNewNonAsciiDirectoryName(); + + // Act + ShareDirectoryClient destDir = await SourceDir.RenameAsync(destinationPath: destDirName); + + // Assert + await destDir.GetPropertiesAsync(); + } + + [RecordedTest] + [ServiceVersion(Min = ShareClientOptions.ServiceVersion.V2021_04_10)] + public async Task RenameAsync_ShareSAS() + { + // Arrange + await using DisposingShare test = await SharesClientBuilder.GetTestShareAsync(); + ShareDirectoryClient sourceDir = InstrumentClient(test.Share.GetDirectoryClient(GetNewDirectoryName())); + await sourceDir.CreateAsync(); + string destDirName = GetNewDirectoryName(); + + ShareSasBuilder shareSasBuilder = new ShareSasBuilder + { + ShareName = test.Share.Name, + ExpiresOn = Recording.UtcNow.AddDays(1) + }; + shareSasBuilder.SetPermissions(ShareSasPermissions.All); + SasQueryParameters sasQueryParameters = shareSasBuilder.ToSasQueryParameters(Tenants.GetNewSharedKeyCredentials()); + + ShareUriBuilder shareUriBuilder = new ShareUriBuilder(sourceDir.Uri) + { + Sas = sasQueryParameters + }; + + sourceDir = InstrumentClient(new ShareDirectoryClient(shareUriBuilder.ToUri(), GetOptions())); + + // Act + ShareDirectoryClient destDir = await sourceDir.RenameAsync( + destinationPath: destDirName + "?" + sasQueryParameters); + + // Assert + await destDir.GetPropertiesAsync(); + } + #region GenerateSasTests [RecordedTest] public void CanGenerateSas_ClientConstructors() From f0a3be0aeb199917b2fbabe2383fe7d3422d8a09 Mon Sep 17 00:00:00 2001 From: Sean McCullough Date: Fri, 29 Oct 2021 14:28:00 -0500 Subject: [PATCH 15/21] Export-API --- ...zure.Storage.Files.Shares.netstandard2.0.cs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/sdk/storage/Azure.Storage.Files.Shares/api/Azure.Storage.Files.Shares.netstandard2.0.cs b/sdk/storage/Azure.Storage.Files.Shares/api/Azure.Storage.Files.Shares.netstandard2.0.cs index 63b9d3758417..8714c70a0ae8 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/api/Azure.Storage.Files.Shares.netstandard2.0.cs +++ b/sdk/storage/Azure.Storage.Files.Shares/api/Azure.Storage.Files.Shares.netstandard2.0.cs @@ -168,6 +168,8 @@ public ShareDirectoryClient(System.Uri directoryUri, Azure.Storage.StorageShared public virtual Azure.Response GetProperties(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetPropertiesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Storage.Files.Shares.ShareDirectoryClient GetSubdirectoryClient(string subdirectoryName) { throw null; } + public virtual Azure.Response Rename(string destinationPath, Azure.Storage.Files.Shares.Models.ShareFileRenameOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RenameAsync(string destinationPath, Azure.Storage.Files.Shares.Models.ShareFileRenameOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response SetHttpHeaders(Azure.Storage.Files.Shares.Models.FileSmbProperties smbProperties = null, string filePermission = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> SetHttpHeadersAsync(Azure.Storage.Files.Shares.Models.FileSmbProperties smbProperties = null, string filePermission = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response SetMetadata(System.Collections.Generic.IDictionary metadata, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -260,6 +262,8 @@ public ShareFileClient(System.Uri fileUri, Azure.Storage.StorageSharedKeyCredent public virtual System.Threading.Tasks.Task OpenReadAsync(long position = (long)0, int? bufferSize = default(int?), Azure.Storage.Files.Shares.Models.ShareFileRequestConditions conditions = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.IO.Stream OpenWrite(bool overwrite, long position, Azure.Storage.Files.Shares.Models.ShareFileOpenWriteOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task OpenWriteAsync(bool overwrite, long position, Azure.Storage.Files.Shares.Models.ShareFileOpenWriteOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Rename(string destinationPath, Azure.Storage.Files.Shares.Models.ShareFileRenameOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RenameAsync(string destinationPath, Azure.Storage.Files.Shares.Models.ShareFileRenameOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response SetHttpHeaders(long? newSize = default(long?), Azure.Storage.Files.Shares.Models.ShareFileHttpHeaders httpHeaders = null, Azure.Storage.Files.Shares.Models.FileSmbProperties smbProperties = null, string filePermission = null, Azure.Storage.Files.Shares.Models.ShareFileRequestConditions conditions = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual Azure.Response SetHttpHeaders(long? newSize, Azure.Storage.Files.Shares.Models.ShareFileHttpHeaders httpHeaders, Azure.Storage.Files.Shares.Models.FileSmbProperties smbProperties, string filePermission, System.Threading.CancellationToken cancellationToken) { throw null; } @@ -788,6 +792,20 @@ public enum ShareFileRangeWriteType Update = 0, Clear = 1, } + public partial class ShareFileRenameOptions + { + public ShareFileRenameOptions() { } + public string ContentType { get { throw null; } set { } } + public Azure.Storage.Files.Shares.Models.ShareFileRequestConditions DestinationRequestConditions { get { throw null; } set { } } + public Azure.Storage.Files.Shares.Models.NtfsFileAttributes? FileAttributes { get { throw null; } set { } } + public System.DateTimeOffset? FileCreatedOn { get { throw null; } set { } } + public System.DateTimeOffset? FileLastWrittenOn { get { throw null; } set { } } + public string FilePermission { get { throw null; } set { } } + public string FilePermissionKey { get { throw null; } set { } } + public bool? IgnoreReadOnly { get { throw null; } set { } } + public bool? ReplaceIfExists { get { throw null; } set { } } + public Azure.Storage.Files.Shares.Models.ShareFileRequestConditions SourceRequestConditions { get { throw null; } set { } } + } public partial class ShareFileRequestConditions { public ShareFileRequestConditions() { } From 67ea229c0842c46e24966f7075ffa10421398d43 Mon Sep 17 00:00:00 2001 From: Sean McCullough Date: Fri, 29 Oct 2021 14:41:12 -0500 Subject: [PATCH 16/21] test recordings --- .../Shared/StorageRecordedTestSanitizer.cs | 6 + .../tests/DirectoryClientTests.cs | 1 + .../tests/FileClientTests.cs | 1 + .../tests/FileTestBase.cs | 4 +- .../DirectoryClientTests/RenameAsync.json | 180 +++++++++++ .../RenameAsyncAsync.json | 180 +++++++++++ ...RenameAsync_DestinationLeaseId(False).json | 258 +++++++++++++++ ...eAsync_DestinationLeaseId(False)Async.json | 258 +++++++++++++++ .../RenameAsync_DestinationLeaseId(True).json | 299 +++++++++++++++++ ...meAsync_DestinationLeaseId(True)Async.json | 299 +++++++++++++++++ .../RenameAsync_DifferentDirectory.json | 262 +++++++++++++++ .../RenameAsync_DifferentDirectoryAsync.json | 262 +++++++++++++++ .../RenameAsync_IgnoreReadOnly(False).json | 227 +++++++++++++ ...enameAsync_IgnoreReadOnly(False)Async.json | 227 +++++++++++++ ...ameAsync_NonAsciiSourceAndDestination.json | 180 +++++++++++ ...ync_NonAsciiSourceAndDestinationAsync.json | 180 +++++++++++ .../RenameAsync_ReplaceIfExists(False).json | 225 +++++++++++++ ...nameAsync_ReplaceIfExists(False)Async.json | 225 +++++++++++++ .../RenameAsync_ReplaceIfExists(True).json | 265 +++++++++++++++ ...enameAsync_ReplaceIfExists(True)Async.json | 265 +++++++++++++++ .../RenameAsync_ShareSAS.json | 177 ++++++++++ .../RenameAsync_ShareSASAsync.json | 177 ++++++++++ .../FileClientTests/RenameAsync.json | 265 +++++++++++++++ .../FileClientTests/RenameAsyncAsync.json | 265 +++++++++++++++ ...RenameAsync_DestinationLeaseId(False).json | 260 +++++++++++++++ ...eAsync_DestinationLeaseId(False)Async.json | 260 +++++++++++++++ .../RenameAsync_DestinationLeaseId(True).json | 305 ++++++++++++++++++ ...meAsync_DestinationLeaseId(True)Async.json | 305 ++++++++++++++++++ .../RenameAsync_DifferentDirectory.json | 268 +++++++++++++++ .../RenameAsync_DifferentDirectoryAsync.json | 268 +++++++++++++++ .../RenameAsync_IgnoreReadOnly(False).json | 228 +++++++++++++ ...enameAsync_IgnoreReadOnly(False)Async.json | 228 +++++++++++++ ...ameAsync_NonAsciiSourceAndDestination.json | 227 +++++++++++++ ...ync_NonAsciiSourceAndDestinationAsync.json | 227 +++++++++++++ .../RenameAsync_ReplaceIfExists(False).json | 227 +++++++++++++ ...nameAsync_ReplaceIfExists(False)Async.json | 227 +++++++++++++ .../RenameAsync_ReplaceIfExists(True).json | 271 ++++++++++++++++ ...enameAsync_ReplaceIfExists(True)Async.json | 271 ++++++++++++++++ .../FileClientTests/RenameAsync_ShareSAS.json | 224 +++++++++++++ .../RenameAsync_ShareSASAsync.json | 224 +++++++++++++ .../RenameAsync_SourceLeaseId(False).json | 216 +++++++++++++ ...RenameAsync_SourceLeaseId(False)Async.json | 216 +++++++++++++ .../RenameAsync_SourceLeaseId(True).json | 262 +++++++++++++++ .../RenameAsync_SourceLeaseId(True)Async.json | 262 +++++++++++++++ 44 files changed, 9662 insertions(+), 2 deletions(-) create mode 100644 sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync.json create mode 100644 sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsyncAsync.json create mode 100644 sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_DestinationLeaseId(False).json create mode 100644 sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_DestinationLeaseId(False)Async.json create mode 100644 sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_DestinationLeaseId(True).json create mode 100644 sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_DestinationLeaseId(True)Async.json create mode 100644 sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_DifferentDirectory.json create mode 100644 sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_DifferentDirectoryAsync.json create mode 100644 sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_IgnoreReadOnly(False).json create mode 100644 sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_IgnoreReadOnly(False)Async.json create mode 100644 sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_NonAsciiSourceAndDestination.json create mode 100644 sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_NonAsciiSourceAndDestinationAsync.json create mode 100644 sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_ReplaceIfExists(False).json create mode 100644 sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_ReplaceIfExists(False)Async.json create mode 100644 sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_ReplaceIfExists(True).json create mode 100644 sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_ReplaceIfExists(True)Async.json create mode 100644 sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_ShareSAS.json create mode 100644 sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_ShareSASAsync.json create mode 100644 sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync.json create mode 100644 sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsyncAsync.json create mode 100644 sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_DestinationLeaseId(False).json create mode 100644 sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_DestinationLeaseId(False)Async.json create mode 100644 sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_DestinationLeaseId(True).json create mode 100644 sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_DestinationLeaseId(True)Async.json create mode 100644 sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_DifferentDirectory.json create mode 100644 sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_DifferentDirectoryAsync.json create mode 100644 sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_IgnoreReadOnly(False).json create mode 100644 sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_IgnoreReadOnly(False)Async.json create mode 100644 sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_NonAsciiSourceAndDestination.json create mode 100644 sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_NonAsciiSourceAndDestinationAsync.json create mode 100644 sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_ReplaceIfExists(False).json create mode 100644 sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_ReplaceIfExists(False)Async.json create mode 100644 sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_ReplaceIfExists(True).json create mode 100644 sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_ReplaceIfExists(True)Async.json create mode 100644 sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_ShareSAS.json create mode 100644 sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_ShareSASAsync.json create mode 100644 sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_SourceLeaseId(False).json create mode 100644 sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_SourceLeaseId(False)Async.json create mode 100644 sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_SourceLeaseId(True).json create mode 100644 sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_SourceLeaseId(True)Async.json diff --git a/sdk/storage/Azure.Storage.Common/tests/Shared/StorageRecordedTestSanitizer.cs b/sdk/storage/Azure.Storage.Common/tests/Shared/StorageRecordedTestSanitizer.cs index 119e2c0b4882..6780a931d98a 100644 --- a/sdk/storage/Azure.Storage.Common/tests/Shared/StorageRecordedTestSanitizer.cs +++ b/sdk/storage/Azure.Storage.Common/tests/Shared/StorageRecordedTestSanitizer.cs @@ -18,6 +18,7 @@ public class StorageRecordedTestSanitizer : RecordedTestSanitizer private const string RenameSource = "x-ms-rename-source"; private const string CopySourceAuthorization = "x-ms-copy-source-authorization"; private const string PreviousSnapshotUrl = "x-ms-previous-snapshot-url"; + private const string FileRenameSource = "x-ms-file-rename-source"; public StorageRecordedTestSanitizer() { @@ -72,6 +73,11 @@ public override void SanitizeHeaders(IDictionary headers) { headers[PreviousSnapshotUrl] = snapshotUri.Select(c => SanitizeUri(c)).ToArray(); } + + if (headers.TryGetValue(FileRenameSource, out var fileRenameSource)) + { + headers[FileRenameSource] = fileRenameSource.Select(c => SanitizeQueryParameters(c)).ToArray(); + } } public override string SanitizeTextBody(string contentType, string body) diff --git a/sdk/storage/Azure.Storage.Files.Shares/tests/DirectoryClientTests.cs b/sdk/storage/Azure.Storage.Files.Shares/tests/DirectoryClientTests.cs index 421e8621e11c..29603706c32c 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/tests/DirectoryClientTests.cs +++ b/sdk/storage/Azure.Storage.Files.Shares/tests/DirectoryClientTests.cs @@ -1309,6 +1309,7 @@ await TestHelper.AssertExpectedExceptionAsync( } } + [Ignore("service bug")] [RecordedTest] [ServiceVersion(Min = ShareClientOptions.ServiceVersion.V2021_04_10)] [TestCase(true)] diff --git a/sdk/storage/Azure.Storage.Files.Shares/tests/FileClientTests.cs b/sdk/storage/Azure.Storage.Files.Shares/tests/FileClientTests.cs index 3bbda3a29580..76b81fd4da62 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/tests/FileClientTests.cs +++ b/sdk/storage/Azure.Storage.Files.Shares/tests/FileClientTests.cs @@ -4279,6 +4279,7 @@ await TestHelper.AssertExpectedExceptionAsync( } } + [Ignore("serivce bug")] [RecordedTest] [ServiceVersion(Min = ShareClientOptions.ServiceVersion.V2021_04_10)] [TestCase(true)] diff --git a/sdk/storage/Azure.Storage.Files.Shares/tests/FileTestBase.cs b/sdk/storage/Azure.Storage.Files.Shares/tests/FileTestBase.cs index b5d7eff659e0..43972c559a9d 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/tests/FileTestBase.cs +++ b/sdk/storage/Azure.Storage.Files.Shares/tests/FileTestBase.cs @@ -31,7 +31,7 @@ namespace Azure.Storage.Files.Shares.Tests StorageVersionExtensions.LatestVersion, StorageVersionExtensions.MaxVersion, RecordingServiceVersion = StorageVersionExtensions.MaxVersion, - LiveServiceVersions = new object[] { StorageVersionExtensions.MaxVersion, })] + LiveServiceVersions = new object[] { StorageVersionExtensions.LatestVersion, })] public class FileTestBase : StorageTestBase { /// @@ -44,7 +44,7 @@ public class FileTestBase : StorageTestBase public static Uri s_invalidUri = new Uri("https://error.file.core.windows.net"); public FileTestBase(bool async, ShareClientOptions.ServiceVersion serviceVersion, RecordedTestMode? mode = null) - : base(async, RecordedTestMode.Live) + : base(async, mode) { _serviceVersion = serviceVersion; SharesClientBuilder = ClientBuilderExtensions.GetNewShareClientBuilder(Tenants, _serviceVersion); diff --git a/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync.json b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync.json new file mode 100644 index 000000000000..94cc886653c3 --- /dev/null +++ b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync.json @@ -0,0 +1,180 @@ +{ + "Entries": [ + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-ccc6d55f-174c-8b3e-41dc-b1c087255e41?restype=share", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-c2c40385a0d56f49aea0054a06e06202-bd5debf8f2d55e43-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "14d2f30e-fd9a-2456-7724-6c1313326e4e", + "x-ms-date": "Fri, 29 Oct 2021 19:40:15 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:15 GMT", + "ETag": "\u00220x8D99B13EEC952CC\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:16 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "14d2f30e-fd9a-2456-7724-6c1313326e4e", + "x-ms-request-id": "d8bf6412-901a-0009-4bfc-cc22b6000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-ccc6d55f-174c-8b3e-41dc-b1c087255e41/test-directory-94b269b1-4952-f7a7-f75f-30465f99171b?restype=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-955f429139dadc488c3d86dd104c0c81-91a0312b63fb3e49-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "a961066f-da80-ddfc-2fe5-84897541348f", + "x-ms-date": "Fri, 29 Oct 2021 19:40:15 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:15 GMT", + "ETag": "\u00220x8D99B13EEE6302F\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:16 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "a961066f-da80-ddfc-2fe5-84897541348f", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-10-29T19:40:16.4382767Z", + "x-ms-file-creation-time": "2021-10-29T19:40:16.4382767Z", + "x-ms-file-id": "13835128424026341376", + "x-ms-file-last-write-time": "2021-10-29T19:40:16.4382767Z", + "x-ms-file-parent-id": "0", + "x-ms-file-permission-key": "15110104144358886944*6706197617703823457", + "x-ms-request-id": "d8bf6414-901a-0009-4cfc-cc22b6000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-ccc6d55f-174c-8b3e-41dc-b1c087255e41/test-directory-7bdcd627-a5e8-9387-289b-7e95c857b565?restype=directory\u0026comp=rename", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-2d6a940d1655ad4a9e4af7a602ab40f6-138ee23412438842-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "58d71003-6d37-6d9b-04e3-d0192bd5f22a", + "x-ms-date": "Fri, 29 Oct 2021 19:40:15 GMT", + "x-ms-file-rename-source": "https%3A%2F%2F712xscnapby3pev55a.file.preprod.core.windows.net%2Ftest-share-ccc6d55f-174c-8b3e-41dc-b1c087255e41%2Ftest-directory-94b269b1-4952-f7a7-f75f-30465f99171b=", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:15 GMT", + "ETag": "\u00220x8D99B13EEF12CB8\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:16 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "58d71003-6d37-6d9b-04e3-d0192bd5f22a", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-10-29T19:40:16.5102776Z", + "x-ms-file-creation-time": "2021-10-29T19:40:16.4382767Z", + "x-ms-file-id": "13835128424026341376", + "x-ms-file-last-write-time": "2021-10-29T19:40:16.4382767Z", + "x-ms-file-parent-id": "0", + "x-ms-file-permission-key": "15110104144358886944*6706197617703823457", + "x-ms-request-id": "d8bf6415-901a-0009-4dfc-cc22b6000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-ccc6d55f-174c-8b3e-41dc-b1c087255e41/test-directory-7bdcd627-a5e8-9387-289b-7e95c857b565?restype=directory", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "64854d6d-dc69-1557-c7df-c2b3e54dd535", + "x-ms-date": "Fri, 29 Oct 2021 19:40:15 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:15 GMT", + "ETag": "\u00220x8D99B13EEF12CB8\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:16 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "64854d6d-dc69-1557-c7df-c2b3e54dd535", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-10-29T19:40:16.5102776Z", + "x-ms-file-creation-time": "2021-10-29T19:40:16.4382767Z", + "x-ms-file-id": "13835128424026341376", + "x-ms-file-last-write-time": "2021-10-29T19:40:16.4382767Z", + "x-ms-file-parent-id": "0", + "x-ms-file-permission-key": "15110104144358886944*6706197617703823457", + "x-ms-request-id": "d8bf6416-901a-0009-4efc-cc22b6000000", + "x-ms-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-ccc6d55f-174c-8b3e-41dc-b1c087255e41?restype=share", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-505d64fdc665224b920343f963045e7a-3657333248419e46-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "deab4963-8e50-2dc1-0465-5592d2d6d351", + "x-ms-date": "Fri, 29 Oct 2021 19:40:15 GMT", + "x-ms-delete-snapshots": "include", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:16 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "deab4963-8e50-2dc1-0465-5592d2d6d351", + "x-ms-request-id": "d8bf6417-901a-0009-4ffc-cc22b6000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + } + ], + "Variables": { + "RandomSeed": "1493363196", + "Storage_TestConfigDefault": "ProductionTenant\n712xscnapby3pev55a\nU2FuaXRpemVk\nhttps://712xscnapby3pev55a.blob.preprod.core.windows.net\nhttps://712xscnapby3pev55a.file.preprod.core.windows.net\nhttps://712xscnapby3pev55a.queue.core.windows.net\nhttps://712xscnapby3pev55a.table.core.windows.net\n\n\n\n\nhttps://712xscnapby3pev55a-secondary.blob.core.windows.net\nhttps://712xscnapby3pev55a-secondary.file.core.windows.net\nhttps://712xscnapby3pev55a-secondary.queue.core.windows.net\nhttps://712xscnapby3pev55a-secondary.table.core.windows.net\n\nSanitized\n\n\nCloud\nBlobEndpoint=https://712xscnapby3pev55a.blob.preprod.core.windows.net/;QueueEndpoint=https://712xscnapby3pev55a.queue.core.windows.net/;FileEndpoint=https://712xscnapby3pev55a.file.preprod.core.windows.net/;BlobSecondaryEndpoint=https://712xscnapby3pev55a-secondary.blob.core.windows.net/;QueueSecondaryEndpoint=https://712xscnapby3pev55a-secondary.queue.core.windows.net/;FileSecondaryEndpoint=https://712xscnapby3pev55a-secondary.file.core.windows.net/;AccountName=712xscnapby3pev55a;AccountKey=Kg==;\nscope-1\n\n" + } +} \ No newline at end of file diff --git a/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsyncAsync.json b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsyncAsync.json new file mode 100644 index 000000000000..dba0360c6397 --- /dev/null +++ b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsyncAsync.json @@ -0,0 +1,180 @@ +{ + "Entries": [ + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-0ff6dca5-79f0-5f43-a0f8-628e9aa61154?restype=share", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-6bd9d954cc109845b828727a50e73338-019f6e1fa574fc42-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "9dba1a6a-e7f7-c821-bddb-710af4344ef9", + "x-ms-date": "Fri, 29 Oct 2021 19:40:19 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:19 GMT", + "ETag": "\u00220x8D99B13F10C65AB\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:20 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "9dba1a6a-e7f7-c821-bddb-710af4344ef9", + "x-ms-request-id": "d8bf6449-901a-0009-78fc-cc22b6000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-0ff6dca5-79f0-5f43-a0f8-628e9aa61154/test-directory-7f23aeff-73ec-1d5c-e6a7-248eb3d4f872?restype=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-7d0b3ec5be6bcc43b57e0d5c51f40619-d763fd41ad4cba42-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "460a06e9-ce10-950d-656e-4648d4e0ce29", + "x-ms-date": "Fri, 29 Oct 2021 19:40:19 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:19 GMT", + "ETag": "\u00220x8D99B13F11FCDE0\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:20 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "460a06e9-ce10-950d-656e-4648d4e0ce29", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-10-29T19:40:20.1713120Z", + "x-ms-file-creation-time": "2021-10-29T19:40:20.1713120Z", + "x-ms-file-id": "13835128424026341376", + "x-ms-file-last-write-time": "2021-10-29T19:40:20.1713120Z", + "x-ms-file-parent-id": "0", + "x-ms-file-permission-key": "15110104144358886944*6706197617703823457", + "x-ms-request-id": "d8bf644b-901a-0009-79fc-cc22b6000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-0ff6dca5-79f0-5f43-a0f8-628e9aa61154/test-directory-2d8cc109-f9f0-816f-fd09-699ef8caf26a?restype=directory\u0026comp=rename", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-9cfe9be772cd3541b8d602d1422edc83-f04b2d89960fe049-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "aca531d7-b1c9-3661-7ad9-463b847b9cca", + "x-ms-date": "Fri, 29 Oct 2021 19:40:19 GMT", + "x-ms-file-rename-source": "https%3A%2F%2F712xscnapby3pev55a.file.preprod.core.windows.net%2Ftest-share-0ff6dca5-79f0-5f43-a0f8-628e9aa61154%2Ftest-directory-7f23aeff-73ec-1d5c-e6a7-248eb3d4f872=", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:19 GMT", + "ETag": "\u00220x8D99B13F12A7C4A\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:20 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "aca531d7-b1c9-3661-7ad9-463b847b9cca", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-10-29T19:40:20.2413130Z", + "x-ms-file-creation-time": "2021-10-29T19:40:20.1713120Z", + "x-ms-file-id": "13835128424026341376", + "x-ms-file-last-write-time": "2021-10-29T19:40:20.1713120Z", + "x-ms-file-parent-id": "0", + "x-ms-file-permission-key": "15110104144358886944*6706197617703823457", + "x-ms-request-id": "d8bf644c-901a-0009-7afc-cc22b6000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-0ff6dca5-79f0-5f43-a0f8-628e9aa61154/test-directory-2d8cc109-f9f0-816f-fd09-699ef8caf26a?restype=directory", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "a371e4ce-213b-5f5f-9562-f6810186af6f", + "x-ms-date": "Fri, 29 Oct 2021 19:40:19 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:19 GMT", + "ETag": "\u00220x8D99B13F12A7C4A\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:20 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "a371e4ce-213b-5f5f-9562-f6810186af6f", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-10-29T19:40:20.2413130Z", + "x-ms-file-creation-time": "2021-10-29T19:40:20.1713120Z", + "x-ms-file-id": "13835128424026341376", + "x-ms-file-last-write-time": "2021-10-29T19:40:20.1713120Z", + "x-ms-file-parent-id": "0", + "x-ms-file-permission-key": "15110104144358886944*6706197617703823457", + "x-ms-request-id": "d8bf644d-901a-0009-7bfc-cc22b6000000", + "x-ms-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-0ff6dca5-79f0-5f43-a0f8-628e9aa61154?restype=share", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-3740a1ad1553704c83eb94ab32c8ab1f-60e6e15cc4332c41-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "a06c4f17-f90a-498f-177d-f0876817a1be", + "x-ms-date": "Fri, 29 Oct 2021 19:40:19 GMT", + "x-ms-delete-snapshots": "include", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:19 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "a06c4f17-f90a-498f-177d-f0876817a1be", + "x-ms-request-id": "d8bf644e-901a-0009-7cfc-cc22b6000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + } + ], + "Variables": { + "RandomSeed": "2114653668", + "Storage_TestConfigDefault": "ProductionTenant\n712xscnapby3pev55a\nU2FuaXRpemVk\nhttps://712xscnapby3pev55a.blob.preprod.core.windows.net\nhttps://712xscnapby3pev55a.file.preprod.core.windows.net\nhttps://712xscnapby3pev55a.queue.core.windows.net\nhttps://712xscnapby3pev55a.table.core.windows.net\n\n\n\n\nhttps://712xscnapby3pev55a-secondary.blob.core.windows.net\nhttps://712xscnapby3pev55a-secondary.file.core.windows.net\nhttps://712xscnapby3pev55a-secondary.queue.core.windows.net\nhttps://712xscnapby3pev55a-secondary.table.core.windows.net\n\nSanitized\n\n\nCloud\nBlobEndpoint=https://712xscnapby3pev55a.blob.preprod.core.windows.net/;QueueEndpoint=https://712xscnapby3pev55a.queue.core.windows.net/;FileEndpoint=https://712xscnapby3pev55a.file.preprod.core.windows.net/;BlobSecondaryEndpoint=https://712xscnapby3pev55a-secondary.blob.core.windows.net/;QueueSecondaryEndpoint=https://712xscnapby3pev55a-secondary.queue.core.windows.net/;FileSecondaryEndpoint=https://712xscnapby3pev55a-secondary.file.core.windows.net/;AccountName=712xscnapby3pev55a;AccountKey=Kg==;\nscope-1\n\n" + } +} \ No newline at end of file diff --git a/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_DestinationLeaseId(False).json b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_DestinationLeaseId(False).json new file mode 100644 index 000000000000..dccabc26763d --- /dev/null +++ b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_DestinationLeaseId(False).json @@ -0,0 +1,258 @@ +{ + "Entries": [ + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-d7353daf-955a-ce89-cc7f-ff25e3d6cb4b?restype=share", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-70cb4ba546072b45b19219a4e59dcfb6-d00a6439f5cde848-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "2094bce2-b361-1252-e69a-9bd42b340319", + "x-ms-date": "Fri, 29 Oct 2021 19:40:13 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:13 GMT", + "ETag": "\u00220x8D99B13ED8783F1\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:14 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "2094bce2-b361-1252-e69a-9bd42b340319", + "x-ms-request-id": "d8bf63f8-901a-0009-36fc-cc22b6000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-d7353daf-955a-ce89-cc7f-ff25e3d6cb4b/test-directory-ba69edb6-988a-1836-8f7f-37fc061d0f4b?restype=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-fcbbc51525ef4849ada18f64f5bc64dd-f9ff8eb260278d42-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "d0b4745a-b217-4a17-857b-90e17c550bc8", + "x-ms-date": "Fri, 29 Oct 2021 19:40:13 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:13 GMT", + "ETag": "\u00220x8D99B13ED99DA1E\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:14 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "d0b4745a-b217-4a17-857b-90e17c550bc8", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-10-29T19:40:14.2602782Z", + "x-ms-file-creation-time": "2021-10-29T19:40:14.2602782Z", + "x-ms-file-id": "13835128424026341376", + "x-ms-file-last-write-time": "2021-10-29T19:40:14.2602782Z", + "x-ms-file-parent-id": "0", + "x-ms-file-permission-key": "15110104144358886944*6706197617703823457", + "x-ms-request-id": "d8bf63fa-901a-0009-37fc-cc22b6000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-d7353daf-955a-ce89-cc7f-ff25e3d6cb4b/test-directory-cdc24f8a-dcf1-0bd8-032a-563ac4ee1cb6?restype=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-77a1ba7499889c4eb19c0a753cb58fc4-a7e4e88c75108041-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "abbd0b45-bb16-7d7a-9ca8-cdec5cdc8697", + "x-ms-date": "Fri, 29 Oct 2021 19:40:13 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:13 GMT", + "ETag": "\u00220x8D99B13EDA57376\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:14 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "abbd0b45-bb16-7d7a-9ca8-cdec5cdc8697", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-10-29T19:40:14.3362934Z", + "x-ms-file-creation-time": "2021-10-29T19:40:14.3362934Z", + "x-ms-file-id": "11529285414812647424", + "x-ms-file-last-write-time": "2021-10-29T19:40:14.3362934Z", + "x-ms-file-parent-id": "0", + "x-ms-file-permission-key": "15110104144358886944*6706197617703823457", + "x-ms-request-id": "d8bf63fb-901a-0009-38fc-cc22b6000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-d7353daf-955a-ce89-cc7f-ff25e3d6cb4b/test-directory-cdc24f8a-dcf1-0bd8-032a-563ac4ee1cb6/test-file-b1ebda5f-79b3-4c5f-1b63-87f93a12f0fa", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-92323281d9dbdd43abdbbff35803d25b-63e37802b9fdf34b-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "40660a71-101d-cb5a-ab71-90b334814289", + "x-ms-content-length": "1024", + "x-ms-date": "Fri, 29 Oct 2021 19:40:13 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-type": "file", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:13 GMT", + "ETag": "\u00220x8D99B13EDB688E0\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:14 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "40660a71-101d-cb5a-ab71-90b334814289", + "x-ms-file-attributes": "Archive", + "x-ms-file-change-time": "2021-10-29T19:40:14.4482528Z", + "x-ms-file-creation-time": "2021-10-29T19:40:14.4482528Z", + "x-ms-file-id": "16140971433240035328", + "x-ms-file-last-write-time": "2021-10-29T19:40:14.4482528Z", + "x-ms-file-parent-id": "11529285414812647424", + "x-ms-file-permission-key": "13773932323712163591*6706197617703823457", + "x-ms-request-id": "d8bf63fc-901a-0009-39fc-cc22b6000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-d7353daf-955a-ce89-cc7f-ff25e3d6cb4b/test-directory-cdc24f8a-dcf1-0bd8-032a-563ac4ee1cb6/test-file-b1ebda5f-79b3-4c5f-1b63-87f93a12f0fa?comp=lease", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-bec69af82afda441b2812fe71b61aec7-96432af07ad1af4a-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "9d086be1-efc4-a382-a378-056db0cb480c", + "x-ms-date": "Fri, 29 Oct 2021 19:40:13 GMT", + "x-ms-lease-action": "acquire", + "x-ms-lease-duration": "-1", + "x-ms-proposed-lease-id": "1383d3b7-cde7-ed66-3ab0-608e839edbd3", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:13 GMT", + "ETag": "\u00220x8D99B13EDB688E0\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:14 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "9d086be1-efc4-a382-a378-056db0cb480c", + "x-ms-lease-id": "1383d3b7-cde7-ed66-3ab0-608e839edbd3", + "x-ms-request-id": "d8bf63fd-901a-0009-3afc-cc22b6000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-d7353daf-955a-ce89-cc7f-ff25e3d6cb4b/test-directory-cdc24f8a-dcf1-0bd8-032a-563ac4ee1cb6/test-file-b1ebda5f-79b3-4c5f-1b63-87f93a12f0fa?restype=directory\u0026comp=rename", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-06d55beec5a07148975ca98c59edd580-9c6c0d00f4e87c4d-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "17ad91a9-3d95-700e-9be3-8c33aa6ea723", + "x-ms-date": "Fri, 29 Oct 2021 19:40:13 GMT", + "x-ms-file-rename-replace-if-exists": "true", + "x-ms-file-rename-source": "https%3A%2F%2F712xscnapby3pev55a.file.preprod.core.windows.net%2Ftest-share-d7353daf-955a-ce89-cc7f-ff25e3d6cb4b%2Ftest-directory-ba69edb6-988a-1836-8f7f-37fc061d0f4b=", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 412, + "ResponseHeaders": { + "Content-Length": "267", + "Content-Type": "application/xml", + "Date": "Fri, 29 Oct 2021 19:40:14 GMT", + "x-ms-client-request-id": "17ad91a9-3d95-700e-9be3-8c33aa6ea723", + "x-ms-error-code": "LeaseIdMissing", + "x-ms-request-id": "d8bf63fe-901a-0009-3bfc-cc22b6000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [ + "\uFEFF\u003C?xml version=\u00221.0\u0022 encoding=\u0022utf-8\u0022?\u003E\u003CError\u003E\u003CCode\u003ELeaseIdMissing\u003C/Code\u003E\u003CMessage\u003EThere is currently a lease on the file and no lease ID was specified in the request.\n", + "RequestId:d8bf63fe-901a-0009-3bfc-cc22b6000000\n", + "Time:2021-10-29T19:40:14.6411166Z\u003C/Message\u003E\u003C/Error\u003E" + ] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-d7353daf-955a-ce89-cc7f-ff25e3d6cb4b?restype=share", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-b1f544f24898f74bbcc9053af7ae81d4-6e1c9b089167e24a-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "1fc4b66b-301e-5876-aee2-7c1586a95d88", + "x-ms-date": "Fri, 29 Oct 2021 19:40:13 GMT", + "x-ms-delete-snapshots": "include", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:14 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "1fc4b66b-301e-5876-aee2-7c1586a95d88", + "x-ms-request-id": "d8bf63ff-901a-0009-3cfc-cc22b6000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + } + ], + "Variables": { + "RandomSeed": "312487683", + "Storage_TestConfigDefault": "ProductionTenant\n712xscnapby3pev55a\nU2FuaXRpemVk\nhttps://712xscnapby3pev55a.blob.preprod.core.windows.net\nhttps://712xscnapby3pev55a.file.preprod.core.windows.net\nhttps://712xscnapby3pev55a.queue.core.windows.net\nhttps://712xscnapby3pev55a.table.core.windows.net\n\n\n\n\nhttps://712xscnapby3pev55a-secondary.blob.core.windows.net\nhttps://712xscnapby3pev55a-secondary.file.core.windows.net\nhttps://712xscnapby3pev55a-secondary.queue.core.windows.net\nhttps://712xscnapby3pev55a-secondary.table.core.windows.net\n\nSanitized\n\n\nCloud\nBlobEndpoint=https://712xscnapby3pev55a.blob.preprod.core.windows.net/;QueueEndpoint=https://712xscnapby3pev55a.queue.core.windows.net/;FileEndpoint=https://712xscnapby3pev55a.file.preprod.core.windows.net/;BlobSecondaryEndpoint=https://712xscnapby3pev55a-secondary.blob.core.windows.net/;QueueSecondaryEndpoint=https://712xscnapby3pev55a-secondary.queue.core.windows.net/;FileSecondaryEndpoint=https://712xscnapby3pev55a-secondary.file.core.windows.net/;AccountName=712xscnapby3pev55a;AccountKey=Kg==;\nscope-1\n\n" + } +} \ No newline at end of file diff --git a/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_DestinationLeaseId(False)Async.json b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_DestinationLeaseId(False)Async.json new file mode 100644 index 000000000000..64684b9c9ab8 --- /dev/null +++ b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_DestinationLeaseId(False)Async.json @@ -0,0 +1,258 @@ +{ + "Entries": [ + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-ba23f726-05cc-0ff1-c8ca-17b2ecd818df?restype=share", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-dc9d405bb6774647afca9cc9b22ef662-9d029300822a1f47-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "de96f41b-e586-a89a-467b-aa2dbb3e2a2e", + "x-ms-date": "Fri, 29 Oct 2021 19:40:17 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:17 GMT", + "ETag": "\u00220x8D99B13F01A641B\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:18 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "de96f41b-e586-a89a-467b-aa2dbb3e2a2e", + "x-ms-request-id": "d8bf642f-901a-0009-64fc-cc22b6000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-ba23f726-05cc-0ff1-c8ca-17b2ecd818df/test-directory-777324c3-8dcd-9592-8abb-f8cc4c07d590?restype=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-96313255a52d1846a5f36767c2745bfa-917f340467731a46-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "142689d5-d2c4-8e09-6201-53caedce5b3f", + "x-ms-date": "Fri, 29 Oct 2021 19:40:17 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:17 GMT", + "ETag": "\u00220x8D99B13F0289BF6\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:18 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "142689d5-d2c4-8e09-6201-53caedce5b3f", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-10-29T19:40:18.5512950Z", + "x-ms-file-creation-time": "2021-10-29T19:40:18.5512950Z", + "x-ms-file-id": "13835128424026341376", + "x-ms-file-last-write-time": "2021-10-29T19:40:18.5512950Z", + "x-ms-file-parent-id": "0", + "x-ms-file-permission-key": "15110104144358886944*6706197617703823457", + "x-ms-request-id": "d8bf6432-901a-0009-65fc-cc22b6000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-ba23f726-05cc-0ff1-c8ca-17b2ecd818df/test-directory-7bad19a6-32a7-89ec-cbbb-10f5fd96ae4a?restype=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-81bb45a141c12440aa9f6a28778eeaa2-ffc201a64e041141-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "cd55507c-3193-a3db-9c9d-4908c11491cc", + "x-ms-date": "Fri, 29 Oct 2021 19:40:17 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:17 GMT", + "ETag": "\u00220x8D99B13F0345C85\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:18 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "cd55507c-3193-a3db-9c9d-4908c11491cc", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-10-29T19:40:18.6283141Z", + "x-ms-file-creation-time": "2021-10-29T19:40:18.6283141Z", + "x-ms-file-id": "11529285414812647424", + "x-ms-file-last-write-time": "2021-10-29T19:40:18.6283141Z", + "x-ms-file-parent-id": "0", + "x-ms-file-permission-key": "15110104144358886944*6706197617703823457", + "x-ms-request-id": "d8bf6433-901a-0009-66fc-cc22b6000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-ba23f726-05cc-0ff1-c8ca-17b2ecd818df/test-directory-7bad19a6-32a7-89ec-cbbb-10f5fd96ae4a/test-file-78ba0952-98d8-e55e-4cff-449e9daba33d", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-59684879ae6c2842b04d905256c603c1-f818cd0d39801e48-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "dceec977-52d4-e3c0-f170-8093ec3d06f1", + "x-ms-content-length": "1024", + "x-ms-date": "Fri, 29 Oct 2021 19:40:17 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-type": "file", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:17 GMT", + "ETag": "\u00220x8D99B13F04090CF\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:18 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "dceec977-52d4-e3c0-f170-8093ec3d06f1", + "x-ms-file-attributes": "Archive", + "x-ms-file-change-time": "2021-10-29T19:40:18.7082959Z", + "x-ms-file-creation-time": "2021-10-29T19:40:18.7082959Z", + "x-ms-file-id": "16140971433240035328", + "x-ms-file-last-write-time": "2021-10-29T19:40:18.7082959Z", + "x-ms-file-parent-id": "11529285414812647424", + "x-ms-file-permission-key": "13773932323712163591*6706197617703823457", + "x-ms-request-id": "d8bf6434-901a-0009-67fc-cc22b6000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-ba23f726-05cc-0ff1-c8ca-17b2ecd818df/test-directory-7bad19a6-32a7-89ec-cbbb-10f5fd96ae4a/test-file-78ba0952-98d8-e55e-4cff-449e9daba33d?comp=lease", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-2bf5e171866e2c46b1e5b50db056649a-87458c936bfa414f-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "6b49354c-a2ad-9286-3d7b-8af8733b71d6", + "x-ms-date": "Fri, 29 Oct 2021 19:40:17 GMT", + "x-ms-lease-action": "acquire", + "x-ms-lease-duration": "-1", + "x-ms-proposed-lease-id": "49160cf9-e59b-728b-52dc-de85721b6e88", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:18 GMT", + "ETag": "\u00220x8D99B13F04090CF\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:18 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "6b49354c-a2ad-9286-3d7b-8af8733b71d6", + "x-ms-lease-id": "49160cf9-e59b-728b-52dc-de85721b6e88", + "x-ms-request-id": "d8bf6435-901a-0009-68fc-cc22b6000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-ba23f726-05cc-0ff1-c8ca-17b2ecd818df/test-directory-7bad19a6-32a7-89ec-cbbb-10f5fd96ae4a/test-file-78ba0952-98d8-e55e-4cff-449e9daba33d?restype=directory\u0026comp=rename", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-e7e95de7d0e44c4aba27e5cbd51c30fa-f953a75a03aef742-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "3d3882ea-02d2-71db-9b93-96413c702b7c", + "x-ms-date": "Fri, 29 Oct 2021 19:40:18 GMT", + "x-ms-file-rename-replace-if-exists": "true", + "x-ms-file-rename-source": "https%3A%2F%2F712xscnapby3pev55a.file.preprod.core.windows.net%2Ftest-share-ba23f726-05cc-0ff1-c8ca-17b2ecd818df%2Ftest-directory-777324c3-8dcd-9592-8abb-f8cc4c07d590=", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 412, + "ResponseHeaders": { + "Content-Length": "267", + "Content-Type": "application/xml", + "Date": "Fri, 29 Oct 2021 19:40:18 GMT", + "x-ms-client-request-id": "3d3882ea-02d2-71db-9b93-96413c702b7c", + "x-ms-error-code": "LeaseIdMissing", + "x-ms-request-id": "d8bf6436-901a-0009-69fc-cc22b6000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [ + "\uFEFF\u003C?xml version=\u00221.0\u0022 encoding=\u0022utf-8\u0022?\u003E\u003CError\u003E\u003CCode\u003ELeaseIdMissing\u003C/Code\u003E\u003CMessage\u003EThere is currently a lease on the file and no lease ID was specified in the request.\n", + "RequestId:d8bf6436-901a-0009-69fc-cc22b6000000\n", + "Time:2021-10-29T19:40:18.9001189Z\u003C/Message\u003E\u003C/Error\u003E" + ] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-ba23f726-05cc-0ff1-c8ca-17b2ecd818df?restype=share", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-316eae9934dfa54d9fc2acc10fa77889-7d933ff313e0d34a-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "f00d5c69-3402-fe03-1c0e-2e849af2f632", + "x-ms-date": "Fri, 29 Oct 2021 19:40:18 GMT", + "x-ms-delete-snapshots": "include", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:18 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "f00d5c69-3402-fe03-1c0e-2e849af2f632", + "x-ms-request-id": "d8bf6437-901a-0009-6afc-cc22b6000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + } + ], + "Variables": { + "RandomSeed": "2083660257", + "Storage_TestConfigDefault": "ProductionTenant\n712xscnapby3pev55a\nU2FuaXRpemVk\nhttps://712xscnapby3pev55a.blob.preprod.core.windows.net\nhttps://712xscnapby3pev55a.file.preprod.core.windows.net\nhttps://712xscnapby3pev55a.queue.core.windows.net\nhttps://712xscnapby3pev55a.table.core.windows.net\n\n\n\n\nhttps://712xscnapby3pev55a-secondary.blob.core.windows.net\nhttps://712xscnapby3pev55a-secondary.file.core.windows.net\nhttps://712xscnapby3pev55a-secondary.queue.core.windows.net\nhttps://712xscnapby3pev55a-secondary.table.core.windows.net\n\nSanitized\n\n\nCloud\nBlobEndpoint=https://712xscnapby3pev55a.blob.preprod.core.windows.net/;QueueEndpoint=https://712xscnapby3pev55a.queue.core.windows.net/;FileEndpoint=https://712xscnapby3pev55a.file.preprod.core.windows.net/;BlobSecondaryEndpoint=https://712xscnapby3pev55a-secondary.blob.core.windows.net/;QueueSecondaryEndpoint=https://712xscnapby3pev55a-secondary.queue.core.windows.net/;FileSecondaryEndpoint=https://712xscnapby3pev55a-secondary.file.core.windows.net/;AccountName=712xscnapby3pev55a;AccountKey=Kg==;\nscope-1\n\n" + } +} \ No newline at end of file diff --git a/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_DestinationLeaseId(True).json b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_DestinationLeaseId(True).json new file mode 100644 index 000000000000..c02ce66eab2f --- /dev/null +++ b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_DestinationLeaseId(True).json @@ -0,0 +1,299 @@ +{ + "Entries": [ + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-864dd56d-7efa-43f9-67ba-43bdb60256ba?restype=share", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-5ccf7236119b4640b99a4f93914ca967-e5eb5b43dce9fc40-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "f95cf2f9-78de-c8a7-e6bc-59171bc3a473", + "x-ms-date": "Fri, 29 Oct 2021 19:40:12 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:12 GMT", + "ETag": "\u00220x8D99B13ECFC335A\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:13 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "f95cf2f9-78de-c8a7-e6bc-59171bc3a473", + "x-ms-request-id": "d8bf63ec-901a-0009-2efc-cc22b6000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-864dd56d-7efa-43f9-67ba-43bdb60256ba/test-directory-a12fc033-ed03-21ef-9073-21f00491b8e7?restype=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-9e6bdb215292ec418523d5476ae09b05-b692310fba507549-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "ca340765-f951-0c51-023a-696a56b6c455", + "x-ms-date": "Fri, 29 Oct 2021 19:40:12 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:12 GMT", + "ETag": "\u00220x8D99B13ED136B05\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:13 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "ca340765-f951-0c51-023a-696a56b6c455", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-10-29T19:40:13.3792517Z", + "x-ms-file-creation-time": "2021-10-29T19:40:13.3792517Z", + "x-ms-file-id": "13835128424026341376", + "x-ms-file-last-write-time": "2021-10-29T19:40:13.3792517Z", + "x-ms-file-parent-id": "0", + "x-ms-file-permission-key": "15110104144358886944*6706197617703823457", + "x-ms-request-id": "d8bf63ef-901a-0009-2ffc-cc22b6000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-864dd56d-7efa-43f9-67ba-43bdb60256ba/test-directory-2cf97203-e0ff-d6cc-e44f-106bc1752f62?restype=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-6fca4eca1db307439c949fcc178aadcc-a93377157d889241-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "8076d6d3-9234-85a2-3a5d-e601e9e54b8c", + "x-ms-date": "Fri, 29 Oct 2021 19:40:12 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:12 GMT", + "ETag": "\u00220x8D99B13ED1F03AF\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:13 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "8076d6d3-9234-85a2-3a5d-e601e9e54b8c", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-10-29T19:40:13.4552495Z", + "x-ms-file-creation-time": "2021-10-29T19:40:13.4552495Z", + "x-ms-file-id": "11529285414812647424", + "x-ms-file-last-write-time": "2021-10-29T19:40:13.4552495Z", + "x-ms-file-parent-id": "0", + "x-ms-file-permission-key": "15110104144358886944*6706197617703823457", + "x-ms-request-id": "d8bf63f1-901a-0009-30fc-cc22b6000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-864dd56d-7efa-43f9-67ba-43bdb60256ba/test-directory-2cf97203-e0ff-d6cc-e44f-106bc1752f62/test-file-d6b5060b-c72b-15f7-dbd4-8e471f61e272", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-b7d184eb51f9b44fac7cd24519407ea2-7f0a6ad74cb9ca4e-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "ed60346c-b1bb-0bae-df61-a45f035b65d8", + "x-ms-content-length": "1024", + "x-ms-date": "Fri, 29 Oct 2021 19:40:12 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-type": "file", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:13 GMT", + "ETag": "\u00220x8D99B13ED3AF052\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:13 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "ed60346c-b1bb-0bae-df61-a45f035b65d8", + "x-ms-file-attributes": "Archive", + "x-ms-file-change-time": "2021-10-29T19:40:13.6382546Z", + "x-ms-file-creation-time": "2021-10-29T19:40:13.6382546Z", + "x-ms-file-id": "16140971433240035328", + "x-ms-file-last-write-time": "2021-10-29T19:40:13.6382546Z", + "x-ms-file-parent-id": "11529285414812647424", + "x-ms-file-permission-key": "13773932323712163591*6706197617703823457", + "x-ms-request-id": "d8bf63f3-901a-0009-31fc-cc22b6000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-864dd56d-7efa-43f9-67ba-43bdb60256ba/test-directory-2cf97203-e0ff-d6cc-e44f-106bc1752f62/test-file-d6b5060b-c72b-15f7-dbd4-8e471f61e272?comp=lease", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-8f461108c60a9c41899b81f4701f9288-763e284dd7a3834c-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "9384e9a0-8759-0c6a-a703-1628b88906e7", + "x-ms-date": "Fri, 29 Oct 2021 19:40:12 GMT", + "x-ms-lease-action": "acquire", + "x-ms-lease-duration": "-1", + "x-ms-proposed-lease-id": "b43a747b-604d-5c8d-d793-f92504f70d47", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:13 GMT", + "ETag": "\u00220x8D99B13ED3AF052\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:13 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "9384e9a0-8759-0c6a-a703-1628b88906e7", + "x-ms-lease-id": "b43a747b-604d-5c8d-d793-f92504f70d47", + "x-ms-request-id": "d8bf63f4-901a-0009-32fc-cc22b6000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-864dd56d-7efa-43f9-67ba-43bdb60256ba/test-directory-2cf97203-e0ff-d6cc-e44f-106bc1752f62/test-file-d6b5060b-c72b-15f7-dbd4-8e471f61e272?restype=directory\u0026comp=rename", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-54ea328a103f3941bfbb2089251630c1-b2e19b4eb95b6c48-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "1a857774-7a73-11ed-6bce-43fede8d5cfd", + "x-ms-date": "Fri, 29 Oct 2021 19:40:13 GMT", + "x-ms-destination-lease-id": "b43a747b-604d-5c8d-d793-f92504f70d47", + "x-ms-file-rename-replace-if-exists": "true", + "x-ms-file-rename-source": "https%3A%2F%2F712xscnapby3pev55a.file.preprod.core.windows.net%2Ftest-share-864dd56d-7efa-43f9-67ba-43bdb60256ba%2Ftest-directory-a12fc033-ed03-21ef-9073-21f00491b8e7=", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:13 GMT", + "ETag": "\u00220x8D99B13ED555628\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:13 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "1a857774-7a73-11ed-6bce-43fede8d5cfd", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-10-29T19:40:13.8112552Z", + "x-ms-file-creation-time": "2021-10-29T19:40:13.3792517Z", + "x-ms-file-id": "13835128424026341376", + "x-ms-file-last-write-time": "2021-10-29T19:40:13.3792517Z", + "x-ms-file-parent-id": "11529285414812647424", + "x-ms-file-permission-key": "15110104144358886944*6706197617703823457", + "x-ms-request-id": "d8bf63f5-901a-0009-33fc-cc22b6000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-864dd56d-7efa-43f9-67ba-43bdb60256ba/test-directory-2cf97203-e0ff-d6cc-e44f-106bc1752f62/test-file-d6b5060b-c72b-15f7-dbd4-8e471f61e272?restype=directory", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "40b40db0-ec03-d874-6fb4-c1b337d9a82f", + "x-ms-date": "Fri, 29 Oct 2021 19:40:13 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:13 GMT", + "ETag": "\u00220x8D99B13ED555628\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:13 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "40b40db0-ec03-d874-6fb4-c1b337d9a82f", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-10-29T19:40:13.8112552Z", + "x-ms-file-creation-time": "2021-10-29T19:40:13.3792517Z", + "x-ms-file-id": "13835128424026341376", + "x-ms-file-last-write-time": "2021-10-29T19:40:13.3792517Z", + "x-ms-file-parent-id": "11529285414812647424", + "x-ms-file-permission-key": "15110104144358886944*6706197617703823457", + "x-ms-request-id": "d8bf63f6-901a-0009-34fc-cc22b6000000", + "x-ms-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-864dd56d-7efa-43f9-67ba-43bdb60256ba?restype=share", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-009dec8595b93d489133413172c4b950-530842fee87b044e-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "d14e8a18-1cd9-99f9-ae71-3c532f4ded38", + "x-ms-date": "Fri, 29 Oct 2021 19:40:13 GMT", + "x-ms-delete-snapshots": "include", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:13 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "d14e8a18-1cd9-99f9-ae71-3c532f4ded38", + "x-ms-request-id": "d8bf63f7-901a-0009-35fc-cc22b6000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + } + ], + "Variables": { + "RandomSeed": "1963057015", + "Storage_TestConfigDefault": "ProductionTenant\n712xscnapby3pev55a\nU2FuaXRpemVk\nhttps://712xscnapby3pev55a.blob.preprod.core.windows.net\nhttps://712xscnapby3pev55a.file.preprod.core.windows.net\nhttps://712xscnapby3pev55a.queue.core.windows.net\nhttps://712xscnapby3pev55a.table.core.windows.net\n\n\n\n\nhttps://712xscnapby3pev55a-secondary.blob.core.windows.net\nhttps://712xscnapby3pev55a-secondary.file.core.windows.net\nhttps://712xscnapby3pev55a-secondary.queue.core.windows.net\nhttps://712xscnapby3pev55a-secondary.table.core.windows.net\n\nSanitized\n\n\nCloud\nBlobEndpoint=https://712xscnapby3pev55a.blob.preprod.core.windows.net/;QueueEndpoint=https://712xscnapby3pev55a.queue.core.windows.net/;FileEndpoint=https://712xscnapby3pev55a.file.preprod.core.windows.net/;BlobSecondaryEndpoint=https://712xscnapby3pev55a-secondary.blob.core.windows.net/;QueueSecondaryEndpoint=https://712xscnapby3pev55a-secondary.queue.core.windows.net/;FileSecondaryEndpoint=https://712xscnapby3pev55a-secondary.file.core.windows.net/;AccountName=712xscnapby3pev55a;AccountKey=Kg==;\nscope-1\n\n" + } +} \ No newline at end of file diff --git a/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_DestinationLeaseId(True)Async.json b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_DestinationLeaseId(True)Async.json new file mode 100644 index 000000000000..ee39de0e5a35 --- /dev/null +++ b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_DestinationLeaseId(True)Async.json @@ -0,0 +1,299 @@ +{ + "Entries": [ + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-7fd98fe7-7b2e-a338-29d3-d0b6b1119144?restype=share", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-5b0e937b4e35f24ea0897695807a8220-7e90c35dfb3ee84a-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "45a95f7f-6ab5-a326-21f9-10b5c79c247c", + "x-ms-date": "Fri, 29 Oct 2021 19:40:17 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:17 GMT", + "ETag": "\u00220x8D99B13EFBA1C03\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:17 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "45a95f7f-6ab5-a326-21f9-10b5c79c247c", + "x-ms-request-id": "d8bf6426-901a-0009-5cfc-cc22b6000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-7fd98fe7-7b2e-a338-29d3-d0b6b1119144/test-directory-7948d04a-5534-3e40-d704-b26b4d32948f?restype=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-4ed5231d88354446bb54f67a0cadb9bb-d528f63bc829624e-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "3fbbb19e-4d51-2988-1f6a-6eb0b8ba56ef", + "x-ms-date": "Fri, 29 Oct 2021 19:40:17 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:17 GMT", + "ETag": "\u00220x8D99B13EFC9DA53\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:17 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "3fbbb19e-4d51-2988-1f6a-6eb0b8ba56ef", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-10-29T19:40:17.9302995Z", + "x-ms-file-creation-time": "2021-10-29T19:40:17.9302995Z", + "x-ms-file-id": "13835128424026341376", + "x-ms-file-last-write-time": "2021-10-29T19:40:17.9302995Z", + "x-ms-file-parent-id": "0", + "x-ms-file-permission-key": "15110104144358886944*6706197617703823457", + "x-ms-request-id": "d8bf6428-901a-0009-5dfc-cc22b6000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-7fd98fe7-7b2e-a338-29d3-d0b6b1119144/test-directory-b4a98165-d365-fe14-41dc-43beb999a5d4?restype=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-91c59d2b0b51a545854ba44e86cbac48-140be984b4b02d43-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "1641ac1f-5959-cacb-9dbc-fd750aca6f85", + "x-ms-date": "Fri, 29 Oct 2021 19:40:17 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:17 GMT", + "ETag": "\u00220x8D99B13EFD4AFC2\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:18 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "1641ac1f-5959-cacb-9dbc-fd750aca6f85", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-10-29T19:40:18.0012994Z", + "x-ms-file-creation-time": "2021-10-29T19:40:18.0012994Z", + "x-ms-file-id": "11529285414812647424", + "x-ms-file-last-write-time": "2021-10-29T19:40:18.0012994Z", + "x-ms-file-parent-id": "0", + "x-ms-file-permission-key": "15110104144358886944*6706197617703823457", + "x-ms-request-id": "d8bf6429-901a-0009-5efc-cc22b6000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-7fd98fe7-7b2e-a338-29d3-d0b6b1119144/test-directory-b4a98165-d365-fe14-41dc-43beb999a5d4/test-file-37b99ac4-bbec-1078-43eb-2a58a1162162", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-757b0bef22ddb347b216ea3b11cb958b-ffa6bc1fc78cc840-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "4238ac9e-7c25-638f-3330-d26d2f732987", + "x-ms-content-length": "1024", + "x-ms-date": "Fri, 29 Oct 2021 19:40:17 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-type": "file", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:17 GMT", + "ETag": "\u00220x8D99B13EFE0969D\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:18 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "4238ac9e-7c25-638f-3330-d26d2f732987", + "x-ms-file-attributes": "Archive", + "x-ms-file-change-time": "2021-10-29T19:40:18.0792989Z", + "x-ms-file-creation-time": "2021-10-29T19:40:18.0792989Z", + "x-ms-file-id": "16140971433240035328", + "x-ms-file-last-write-time": "2021-10-29T19:40:18.0792989Z", + "x-ms-file-parent-id": "11529285414812647424", + "x-ms-file-permission-key": "13773932323712163591*6706197617703823457", + "x-ms-request-id": "d8bf642a-901a-0009-5ffc-cc22b6000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-7fd98fe7-7b2e-a338-29d3-d0b6b1119144/test-directory-b4a98165-d365-fe14-41dc-43beb999a5d4/test-file-37b99ac4-bbec-1078-43eb-2a58a1162162?comp=lease", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-6e4e06dc19d0c74f88c1c5fc1f343827-de874e4f81fe0244-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "bc1f76d9-717a-3b95-8002-210afaa5a675", + "x-ms-date": "Fri, 29 Oct 2021 19:40:17 GMT", + "x-ms-lease-action": "acquire", + "x-ms-lease-duration": "-1", + "x-ms-proposed-lease-id": "424d9b9b-622a-352c-201b-81e9bdbeb97b", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:17 GMT", + "ETag": "\u00220x8D99B13EFE0969D\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:18 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "bc1f76d9-717a-3b95-8002-210afaa5a675", + "x-ms-lease-id": "424d9b9b-622a-352c-201b-81e9bdbeb97b", + "x-ms-request-id": "d8bf642b-901a-0009-60fc-cc22b6000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-7fd98fe7-7b2e-a338-29d3-d0b6b1119144/test-directory-b4a98165-d365-fe14-41dc-43beb999a5d4/test-file-37b99ac4-bbec-1078-43eb-2a58a1162162?restype=directory\u0026comp=rename", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-ef6bccc91649904eb7ea19ab68c290b5-ac64c8054e477e4d-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "460f3eac-fc9f-c701-d47e-74dbbd32b092", + "x-ms-date": "Fri, 29 Oct 2021 19:40:17 GMT", + "x-ms-destination-lease-id": "424d9b9b-622a-352c-201b-81e9bdbeb97b", + "x-ms-file-rename-replace-if-exists": "true", + "x-ms-file-rename-source": "https%3A%2F%2F712xscnapby3pev55a.file.preprod.core.windows.net%2Ftest-share-7fd98fe7-7b2e-a338-29d3-d0b6b1119144%2Ftest-directory-7948d04a-5534-3e40-d704-b26b4d32948f=", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:17 GMT", + "ETag": "\u00220x8D99B13EFF94E82\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:18 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "460f3eac-fc9f-c701-d47e-74dbbd32b092", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-10-29T19:40:18.2412930Z", + "x-ms-file-creation-time": "2021-10-29T19:40:17.9302995Z", + "x-ms-file-id": "13835128424026341376", + "x-ms-file-last-write-time": "2021-10-29T19:40:17.9302995Z", + "x-ms-file-parent-id": "11529285414812647424", + "x-ms-file-permission-key": "15110104144358886944*6706197617703823457", + "x-ms-request-id": "d8bf642c-901a-0009-61fc-cc22b6000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-7fd98fe7-7b2e-a338-29d3-d0b6b1119144/test-directory-b4a98165-d365-fe14-41dc-43beb999a5d4/test-file-37b99ac4-bbec-1078-43eb-2a58a1162162?restype=directory", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "bc5d0f89-5f96-7ad5-556e-ef3ac0cdfd2c", + "x-ms-date": "Fri, 29 Oct 2021 19:40:17 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:17 GMT", + "ETag": "\u00220x8D99B13EFF94E82\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:18 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "bc5d0f89-5f96-7ad5-556e-ef3ac0cdfd2c", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-10-29T19:40:18.2412930Z", + "x-ms-file-creation-time": "2021-10-29T19:40:17.9302995Z", + "x-ms-file-id": "13835128424026341376", + "x-ms-file-last-write-time": "2021-10-29T19:40:17.9302995Z", + "x-ms-file-parent-id": "11529285414812647424", + "x-ms-file-permission-key": "15110104144358886944*6706197617703823457", + "x-ms-request-id": "d8bf642d-901a-0009-62fc-cc22b6000000", + "x-ms-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-7fd98fe7-7b2e-a338-29d3-d0b6b1119144?restype=share", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-8d78d82f8367f74a9632c9a220d1a589-67b770c6f0a5af4a-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "ae51f8cc-f4d5-35fb-8e36-0f6aba4fe400", + "x-ms-date": "Fri, 29 Oct 2021 19:40:17 GMT", + "x-ms-delete-snapshots": "include", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:17 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "ae51f8cc-f4d5-35fb-8e36-0f6aba4fe400", + "x-ms-request-id": "d8bf642e-901a-0009-63fc-cc22b6000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + } + ], + "Variables": { + "RandomSeed": "1590015454", + "Storage_TestConfigDefault": "ProductionTenant\n712xscnapby3pev55a\nU2FuaXRpemVk\nhttps://712xscnapby3pev55a.blob.preprod.core.windows.net\nhttps://712xscnapby3pev55a.file.preprod.core.windows.net\nhttps://712xscnapby3pev55a.queue.core.windows.net\nhttps://712xscnapby3pev55a.table.core.windows.net\n\n\n\n\nhttps://712xscnapby3pev55a-secondary.blob.core.windows.net\nhttps://712xscnapby3pev55a-secondary.file.core.windows.net\nhttps://712xscnapby3pev55a-secondary.queue.core.windows.net\nhttps://712xscnapby3pev55a-secondary.table.core.windows.net\n\nSanitized\n\n\nCloud\nBlobEndpoint=https://712xscnapby3pev55a.blob.preprod.core.windows.net/;QueueEndpoint=https://712xscnapby3pev55a.queue.core.windows.net/;FileEndpoint=https://712xscnapby3pev55a.file.preprod.core.windows.net/;BlobSecondaryEndpoint=https://712xscnapby3pev55a-secondary.blob.core.windows.net/;QueueSecondaryEndpoint=https://712xscnapby3pev55a-secondary.queue.core.windows.net/;FileSecondaryEndpoint=https://712xscnapby3pev55a-secondary.file.core.windows.net/;AccountName=712xscnapby3pev55a;AccountKey=Kg==;\nscope-1\n\n" + } +} \ No newline at end of file diff --git a/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_DifferentDirectory.json b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_DifferentDirectory.json new file mode 100644 index 000000000000..6658ef6f74f2 --- /dev/null +++ b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_DifferentDirectory.json @@ -0,0 +1,262 @@ +{ + "Entries": [ + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-e617ebe3-1430-20e7-8048-150741a69eb2?restype=share", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-f3c7a445e457794bace0a7d854329719-c3468a1ed694cb42-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "ba212e40-d276-b634-0a42-53100dd66ea1", + "x-ms-date": "Fri, 29 Oct 2021 19:40:15 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:16 GMT", + "ETag": "\u00220x8D99B13EF1AA75E\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:16 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "ba212e40-d276-b634-0a42-53100dd66ea1", + "x-ms-request-id": "d8bf6418-901a-0009-50fc-cc22b6000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-e617ebe3-1430-20e7-8048-150741a69eb2/test-directory-6531ed57-1fa2-30f5-04fa-c9a58ebbc31e?restype=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-71b6927dee66fb4e984b129a4d52c016-65b98c6baebb0d4b-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "6fd4e41c-d730-21d3-38f0-b67c088f274f", + "x-ms-date": "Fri, 29 Oct 2021 19:40:16 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:16 GMT", + "ETag": "\u00220x8D99B13EF29C8F0\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:16 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "6fd4e41c-d730-21d3-38f0-b67c088f274f", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-10-29T19:40:16.8812784Z", + "x-ms-file-creation-time": "2021-10-29T19:40:16.8812784Z", + "x-ms-file-id": "13835128424026341376", + "x-ms-file-last-write-time": "2021-10-29T19:40:16.8812784Z", + "x-ms-file-parent-id": "0", + "x-ms-file-permission-key": "15110104144358886944*6706197617703823457", + "x-ms-request-id": "d8bf641a-901a-0009-51fc-cc22b6000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-e617ebe3-1430-20e7-8048-150741a69eb2/test-directory-6531ed57-1fa2-30f5-04fa-c9a58ebbc31e/test-directory-6e04347f-5b0f-741b-b1e3-5631327ed22e?restype=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-0109a7eecd053f49a67e546e41b8e212-3b5e03d66053b94a-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "2af79d48-a1d1-c136-c860-bd4c80a1eeb9", + "x-ms-date": "Fri, 29 Oct 2021 19:40:16 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:16 GMT", + "ETag": "\u00220x8D99B13EF3EB0DA\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:17 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "2af79d48-a1d1-c136-c860-bd4c80a1eeb9", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-10-29T19:40:17.0182874Z", + "x-ms-file-creation-time": "2021-10-29T19:40:17.0182874Z", + "x-ms-file-id": "11529285414812647424", + "x-ms-file-last-write-time": "2021-10-29T19:40:17.0182874Z", + "x-ms-file-parent-id": "13835128424026341376", + "x-ms-file-permission-key": "15110104144358886944*6706197617703823457", + "x-ms-request-id": "d8bf641b-901a-0009-52fc-cc22b6000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-e617ebe3-1430-20e7-8048-150741a69eb2/test-directory-8492871e-7e06-2a68-45cf-a1697f8747f2?restype=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-05b7f8b1f7277740a4dd230146888eee-1d9b5966879e774d-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "a57521b7-c02d-ca79-34cc-e402ffcd4141", + "x-ms-date": "Fri, 29 Oct 2021 19:40:16 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:16 GMT", + "ETag": "\u00220x8D99B13EF498778\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:17 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "a57521b7-c02d-ca79-34cc-e402ffcd4141", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-10-29T19:40:17.0893176Z", + "x-ms-file-creation-time": "2021-10-29T19:40:17.0893176Z", + "x-ms-file-id": "16140971433240035328", + "x-ms-file-last-write-time": "2021-10-29T19:40:17.0893176Z", + "x-ms-file-parent-id": "0", + "x-ms-file-permission-key": "15110104144358886944*6706197617703823457", + "x-ms-request-id": "d8bf641c-901a-0009-53fc-cc22b6000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-e617ebe3-1430-20e7-8048-150741a69eb2/test-directory-8492871e-7e06-2a68-45cf-a1697f8747f2/test-directory-aaadcb18-5ab8-7632-2a49-373e9de194a3?restype=directory\u0026comp=rename", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-2079fe50e9e7684784209029e2e8a25a-276cfd3d7f3edf42-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "ca6d9f86-09f4-5d72-eeff-7ae4883b2c52", + "x-ms-date": "Fri, 29 Oct 2021 19:40:16 GMT", + "x-ms-file-rename-source": "https%3A%2F%2F712xscnapby3pev55a.file.preprod.core.windows.net%2Ftest-share-e617ebe3-1430-20e7-8048-150741a69eb2%2Ftest-directory-6531ed57-1fa2-30f5-04fa-c9a58ebbc31e%2Ftest-directory-6e04347f-5b0f-741b-b1e3-5631327ed22e=", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:16 GMT", + "ETag": "\u00220x8D99B13EF543480\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:17 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "ca6d9f86-09f4-5d72-eeff-7ae4883b2c52", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-10-29T19:40:17.1592832Z", + "x-ms-file-creation-time": "2021-10-29T19:40:17.0182874Z", + "x-ms-file-id": "11529285414812647424", + "x-ms-file-last-write-time": "2021-10-29T19:40:17.0182874Z", + "x-ms-file-parent-id": "16140971433240035328", + "x-ms-file-permission-key": "15110104144358886944*6706197617703823457", + "x-ms-request-id": "d8bf641d-901a-0009-54fc-cc22b6000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-e617ebe3-1430-20e7-8048-150741a69eb2/test-directory-8492871e-7e06-2a68-45cf-a1697f8747f2/test-directory-aaadcb18-5ab8-7632-2a49-373e9de194a3?restype=directory", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "feb8b7ff-c974-11ae-0454-701227e05521", + "x-ms-date": "Fri, 29 Oct 2021 19:40:16 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:16 GMT", + "ETag": "\u00220x8D99B13EF543480\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:17 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "feb8b7ff-c974-11ae-0454-701227e05521", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-10-29T19:40:17.1592832Z", + "x-ms-file-creation-time": "2021-10-29T19:40:17.0182874Z", + "x-ms-file-id": "11529285414812647424", + "x-ms-file-last-write-time": "2021-10-29T19:40:17.0182874Z", + "x-ms-file-parent-id": "16140971433240035328", + "x-ms-file-permission-key": "15110104144358886944*6706197617703823457", + "x-ms-request-id": "d8bf641e-901a-0009-55fc-cc22b6000000", + "x-ms-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-e617ebe3-1430-20e7-8048-150741a69eb2?restype=share", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-6f8ca6790d68eb48b7e2ad314c9800a0-523802c9dd725d4e-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "d1e4aa4b-2e82-6ede-92d5-83c6721e4f26", + "x-ms-date": "Fri, 29 Oct 2021 19:40:16 GMT", + "x-ms-delete-snapshots": "include", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:16 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "d1e4aa4b-2e82-6ede-92d5-83c6721e4f26", + "x-ms-request-id": "d8bf641f-901a-0009-56fc-cc22b6000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + } + ], + "Variables": { + "RandomSeed": "410728327", + "Storage_TestConfigDefault": "ProductionTenant\n712xscnapby3pev55a\nU2FuaXRpemVk\nhttps://712xscnapby3pev55a.blob.preprod.core.windows.net\nhttps://712xscnapby3pev55a.file.preprod.core.windows.net\nhttps://712xscnapby3pev55a.queue.core.windows.net\nhttps://712xscnapby3pev55a.table.core.windows.net\n\n\n\n\nhttps://712xscnapby3pev55a-secondary.blob.core.windows.net\nhttps://712xscnapby3pev55a-secondary.file.core.windows.net\nhttps://712xscnapby3pev55a-secondary.queue.core.windows.net\nhttps://712xscnapby3pev55a-secondary.table.core.windows.net\n\nSanitized\n\n\nCloud\nBlobEndpoint=https://712xscnapby3pev55a.blob.preprod.core.windows.net/;QueueEndpoint=https://712xscnapby3pev55a.queue.core.windows.net/;FileEndpoint=https://712xscnapby3pev55a.file.preprod.core.windows.net/;BlobSecondaryEndpoint=https://712xscnapby3pev55a-secondary.blob.core.windows.net/;QueueSecondaryEndpoint=https://712xscnapby3pev55a-secondary.queue.core.windows.net/;FileSecondaryEndpoint=https://712xscnapby3pev55a-secondary.file.core.windows.net/;AccountName=712xscnapby3pev55a;AccountKey=Kg==;\nscope-1\n\n" + } +} \ No newline at end of file diff --git a/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_DifferentDirectoryAsync.json b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_DifferentDirectoryAsync.json new file mode 100644 index 000000000000..22796c867143 --- /dev/null +++ b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_DifferentDirectoryAsync.json @@ -0,0 +1,262 @@ +{ + "Entries": [ + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-9fc738f7-0d72-c69c-a76e-5f4c6293b81f?restype=share", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-0015fc9e5ec84545b9dc851e2fe31423-6db65497509d184e-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "179b9f1c-cde5-de87-10f6-47abe4399ea3", + "x-ms-date": "Fri, 29 Oct 2021 19:40:19 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:19 GMT", + "ETag": "\u00220x8D99B13F14BB8B1\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:20 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "179b9f1c-cde5-de87-10f6-47abe4399ea3", + "x-ms-request-id": "d8bf6458-901a-0009-7dfc-cc22b6000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-9fc738f7-0d72-c69c-a76e-5f4c6293b81f/test-directory-500d285a-c3de-0859-0024-dd717f714900?restype=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-7271bccc330610448da8055f27d0b298-7599032ac8211d4b-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "54d0e961-0d99-59a7-4592-16c0ef165e9e", + "x-ms-date": "Fri, 29 Oct 2021 19:40:19 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:19 GMT", + "ETag": "\u00220x8D99B13F15A4055\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:20 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "54d0e961-0d99-59a7-4592-16c0ef165e9e", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-10-29T19:40:20.5543509Z", + "x-ms-file-creation-time": "2021-10-29T19:40:20.5543509Z", + "x-ms-file-id": "13835128424026341376", + "x-ms-file-last-write-time": "2021-10-29T19:40:20.5543509Z", + "x-ms-file-parent-id": "0", + "x-ms-file-permission-key": "15110104144358886944*6706197617703823457", + "x-ms-request-id": "d8bf645a-901a-0009-7efc-cc22b6000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-9fc738f7-0d72-c69c-a76e-5f4c6293b81f/test-directory-500d285a-c3de-0859-0024-dd717f714900/test-directory-0b9a47ac-db08-b9ab-eeeb-52533dec6174?restype=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-05d407887da10740a2295e06b846d499-cb857282e444914d-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "5fc0e62b-b3f1-867f-3e17-65aebb541b58", + "x-ms-date": "Fri, 29 Oct 2021 19:40:19 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:19 GMT", + "ETag": "\u00220x8D99B13F1651486\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:20 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "5fc0e62b-b3f1-867f-3e17-65aebb541b58", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-10-29T19:40:20.6253190Z", + "x-ms-file-creation-time": "2021-10-29T19:40:20.6253190Z", + "x-ms-file-id": "11529285414812647424", + "x-ms-file-last-write-time": "2021-10-29T19:40:20.6253190Z", + "x-ms-file-parent-id": "13835128424026341376", + "x-ms-file-permission-key": "15110104144358886944*6706197617703823457", + "x-ms-request-id": "d8bf645b-901a-0009-7ffc-cc22b6000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-9fc738f7-0d72-c69c-a76e-5f4c6293b81f/test-directory-995ba130-c806-b8fd-e098-d9315e452e75?restype=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-e1937d40b8dc4c4497f231458b7365b3-2379878ebadf1f41-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "e83424bc-981d-63e2-e908-7f58da4d27f8", + "x-ms-date": "Fri, 29 Oct 2021 19:40:19 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:19 GMT", + "ETag": "\u00220x8D99B13F170860F\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:20 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "e83424bc-981d-63e2-e908-7f58da4d27f8", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-10-29T19:40:20.7003151Z", + "x-ms-file-creation-time": "2021-10-29T19:40:20.7003151Z", + "x-ms-file-id": "16140971433240035328", + "x-ms-file-last-write-time": "2021-10-29T19:40:20.7003151Z", + "x-ms-file-parent-id": "0", + "x-ms-file-permission-key": "15110104144358886944*6706197617703823457", + "x-ms-request-id": "d8bf645c-901a-0009-80fc-cc22b6000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-9fc738f7-0d72-c69c-a76e-5f4c6293b81f/test-directory-995ba130-c806-b8fd-e098-d9315e452e75/test-directory-51f5efe8-c42c-2e2c-1ea9-c37c70722827?restype=directory\u0026comp=rename", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-e47117cbd844a4449e86f7f682018a70-58b7887025b66742-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "9fa26061-f5c3-f8b1-f705-c974d565f376", + "x-ms-date": "Fri, 29 Oct 2021 19:40:19 GMT", + "x-ms-file-rename-source": "https%3A%2F%2F712xscnapby3pev55a.file.preprod.core.windows.net%2Ftest-share-9fc738f7-0d72-c69c-a76e-5f4c6293b81f%2Ftest-directory-500d285a-c3de-0859-0024-dd717f714900%2Ftest-directory-0b9a47ac-db08-b9ab-eeeb-52533dec6174=", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:19 GMT", + "ETag": "\u00220x8D99B13F17B5D14\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:20 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "9fa26061-f5c3-f8b1-f705-c974d565f376", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-10-29T19:40:20.7713556Z", + "x-ms-file-creation-time": "2021-10-29T19:40:20.6253190Z", + "x-ms-file-id": "11529285414812647424", + "x-ms-file-last-write-time": "2021-10-29T19:40:20.6253190Z", + "x-ms-file-parent-id": "16140971433240035328", + "x-ms-file-permission-key": "15110104144358886944*6706197617703823457", + "x-ms-request-id": "d8bf645d-901a-0009-01fc-cc22b6000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-9fc738f7-0d72-c69c-a76e-5f4c6293b81f/test-directory-995ba130-c806-b8fd-e098-d9315e452e75/test-directory-51f5efe8-c42c-2e2c-1ea9-c37c70722827?restype=directory", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "0f1a3ad1-89d0-5c64-4a7c-420b7ce34921", + "x-ms-date": "Fri, 29 Oct 2021 19:40:20 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:20 GMT", + "ETag": "\u00220x8D99B13F17B5D14\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:20 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "0f1a3ad1-89d0-5c64-4a7c-420b7ce34921", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-10-29T19:40:20.7713556Z", + "x-ms-file-creation-time": "2021-10-29T19:40:20.6253190Z", + "x-ms-file-id": "11529285414812647424", + "x-ms-file-last-write-time": "2021-10-29T19:40:20.6253190Z", + "x-ms-file-parent-id": "16140971433240035328", + "x-ms-file-permission-key": "15110104144358886944*6706197617703823457", + "x-ms-request-id": "d8bf645e-901a-0009-02fc-cc22b6000000", + "x-ms-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-9fc738f7-0d72-c69c-a76e-5f4c6293b81f?restype=share", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-53994393c27139438ea3058280b184da-3b327195357cfe47-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "9ba2d55a-e34a-55a6-f3aa-935caadb25b4", + "x-ms-date": "Fri, 29 Oct 2021 19:40:20 GMT", + "x-ms-delete-snapshots": "include", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:20 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "9ba2d55a-e34a-55a6-f3aa-935caadb25b4", + "x-ms-request-id": "d8bf6460-901a-0009-03fc-cc22b6000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + } + ], + "Variables": { + "RandomSeed": "1453877000", + "Storage_TestConfigDefault": "ProductionTenant\n712xscnapby3pev55a\nU2FuaXRpemVk\nhttps://712xscnapby3pev55a.blob.preprod.core.windows.net\nhttps://712xscnapby3pev55a.file.preprod.core.windows.net\nhttps://712xscnapby3pev55a.queue.core.windows.net\nhttps://712xscnapby3pev55a.table.core.windows.net\n\n\n\n\nhttps://712xscnapby3pev55a-secondary.blob.core.windows.net\nhttps://712xscnapby3pev55a-secondary.file.core.windows.net\nhttps://712xscnapby3pev55a-secondary.queue.core.windows.net\nhttps://712xscnapby3pev55a-secondary.table.core.windows.net\n\nSanitized\n\n\nCloud\nBlobEndpoint=https://712xscnapby3pev55a.blob.preprod.core.windows.net/;QueueEndpoint=https://712xscnapby3pev55a.queue.core.windows.net/;FileEndpoint=https://712xscnapby3pev55a.file.preprod.core.windows.net/;BlobSecondaryEndpoint=https://712xscnapby3pev55a-secondary.blob.core.windows.net/;QueueSecondaryEndpoint=https://712xscnapby3pev55a-secondary.queue.core.windows.net/;FileSecondaryEndpoint=https://712xscnapby3pev55a-secondary.file.core.windows.net/;AccountName=712xscnapby3pev55a;AccountKey=Kg==;\nscope-1\n\n" + } +} \ No newline at end of file diff --git a/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_IgnoreReadOnly(False).json b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_IgnoreReadOnly(False).json new file mode 100644 index 000000000000..32a5b339102b --- /dev/null +++ b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_IgnoreReadOnly(False).json @@ -0,0 +1,227 @@ +{ + "Entries": [ + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-386083a9-ad83-0894-4dd6-117a8bba3b56?restype=share", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-f64364404de349479a36abb1b6fd5c56-1214efd5667ed843-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "dcb94502-bd40-d679-991a-659989abac94", + "x-ms-date": "Fri, 29 Oct 2021 19:29:24 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:29:25 GMT", + "ETag": "\u00220x8D99B126AF2088E\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:29:25 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "dcb94502-bd40-d679-991a-659989abac94", + "x-ms-request-id": "e116b192-c01a-0001-2efb-cc0599000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-386083a9-ad83-0894-4dd6-117a8bba3b56/test-directory-7908531f-27a1-4aa4-e1b7-81a87c5372cf?restype=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-989ed0a5461af54a9be5bfeff5583e50-3f70350185b73b4b-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "42219c2e-6575-dad7-a16f-fb883bd15946", + "x-ms-date": "Fri, 29 Oct 2021 19:29:24 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:29:25 GMT", + "ETag": "\u00220x8D99B126AFFE815\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:29:25 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "42219c2e-6575-dad7-a16f-fb883bd15946", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-10-29T19:29:25.6508437Z", + "x-ms-file-creation-time": "2021-10-29T19:29:25.6508437Z", + "x-ms-file-id": "13835128424026341376", + "x-ms-file-last-write-time": "2021-10-29T19:29:25.6508437Z", + "x-ms-file-parent-id": "0", + "x-ms-file-permission-key": "15110104144358886944*6706197617703823457", + "x-ms-request-id": "e116b194-c01a-0001-2ffb-cc0599000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-386083a9-ad83-0894-4dd6-117a8bba3b56/test-directory-f0a296a8-6733-bf93-3d62-1bc8a21c51d9?restype=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-fcc3aff761a6c04ab67741b1a3825847-d0ac517fdc8e1f40-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "62df3e7e-2f66-c7d8-0861-05124a0e3885", + "x-ms-date": "Fri, 29 Oct 2021 19:29:24 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:29:25 GMT", + "ETag": "\u00220x8D99B126B0CB93A\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:29:25 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "62df3e7e-2f66-c7d8-0861-05124a0e3885", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-10-29T19:29:25.7348410Z", + "x-ms-file-creation-time": "2021-10-29T19:29:25.7348410Z", + "x-ms-file-id": "11529285414812647424", + "x-ms-file-last-write-time": "2021-10-29T19:29:25.7348410Z", + "x-ms-file-parent-id": "0", + "x-ms-file-permission-key": "15110104144358886944*6706197617703823457", + "x-ms-request-id": "e116b195-c01a-0001-30fb-cc0599000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-386083a9-ad83-0894-4dd6-117a8bba3b56/test-directory-f0a296a8-6733-bf93-3d62-1bc8a21c51d9/test-file-c5f0211d-7958-7814-3c0f-2e95c3025caf", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-736b7f655c97ef47b948ef248ac986d4-2646df318112d84f-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "41741e65-a39d-0534-2a66-265600420305", + "x-ms-content-length": "1024", + "x-ms-date": "Fri, 29 Oct 2021 19:29:25 GMT", + "x-ms-file-attributes": "ReadOnly", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-type": "file", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:29:25 GMT", + "ETag": "\u00220x8D99B126B19B244\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:29:25 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "41741e65-a39d-0534-2a66-265600420305", + "x-ms-file-attributes": "ReadOnly | Archive", + "x-ms-file-change-time": "2021-10-29T19:29:25.8198596Z", + "x-ms-file-creation-time": "2021-10-29T19:29:25.8198596Z", + "x-ms-file-id": "16140971433240035328", + "x-ms-file-last-write-time": "2021-10-29T19:29:25.8198596Z", + "x-ms-file-parent-id": "11529285414812647424", + "x-ms-file-permission-key": "13773932323712163591*6706197617703823457", + "x-ms-request-id": "e116b196-c01a-0001-31fb-cc0599000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-386083a9-ad83-0894-4dd6-117a8bba3b56/test-directory-f0a296a8-6733-bf93-3d62-1bc8a21c51d9/test-file-c5f0211d-7958-7814-3c0f-2e95c3025caf?restype=directory\u0026comp=rename", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-0b1d8244fffce0489f1126fafb89ab8a-11642aa9c0bc1445-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "a5307bc7-1a8d-5512-5944-38d6c91d685a", + "x-ms-date": "Fri, 29 Oct 2021 19:29:25 GMT", + "x-ms-file-attributes": "Directory", + "x-ms-file-rename-ignore-read-only": "false", + "x-ms-file-rename-replace-if-exists": "true", + "x-ms-file-rename-source": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-386083a9-ad83-0894-4dd6-117a8bba3b56/test-directory-7908531f-27a1-4aa4-e1b7-81a87c5372cf", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 409, + "ResponseHeaders": { + "Content-Length": "258", + "Content-Type": "application/xml", + "Date": "Fri, 29 Oct 2021 19:29:25 GMT", + "x-ms-client-request-id": "a5307bc7-1a8d-5512-5944-38d6c91d685a", + "x-ms-error-code": "ReadOnlyAttribute", + "x-ms-request-id": "e116b197-c01a-0001-32fb-cc0599000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [ + "\uFEFF\u003C?xml version=\u00221.0\u0022 encoding=\u0022utf-8\u0022?\u003E\u003CError\u003E\u003CCode\u003EReadOnlyAttribute\u003C/Code\u003E\u003CMessage\u003EThe specified resource is read-only and cannot be modified at this time.\n", + "RequestId:e116b197-c01a-0001-32fb-cc0599000000\n", + "Time:2021-10-29T19:29:25.8879345Z\u003C/Message\u003E\u003C/Error\u003E" + ] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-386083a9-ad83-0894-4dd6-117a8bba3b56?restype=share", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-48e1a5ca04b7734b9e89189421818efb-91f60c547ec0ac4c-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "858e3017-5d12-eb77-43c5-627f9c726491", + "x-ms-date": "Fri, 29 Oct 2021 19:29:25 GMT", + "x-ms-delete-snapshots": "include", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:29:25 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "858e3017-5d12-eb77-43c5-627f9c726491", + "x-ms-request-id": "e116b198-c01a-0001-33fb-cc0599000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + } + ], + "Variables": { + "RandomSeed": "2081511568", + "Storage_TestConfigDefault": "ProductionTenant\n712xscnapby3pev55a\nU2FuaXRpemVk\nhttps://712xscnapby3pev55a.blob.preprod.core.windows.net\nhttps://712xscnapby3pev55a.file.preprod.core.windows.net\nhttps://712xscnapby3pev55a.queue.core.windows.net\nhttps://712xscnapby3pev55a.table.core.windows.net\n\n\n\n\nhttps://712xscnapby3pev55a-secondary.blob.core.windows.net\nhttps://712xscnapby3pev55a-secondary.file.core.windows.net\nhttps://712xscnapby3pev55a-secondary.queue.core.windows.net\nhttps://712xscnapby3pev55a-secondary.table.core.windows.net\n\nSanitized\n\n\nCloud\nBlobEndpoint=https://712xscnapby3pev55a.blob.preprod.core.windows.net/;QueueEndpoint=https://712xscnapby3pev55a.queue.core.windows.net/;FileEndpoint=https://712xscnapby3pev55a.file.preprod.core.windows.net/;BlobSecondaryEndpoint=https://712xscnapby3pev55a-secondary.blob.core.windows.net/;QueueSecondaryEndpoint=https://712xscnapby3pev55a-secondary.queue.core.windows.net/;FileSecondaryEndpoint=https://712xscnapby3pev55a-secondary.file.core.windows.net/;AccountName=712xscnapby3pev55a;AccountKey=Kg==;\nscope-1\n\n" + } +} \ No newline at end of file diff --git a/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_IgnoreReadOnly(False)Async.json b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_IgnoreReadOnly(False)Async.json new file mode 100644 index 000000000000..103bd06c9bec --- /dev/null +++ b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_IgnoreReadOnly(False)Async.json @@ -0,0 +1,227 @@ +{ + "Entries": [ + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-0f99c75b-30ab-9fdf-1098-3f0982ff11d7?restype=share", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-2d17a79fd4bb4c479f7a601200ca979d-144e67fb95db794e-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "bda41456-5698-37f5-0318-fdd73eebccfe", + "x-ms-date": "Fri, 29 Oct 2021 19:29:29 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:29:29 GMT", + "ETag": "\u00220x8D99B126DED4784\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:29:30 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "bda41456-5698-37f5-0318-fdd73eebccfe", + "x-ms-request-id": "e116b1df-c01a-0001-6cfb-cc0599000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-0f99c75b-30ab-9fdf-1098-3f0982ff11d7/test-directory-8a5c358e-7b8a-c349-7377-5fd371ba7b0c?restype=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-a47dfba22c213642a9bdff782ad10a1d-fb6af0da90fa204f-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "ee96c10a-69a7-da9a-cae0-4920f721c648", + "x-ms-date": "Fri, 29 Oct 2021 19:29:29 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:29:29 GMT", + "ETag": "\u00220x8D99B126DFEF929\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:29:30 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "ee96c10a-69a7-da9a-cae0-4920f721c648", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-10-29T19:29:30.6778921Z", + "x-ms-file-creation-time": "2021-10-29T19:29:30.6778921Z", + "x-ms-file-id": "13835128424026341376", + "x-ms-file-last-write-time": "2021-10-29T19:29:30.6778921Z", + "x-ms-file-parent-id": "0", + "x-ms-file-permission-key": "15110104144358886944*6706197617703823457", + "x-ms-request-id": "e116b1e1-c01a-0001-6dfb-cc0599000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-0f99c75b-30ab-9fdf-1098-3f0982ff11d7/test-directory-2433f19c-5e38-3aa2-f665-044d9b1e27f8?restype=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-6f9946cb116c2a499424d09a60ec1a70-65b510885286c647-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "aa8f9776-bf47-ab8c-1f5c-f742654d3eac", + "x-ms-date": "Fri, 29 Oct 2021 19:29:29 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:29:29 GMT", + "ETag": "\u00220x8D99B126E0B071A\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:29:30 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "aa8f9776-bf47-ab8c-1f5c-f742654d3eac", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-10-29T19:29:30.7568922Z", + "x-ms-file-creation-time": "2021-10-29T19:29:30.7568922Z", + "x-ms-file-id": "11529285414812647424", + "x-ms-file-last-write-time": "2021-10-29T19:29:30.7568922Z", + "x-ms-file-parent-id": "0", + "x-ms-file-permission-key": "15110104144358886944*6706197617703823457", + "x-ms-request-id": "e116b1e2-c01a-0001-6efb-cc0599000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-0f99c75b-30ab-9fdf-1098-3f0982ff11d7/test-directory-2433f19c-5e38-3aa2-f665-044d9b1e27f8/test-file-5c8d50b9-1758-0e24-8cf9-a55fbb272fd8", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-c2e46f971826d54285f6076844b3f08f-f4dd541a9b786740-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "bac1f699-a390-5f0b-7280-1d4e192cf0f8", + "x-ms-content-length": "1024", + "x-ms-date": "Fri, 29 Oct 2021 19:29:30 GMT", + "x-ms-file-attributes": "ReadOnly", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-type": "file", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:29:30 GMT", + "ETag": "\u00220x8D99B126E1678E9\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:29:30 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "bac1f699-a390-5f0b-7280-1d4e192cf0f8", + "x-ms-file-attributes": "ReadOnly | Archive", + "x-ms-file-change-time": "2021-10-29T19:29:30.8318953Z", + "x-ms-file-creation-time": "2021-10-29T19:29:30.8318953Z", + "x-ms-file-id": "16140971433240035328", + "x-ms-file-last-write-time": "2021-10-29T19:29:30.8318953Z", + "x-ms-file-parent-id": "11529285414812647424", + "x-ms-file-permission-key": "13773932323712163591*6706197617703823457", + "x-ms-request-id": "e116b1e3-c01a-0001-6ffb-cc0599000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-0f99c75b-30ab-9fdf-1098-3f0982ff11d7/test-directory-2433f19c-5e38-3aa2-f665-044d9b1e27f8/test-file-5c8d50b9-1758-0e24-8cf9-a55fbb272fd8?restype=directory\u0026comp=rename", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-4edf64968e50434e84d39a650411990c-df470bd6596aa146-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "c5c67323-7465-c147-9377-920e5f61bbe1", + "x-ms-date": "Fri, 29 Oct 2021 19:29:30 GMT", + "x-ms-file-attributes": "Directory", + "x-ms-file-rename-ignore-read-only": "false", + "x-ms-file-rename-replace-if-exists": "true", + "x-ms-file-rename-source": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-0f99c75b-30ab-9fdf-1098-3f0982ff11d7/test-directory-8a5c358e-7b8a-c349-7377-5fd371ba7b0c", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 409, + "ResponseHeaders": { + "Content-Length": "258", + "Content-Type": "application/xml", + "Date": "Fri, 29 Oct 2021 19:29:30 GMT", + "x-ms-client-request-id": "c5c67323-7465-c147-9377-920e5f61bbe1", + "x-ms-error-code": "ReadOnlyAttribute", + "x-ms-request-id": "e116b1e4-c01a-0001-70fb-cc0599000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [ + "\uFEFF\u003C?xml version=\u00221.0\u0022 encoding=\u0022utf-8\u0022?\u003E\u003CError\u003E\u003CCode\u003EReadOnlyAttribute\u003C/Code\u003E\u003CMessage\u003EThe specified resource is read-only and cannot be modified at this time.\n", + "RequestId:e116b1e4-c01a-0001-70fb-cc0599000000\n", + "Time:2021-10-29T19:29:30.9029721Z\u003C/Message\u003E\u003C/Error\u003E" + ] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-0f99c75b-30ab-9fdf-1098-3f0982ff11d7?restype=share", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-16dc3c3647d8de4da6ec4f87f878a8d0-e58656a76c7f6540-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "a52ab307-2a66-b892-d71b-31fea70fdb3e", + "x-ms-date": "Fri, 29 Oct 2021 19:29:30 GMT", + "x-ms-delete-snapshots": "include", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:29:30 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "a52ab307-2a66-b892-d71b-31fea70fdb3e", + "x-ms-request-id": "e116b1e5-c01a-0001-71fb-cc0599000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + } + ], + "Variables": { + "RandomSeed": "1584112168", + "Storage_TestConfigDefault": "ProductionTenant\n712xscnapby3pev55a\nU2FuaXRpemVk\nhttps://712xscnapby3pev55a.blob.preprod.core.windows.net\nhttps://712xscnapby3pev55a.file.preprod.core.windows.net\nhttps://712xscnapby3pev55a.queue.core.windows.net\nhttps://712xscnapby3pev55a.table.core.windows.net\n\n\n\n\nhttps://712xscnapby3pev55a-secondary.blob.core.windows.net\nhttps://712xscnapby3pev55a-secondary.file.core.windows.net\nhttps://712xscnapby3pev55a-secondary.queue.core.windows.net\nhttps://712xscnapby3pev55a-secondary.table.core.windows.net\n\nSanitized\n\n\nCloud\nBlobEndpoint=https://712xscnapby3pev55a.blob.preprod.core.windows.net/;QueueEndpoint=https://712xscnapby3pev55a.queue.core.windows.net/;FileEndpoint=https://712xscnapby3pev55a.file.preprod.core.windows.net/;BlobSecondaryEndpoint=https://712xscnapby3pev55a-secondary.blob.core.windows.net/;QueueSecondaryEndpoint=https://712xscnapby3pev55a-secondary.queue.core.windows.net/;FileSecondaryEndpoint=https://712xscnapby3pev55a-secondary.file.core.windows.net/;AccountName=712xscnapby3pev55a;AccountKey=Kg==;\nscope-1\n\n" + } +} \ No newline at end of file diff --git a/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_NonAsciiSourceAndDestination.json b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_NonAsciiSourceAndDestination.json new file mode 100644 index 000000000000..2a08a3e432de --- /dev/null +++ b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_NonAsciiSourceAndDestination.json @@ -0,0 +1,180 @@ +{ + "Entries": [ + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-1b39e83f-4dc3-9f5a-bd6a-bd5c8f052f2b?restype=share", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-58ecb4bf5b69c74289fa1f91b955411f-a4939eb520a1f54b-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "3f6309b0-6de5-6e71-7aa5-228937ddc52d", + "x-ms-date": "Fri, 29 Oct 2021 19:40:16 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:16 GMT", + "ETag": "\u00220x8D99B13EF78A5BA\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:17 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "3f6309b0-6de5-6e71-7aa5-228937ddc52d", + "x-ms-request-id": "d8bf6420-901a-0009-57fc-cc22b6000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-1b39e83f-4dc3-9f5a-bd6a-bd5c8f052f2b/test-dire%C2%A2t%20%C3%98%C2%AE%CF%92%253A-a5a38390-f7ad-d898-4e33-9c43040de19f?restype=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-3c62ab25e81a1247be6f0c6cb77276b5-bea3d3ec5b9af441-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "39bc1cba-b179-b896-718a-f0b2d12d6a6d", + "x-ms-date": "Fri, 29 Oct 2021 19:40:16 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:16 GMT", + "ETag": "\u00220x8D99B13EF883D66\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:17 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "39bc1cba-b179-b896-718a-f0b2d12d6a6d", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-10-29T19:40:17.5002982Z", + "x-ms-file-creation-time": "2021-10-29T19:40:17.5002982Z", + "x-ms-file-id": "13835128424026341376", + "x-ms-file-last-write-time": "2021-10-29T19:40:17.5002982Z", + "x-ms-file-parent-id": "0", + "x-ms-file-permission-key": "15110104144358886944*6706197617703823457", + "x-ms-request-id": "d8bf6422-901a-0009-58fc-cc22b6000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-1b39e83f-4dc3-9f5a-bd6a-bd5c8f052f2b/test-dire%C2%A2t%20%C3%98%C2%AE%CF%92%253A-be7583c3-3f31-a08a-3d74-2e29f0d7943e?restype=directory\u0026comp=rename", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-d7c56b1383754345a1d01610c2d38702-826ec8d3c876e947-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "c0fd9918-0f9a-7b6f-911c-fb05826cc799", + "x-ms-date": "Fri, 29 Oct 2021 19:40:16 GMT", + "x-ms-file-rename-source": "https%3A%2F%2F712xscnapby3pev55a.file.preprod.core.windows.net%2Ftest-share-1b39e83f-4dc3-9f5a-bd6a-bd5c8f052f2b%2Ftest-dire%C2%A2t\u002B%C3%98%C2%AE%CF%92%253A-a5a38390-f7ad-d898-4e33-9c43040de19f=", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:16 GMT", + "ETag": "\u00220x8D99B13EF9B776F\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:17 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "c0fd9918-0f9a-7b6f-911c-fb05826cc799", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-10-29T19:40:17.6263023Z", + "x-ms-file-creation-time": "2021-10-29T19:40:17.5002982Z", + "x-ms-file-id": "13835128424026341376", + "x-ms-file-last-write-time": "2021-10-29T19:40:17.5002982Z", + "x-ms-file-parent-id": "0", + "x-ms-file-permission-key": "15110104144358886944*6706197617703823457", + "x-ms-request-id": "d8bf6423-901a-0009-59fc-cc22b6000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-1b39e83f-4dc3-9f5a-bd6a-bd5c8f052f2b/test-dire%C2%A2t%20%C3%98%C2%AE%CF%92%253A-be7583c3-3f31-a08a-3d74-2e29f0d7943e?restype=directory", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "5710e516-d4da-54a3-8d0e-5634ac20e075", + "x-ms-date": "Fri, 29 Oct 2021 19:40:16 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:16 GMT", + "ETag": "\u00220x8D99B13EF9B776F\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:17 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "5710e516-d4da-54a3-8d0e-5634ac20e075", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-10-29T19:40:17.6263023Z", + "x-ms-file-creation-time": "2021-10-29T19:40:17.5002982Z", + "x-ms-file-id": "13835128424026341376", + "x-ms-file-last-write-time": "2021-10-29T19:40:17.5002982Z", + "x-ms-file-parent-id": "0", + "x-ms-file-permission-key": "15110104144358886944*6706197617703823457", + "x-ms-request-id": "d8bf6424-901a-0009-5afc-cc22b6000000", + "x-ms-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-1b39e83f-4dc3-9f5a-bd6a-bd5c8f052f2b?restype=share", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-629f8fa321f0e34ea2805b7347b79b92-a819b50a511f0e4d-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "9dee517a-705b-21bf-0ef8-47962ce86f3d", + "x-ms-date": "Fri, 29 Oct 2021 19:40:16 GMT", + "x-ms-delete-snapshots": "include", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:17 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "9dee517a-705b-21bf-0ef8-47962ce86f3d", + "x-ms-request-id": "d8bf6425-901a-0009-5bfc-cc22b6000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + } + ], + "Variables": { + "RandomSeed": "1523102085", + "Storage_TestConfigDefault": "ProductionTenant\n712xscnapby3pev55a\nU2FuaXRpemVk\nhttps://712xscnapby3pev55a.blob.preprod.core.windows.net\nhttps://712xscnapby3pev55a.file.preprod.core.windows.net\nhttps://712xscnapby3pev55a.queue.core.windows.net\nhttps://712xscnapby3pev55a.table.core.windows.net\n\n\n\n\nhttps://712xscnapby3pev55a-secondary.blob.core.windows.net\nhttps://712xscnapby3pev55a-secondary.file.core.windows.net\nhttps://712xscnapby3pev55a-secondary.queue.core.windows.net\nhttps://712xscnapby3pev55a-secondary.table.core.windows.net\n\nSanitized\n\n\nCloud\nBlobEndpoint=https://712xscnapby3pev55a.blob.preprod.core.windows.net/;QueueEndpoint=https://712xscnapby3pev55a.queue.core.windows.net/;FileEndpoint=https://712xscnapby3pev55a.file.preprod.core.windows.net/;BlobSecondaryEndpoint=https://712xscnapby3pev55a-secondary.blob.core.windows.net/;QueueSecondaryEndpoint=https://712xscnapby3pev55a-secondary.queue.core.windows.net/;FileSecondaryEndpoint=https://712xscnapby3pev55a-secondary.file.core.windows.net/;AccountName=712xscnapby3pev55a;AccountKey=Kg==;\nscope-1\n\n" + } +} \ No newline at end of file diff --git a/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_NonAsciiSourceAndDestinationAsync.json b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_NonAsciiSourceAndDestinationAsync.json new file mode 100644 index 000000000000..8daea36e7d06 --- /dev/null +++ b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_NonAsciiSourceAndDestinationAsync.json @@ -0,0 +1,180 @@ +{ + "Entries": [ + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-7955759f-8d95-e642-b282-337ca88cfc49?restype=share", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-6f0be46bf6f1a841b2e70d5e95fd2e40-1c9fa35c97c3be4a-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "828d9dcd-7f89-7917-5c67-3ec5f529d6e8", + "x-ms-date": "Fri, 29 Oct 2021 19:40:20 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:20 GMT", + "ETag": "\u00220x8D99B13F1998B13\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:20 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "828d9dcd-7f89-7917-5c67-3ec5f529d6e8", + "x-ms-request-id": "d8bf6463-901a-0009-04fc-cc22b6000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-7955759f-8d95-e642-b282-337ca88cfc49/test-dire%C2%A2t%20%C3%98%C2%AE%CF%92%253A-627aa979-3e85-eead-f411-a3d4363418fa?restype=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-86ae4a1fffc27742bcf0cbb1a2399a54-ce2ee4ced93f884f-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "24956eea-053c-8e03-ef9e-8d77db434327", + "x-ms-date": "Fri, 29 Oct 2021 19:40:20 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:20 GMT", + "ETag": "\u00220x8D99B13F1AA820A\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:21 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "24956eea-053c-8e03-ef9e-8d77db434327", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-10-29T19:40:21.0803210Z", + "x-ms-file-creation-time": "2021-10-29T19:40:21.0803210Z", + "x-ms-file-id": "13835128424026341376", + "x-ms-file-last-write-time": "2021-10-29T19:40:21.0803210Z", + "x-ms-file-parent-id": "0", + "x-ms-file-permission-key": "15110104144358886944*6706197617703823457", + "x-ms-request-id": "d8bf6466-901a-0009-05fc-cc22b6000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-7955759f-8d95-e642-b282-337ca88cfc49/test-dire%C2%A2t%20%C3%98%C2%AE%CF%92%253A-4baa444e-cb7a-ffe9-e9f3-5c0338857c3a?restype=directory\u0026comp=rename", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-8d857af36853524c8cebd7c03cc7f27e-c03a16fbd52dcd41-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "2dd9de3e-020f-1e31-8595-3b49a800566a", + "x-ms-date": "Fri, 29 Oct 2021 19:40:20 GMT", + "x-ms-file-rename-source": "https%3A%2F%2F712xscnapby3pev55a.file.preprod.core.windows.net%2Ftest-share-7955759f-8d95-e642-b282-337ca88cfc49%2Ftest-dire%C2%A2t\u002B%C3%98%C2%AE%CF%92%253A-627aa979-3e85-eead-f411-a3d4363418fa=", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:20 GMT", + "ETag": "\u00220x8D99B13F1B5096D\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:21 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "2dd9de3e-020f-1e31-8595-3b49a800566a", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-10-29T19:40:21.1493229Z", + "x-ms-file-creation-time": "2021-10-29T19:40:21.0803210Z", + "x-ms-file-id": "13835128424026341376", + "x-ms-file-last-write-time": "2021-10-29T19:40:21.0803210Z", + "x-ms-file-parent-id": "0", + "x-ms-file-permission-key": "15110104144358886944*6706197617703823457", + "x-ms-request-id": "d8bf6467-901a-0009-06fc-cc22b6000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-7955759f-8d95-e642-b282-337ca88cfc49/test-dire%C2%A2t%20%C3%98%C2%AE%CF%92%253A-4baa444e-cb7a-ffe9-e9f3-5c0338857c3a?restype=directory", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "59c49948-4fab-c12a-c6cb-4109b9746ca5", + "x-ms-date": "Fri, 29 Oct 2021 19:40:20 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:20 GMT", + "ETag": "\u00220x8D99B13F1B5096D\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:21 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "59c49948-4fab-c12a-c6cb-4109b9746ca5", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-10-29T19:40:21.1493229Z", + "x-ms-file-creation-time": "2021-10-29T19:40:21.0803210Z", + "x-ms-file-id": "13835128424026341376", + "x-ms-file-last-write-time": "2021-10-29T19:40:21.0803210Z", + "x-ms-file-parent-id": "0", + "x-ms-file-permission-key": "15110104144358886944*6706197617703823457", + "x-ms-request-id": "d8bf6468-901a-0009-07fc-cc22b6000000", + "x-ms-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-7955759f-8d95-e642-b282-337ca88cfc49?restype=share", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-27b8024c457e704f989322690ac8f501-4a9584d81b287646-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "0e009a83-fc3c-d2bf-29f2-1c8e3a7ea011", + "x-ms-date": "Fri, 29 Oct 2021 19:40:20 GMT", + "x-ms-delete-snapshots": "include", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:20 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "0e009a83-fc3c-d2bf-29f2-1c8e3a7ea011", + "x-ms-request-id": "d8bf6469-901a-0009-08fc-cc22b6000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + } + ], + "Variables": { + "RandomSeed": "455368573", + "Storage_TestConfigDefault": "ProductionTenant\n712xscnapby3pev55a\nU2FuaXRpemVk\nhttps://712xscnapby3pev55a.blob.preprod.core.windows.net\nhttps://712xscnapby3pev55a.file.preprod.core.windows.net\nhttps://712xscnapby3pev55a.queue.core.windows.net\nhttps://712xscnapby3pev55a.table.core.windows.net\n\n\n\n\nhttps://712xscnapby3pev55a-secondary.blob.core.windows.net\nhttps://712xscnapby3pev55a-secondary.file.core.windows.net\nhttps://712xscnapby3pev55a-secondary.queue.core.windows.net\nhttps://712xscnapby3pev55a-secondary.table.core.windows.net\n\nSanitized\n\n\nCloud\nBlobEndpoint=https://712xscnapby3pev55a.blob.preprod.core.windows.net/;QueueEndpoint=https://712xscnapby3pev55a.queue.core.windows.net/;FileEndpoint=https://712xscnapby3pev55a.file.preprod.core.windows.net/;BlobSecondaryEndpoint=https://712xscnapby3pev55a-secondary.blob.core.windows.net/;QueueSecondaryEndpoint=https://712xscnapby3pev55a-secondary.queue.core.windows.net/;FileSecondaryEndpoint=https://712xscnapby3pev55a-secondary.file.core.windows.net/;AccountName=712xscnapby3pev55a;AccountKey=Kg==;\nscope-1\n\n" + } +} \ No newline at end of file diff --git a/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_ReplaceIfExists(False).json b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_ReplaceIfExists(False).json new file mode 100644 index 000000000000..b060870d25ab --- /dev/null +++ b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_ReplaceIfExists(False).json @@ -0,0 +1,225 @@ +{ + "Entries": [ + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-a9e8dfb8-2391-c950-73ec-554430407113?restype=share", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-bb4813c5f09d744ebba574e296a18527-02bc46f7ec897c45-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "d7f1b3f6-6be7-cb0f-3b06-dca3eee0a1bb", + "x-ms-date": "Fri, 29 Oct 2021 19:40:14 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:14 GMT", + "ETag": "\u00220x8D99B13EE6846D8\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:15 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "d7f1b3f6-6be7-cb0f-3b06-dca3eee0a1bb", + "x-ms-request-id": "d8bf6408-901a-0009-44fc-cc22b6000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-a9e8dfb8-2391-c950-73ec-554430407113/test-directory-a9587c54-e157-8f7e-3aab-a20c9fa01ebd?restype=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-24b3f44e90f2aa478d3f08fce3072fa5-9ad659144c33e34f-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "2e5ac7e2-925d-141a-3561-9c3cc9022b9b", + "x-ms-date": "Fri, 29 Oct 2021 19:40:14 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:15 GMT", + "ETag": "\u00220x8D99B13EE7A75D0\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:15 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "2e5ac7e2-925d-141a-3561-9c3cc9022b9b", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-10-29T19:40:15.7322704Z", + "x-ms-file-creation-time": "2021-10-29T19:40:15.7322704Z", + "x-ms-file-id": "13835128424026341376", + "x-ms-file-last-write-time": "2021-10-29T19:40:15.7322704Z", + "x-ms-file-parent-id": "0", + "x-ms-file-permission-key": "15110104144358886944*6706197617703823457", + "x-ms-request-id": "d8bf640b-901a-0009-46fc-cc22b6000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-a9e8dfb8-2391-c950-73ec-554430407113/test-directory-0bf31ee8-2492-ba6d-50e6-e22097a2433a?restype=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-54d0a7459c817443a6699bcadf64ccc8-bb9fc3deaf953a45-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "2df4af0a-420d-be94-5a9f-de77b0f97d92", + "x-ms-date": "Fri, 29 Oct 2021 19:40:15 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:15 GMT", + "ETag": "\u00220x8D99B13EE90BCE5\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:15 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "2df4af0a-420d-be94-5a9f-de77b0f97d92", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-10-29T19:40:15.8782693Z", + "x-ms-file-creation-time": "2021-10-29T19:40:15.8782693Z", + "x-ms-file-id": "11529285414812647424", + "x-ms-file-last-write-time": "2021-10-29T19:40:15.8782693Z", + "x-ms-file-parent-id": "0", + "x-ms-file-permission-key": "15110104144358886944*6706197617703823457", + "x-ms-request-id": "d8bf640c-901a-0009-47fc-cc22b6000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-a9e8dfb8-2391-c950-73ec-554430407113/test-directory-0bf31ee8-2492-ba6d-50e6-e22097a2433a/test-file-4ede621e-53d8-f855-bfd5-4257dc80bd61", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-62c6774e9dc97349a80d48dc29dccf0b-d5c2b7eca902f64d-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "9bceb5bd-5910-b6ec-59fb-6e38003de1da", + "x-ms-content-length": "1024", + "x-ms-date": "Fri, 29 Oct 2021 19:40:15 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-type": "file", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:15 GMT", + "ETag": "\u00220x8D99B13EEA44517\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:16 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "9bceb5bd-5910-b6ec-59fb-6e38003de1da", + "x-ms-file-attributes": "Archive", + "x-ms-file-change-time": "2021-10-29T19:40:16.0062743Z", + "x-ms-file-creation-time": "2021-10-29T19:40:16.0062743Z", + "x-ms-file-id": "16140971433240035328", + "x-ms-file-last-write-time": "2021-10-29T19:40:16.0062743Z", + "x-ms-file-parent-id": "11529285414812647424", + "x-ms-file-permission-key": "13773932323712163591*6706197617703823457", + "x-ms-request-id": "d8bf640e-901a-0009-48fc-cc22b6000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-a9e8dfb8-2391-c950-73ec-554430407113/test-directory-0bf31ee8-2492-ba6d-50e6-e22097a2433a/test-file-4ede621e-53d8-f855-bfd5-4257dc80bd61?restype=directory\u0026comp=rename", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-de649f6294c023468fd0a06b6e8740ab-bf42652e0f6bca45-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "269a7467-22b2-e550-3160-8db2a6f41aa9", + "x-ms-date": "Fri, 29 Oct 2021 19:40:15 GMT", + "x-ms-file-rename-replace-if-exists": "false", + "x-ms-file-rename-source": "https%3A%2F%2F712xscnapby3pev55a.file.preprod.core.windows.net%2Ftest-share-a9e8dfb8-2391-c950-73ec-554430407113%2Ftest-directory-a9587c54-e157-8f7e-3aab-a20c9fa01ebd=", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 409, + "ResponseHeaders": { + "Content-Length": "228", + "Content-Type": "application/xml", + "Date": "Fri, 29 Oct 2021 19:40:15 GMT", + "x-ms-client-request-id": "269a7467-22b2-e550-3160-8db2a6f41aa9", + "x-ms-error-code": "ResourceAlreadyExists", + "x-ms-request-id": "d8bf6410-901a-0009-49fc-cc22b6000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [ + "\uFEFF\u003C?xml version=\u00221.0\u0022 encoding=\u0022utf-8\u0022?\u003E\u003CError\u003E\u003CCode\u003EResourceAlreadyExists\u003C/Code\u003E\u003CMessage\u003EThe specified resource already exists.\n", + "RequestId:d8bf6410-901a-0009-49fc-cc22b6000000\n", + "Time:2021-10-29T19:40:16.0921107Z\u003C/Message\u003E\u003C/Error\u003E" + ] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-a9e8dfb8-2391-c950-73ec-554430407113?restype=share", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-85b42a38fd35cc4581382ef6de3585b0-2082ee181fcbaa46-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "8bd09815-bba2-c028-2b52-618207326341", + "x-ms-date": "Fri, 29 Oct 2021 19:40:15 GMT", + "x-ms-delete-snapshots": "include", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:15 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "8bd09815-bba2-c028-2b52-618207326341", + "x-ms-request-id": "d8bf6411-901a-0009-4afc-cc22b6000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + } + ], + "Variables": { + "RandomSeed": "1018945972", + "Storage_TestConfigDefault": "ProductionTenant\n712xscnapby3pev55a\nU2FuaXRpemVk\nhttps://712xscnapby3pev55a.blob.preprod.core.windows.net\nhttps://712xscnapby3pev55a.file.preprod.core.windows.net\nhttps://712xscnapby3pev55a.queue.core.windows.net\nhttps://712xscnapby3pev55a.table.core.windows.net\n\n\n\n\nhttps://712xscnapby3pev55a-secondary.blob.core.windows.net\nhttps://712xscnapby3pev55a-secondary.file.core.windows.net\nhttps://712xscnapby3pev55a-secondary.queue.core.windows.net\nhttps://712xscnapby3pev55a-secondary.table.core.windows.net\n\nSanitized\n\n\nCloud\nBlobEndpoint=https://712xscnapby3pev55a.blob.preprod.core.windows.net/;QueueEndpoint=https://712xscnapby3pev55a.queue.core.windows.net/;FileEndpoint=https://712xscnapby3pev55a.file.preprod.core.windows.net/;BlobSecondaryEndpoint=https://712xscnapby3pev55a-secondary.blob.core.windows.net/;QueueSecondaryEndpoint=https://712xscnapby3pev55a-secondary.queue.core.windows.net/;FileSecondaryEndpoint=https://712xscnapby3pev55a-secondary.file.core.windows.net/;AccountName=712xscnapby3pev55a;AccountKey=Kg==;\nscope-1\n\n" + } +} \ No newline at end of file diff --git a/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_ReplaceIfExists(False)Async.json b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_ReplaceIfExists(False)Async.json new file mode 100644 index 000000000000..5706c340bb3d --- /dev/null +++ b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_ReplaceIfExists(False)Async.json @@ -0,0 +1,225 @@ +{ + "Entries": [ + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-75acad27-e52c-3fbe-4105-21a6b68649a5?restype=share", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-83a15db15b82ba4297e1c8639892f4d5-197157221a954a48-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "b7b0afa2-2bcf-c28e-056e-5af58cdf349a", + "x-ms-date": "Fri, 29 Oct 2021 19:40:18 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:18 GMT", + "ETag": "\u00220x8D99B13F0C746AA\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:19 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "b7b0afa2-2bcf-c28e-056e-5af58cdf349a", + "x-ms-request-id": "d8bf6441-901a-0009-72fc-cc22b6000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-75acad27-e52c-3fbe-4105-21a6b68649a5/test-directory-c0ab9d3d-0601-6ad0-8124-cd8811e307ce?restype=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-1b15e21b0c47ba49b641bf5dcd0d07f2-019b300a899b1245-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "9b9d396e-a1c7-9c5e-de45-35aa5d05b121", + "x-ms-date": "Fri, 29 Oct 2021 19:40:18 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:18 GMT", + "ETag": "\u00220x8D99B13F0D641CE\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:19 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "9b9d396e-a1c7-9c5e-de45-35aa5d05b121", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-10-29T19:40:19.6893134Z", + "x-ms-file-creation-time": "2021-10-29T19:40:19.6893134Z", + "x-ms-file-id": "13835128424026341376", + "x-ms-file-last-write-time": "2021-10-29T19:40:19.6893134Z", + "x-ms-file-parent-id": "0", + "x-ms-file-permission-key": "15110104144358886944*6706197617703823457", + "x-ms-request-id": "d8bf6443-901a-0009-73fc-cc22b6000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-75acad27-e52c-3fbe-4105-21a6b68649a5/test-directory-cb538b67-2ddb-abc4-c6a9-b39410fc084b?restype=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-5966b5c7e8c0044987ae9b06fefa84f0-28800abbf6181041-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "d76cd4bb-2fe3-41ec-75f2-d51eeeca8ce2", + "x-ms-date": "Fri, 29 Oct 2021 19:40:18 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:18 GMT", + "ETag": "\u00220x8D99B13F0E0C8FB\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:19 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "d76cd4bb-2fe3-41ec-75f2-d51eeeca8ce2", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-10-29T19:40:19.7583099Z", + "x-ms-file-creation-time": "2021-10-29T19:40:19.7583099Z", + "x-ms-file-id": "11529285414812647424", + "x-ms-file-last-write-time": "2021-10-29T19:40:19.7583099Z", + "x-ms-file-parent-id": "0", + "x-ms-file-permission-key": "15110104144358886944*6706197617703823457", + "x-ms-request-id": "d8bf6445-901a-0009-74fc-cc22b6000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-75acad27-e52c-3fbe-4105-21a6b68649a5/test-directory-cb538b67-2ddb-abc4-c6a9-b39410fc084b/test-file-577fea3d-daea-fbdb-8452-697204344f99", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-498799e20f701544a08fcc9be0f56622-85465ceda2b8444e-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "715246dc-4dac-e11d-f970-5391c5793c40", + "x-ms-content-length": "1024", + "x-ms-date": "Fri, 29 Oct 2021 19:40:19 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-type": "file", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:19 GMT", + "ETag": "\u00220x8D99B13F0ECAFD5\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:19 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "715246dc-4dac-e11d-f970-5391c5793c40", + "x-ms-file-attributes": "Archive", + "x-ms-file-change-time": "2021-10-29T19:40:19.8363093Z", + "x-ms-file-creation-time": "2021-10-29T19:40:19.8363093Z", + "x-ms-file-id": "16140971433240035328", + "x-ms-file-last-write-time": "2021-10-29T19:40:19.8363093Z", + "x-ms-file-parent-id": "11529285414812647424", + "x-ms-file-permission-key": "13773932323712163591*6706197617703823457", + "x-ms-request-id": "d8bf6446-901a-0009-75fc-cc22b6000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-75acad27-e52c-3fbe-4105-21a6b68649a5/test-directory-cb538b67-2ddb-abc4-c6a9-b39410fc084b/test-file-577fea3d-daea-fbdb-8452-697204344f99?restype=directory\u0026comp=rename", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-4d6474fe95fe5b46a865e4a49e5984f2-86be76b949baaf4e-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "be96d140-dde1-b6ec-8df6-4120ddd6359f", + "x-ms-date": "Fri, 29 Oct 2021 19:40:19 GMT", + "x-ms-file-rename-replace-if-exists": "false", + "x-ms-file-rename-source": "https%3A%2F%2F712xscnapby3pev55a.file.preprod.core.windows.net%2Ftest-share-75acad27-e52c-3fbe-4105-21a6b68649a5%2Ftest-directory-c0ab9d3d-0601-6ad0-8124-cd8811e307ce=", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 409, + "ResponseHeaders": { + "Content-Length": "228", + "Content-Type": "application/xml", + "Date": "Fri, 29 Oct 2021 19:40:19 GMT", + "x-ms-client-request-id": "be96d140-dde1-b6ec-8df6-4120ddd6359f", + "x-ms-error-code": "ResourceAlreadyExists", + "x-ms-request-id": "d8bf6447-901a-0009-76fc-cc22b6000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [ + "\uFEFF\u003C?xml version=\u00221.0\u0022 encoding=\u0022utf-8\u0022?\u003E\u003CError\u003E\u003CCode\u003EResourceAlreadyExists\u003C/Code\u003E\u003CMessage\u003EThe specified resource already exists.\n", + "RequestId:d8bf6447-901a-0009-76fc-cc22b6000000\n", + "Time:2021-10-29T19:40:19.9051256Z\u003C/Message\u003E\u003C/Error\u003E" + ] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-75acad27-e52c-3fbe-4105-21a6b68649a5?restype=share", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-b353494880af9140bf025503eabcd9d6-570e15f962bfd345-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "f351b80b-7ee2-c45f-4f63-b5fa0f312fab", + "x-ms-date": "Fri, 29 Oct 2021 19:40:19 GMT", + "x-ms-delete-snapshots": "include", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:19 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "f351b80b-7ee2-c45f-4f63-b5fa0f312fab", + "x-ms-request-id": "d8bf6448-901a-0009-77fc-cc22b6000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + } + ], + "Variables": { + "RandomSeed": "2133902263", + "Storage_TestConfigDefault": "ProductionTenant\n712xscnapby3pev55a\nU2FuaXRpemVk\nhttps://712xscnapby3pev55a.blob.preprod.core.windows.net\nhttps://712xscnapby3pev55a.file.preprod.core.windows.net\nhttps://712xscnapby3pev55a.queue.core.windows.net\nhttps://712xscnapby3pev55a.table.core.windows.net\n\n\n\n\nhttps://712xscnapby3pev55a-secondary.blob.core.windows.net\nhttps://712xscnapby3pev55a-secondary.file.core.windows.net\nhttps://712xscnapby3pev55a-secondary.queue.core.windows.net\nhttps://712xscnapby3pev55a-secondary.table.core.windows.net\n\nSanitized\n\n\nCloud\nBlobEndpoint=https://712xscnapby3pev55a.blob.preprod.core.windows.net/;QueueEndpoint=https://712xscnapby3pev55a.queue.core.windows.net/;FileEndpoint=https://712xscnapby3pev55a.file.preprod.core.windows.net/;BlobSecondaryEndpoint=https://712xscnapby3pev55a-secondary.blob.core.windows.net/;QueueSecondaryEndpoint=https://712xscnapby3pev55a-secondary.queue.core.windows.net/;FileSecondaryEndpoint=https://712xscnapby3pev55a-secondary.file.core.windows.net/;AccountName=712xscnapby3pev55a;AccountKey=Kg==;\nscope-1\n\n" + } +} \ No newline at end of file diff --git a/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_ReplaceIfExists(True).json b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_ReplaceIfExists(True).json new file mode 100644 index 000000000000..51b73c45ca83 --- /dev/null +++ b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_ReplaceIfExists(True).json @@ -0,0 +1,265 @@ +{ + "Entries": [ + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-ba874772-f094-17dc-2c4c-f19e51c1a5f7?restype=share", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-48f63c1b0c7e614f9c23709bf25be79f-c65d3f642b857e40-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "6bcc0dd7-7872-7926-e555-191aa60155ac", + "x-ms-date": "Fri, 29 Oct 2021 19:40:14 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:14 GMT", + "ETag": "\u00220x8D99B13EDF49D5F\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:14 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "6bcc0dd7-7872-7926-e555-191aa60155ac", + "x-ms-request-id": "d8bf6400-901a-0009-3dfc-cc22b6000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-ba874772-f094-17dc-2c4c-f19e51c1a5f7/test-directory-797eb37b-da79-d358-95dc-926e34414249?restype=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-e4cfff0a0ec5fe49a39219e841d914f1-ace8e78c2aebcc41-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "22200fd1-ea65-fd06-b5f8-d595e6b844a4", + "x-ms-date": "Fri, 29 Oct 2021 19:40:14 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:14 GMT", + "ETag": "\u00220x8D99B13EE0323FF\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:14 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "22200fd1-ea65-fd06-b5f8-d595e6b844a4", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-10-29T19:40:14.9502975Z", + "x-ms-file-creation-time": "2021-10-29T19:40:14.9502975Z", + "x-ms-file-id": "13835128424026341376", + "x-ms-file-last-write-time": "2021-10-29T19:40:14.9502975Z", + "x-ms-file-parent-id": "0", + "x-ms-file-permission-key": "15110104144358886944*6706197617703823457", + "x-ms-request-id": "d8bf6402-901a-0009-3efc-cc22b6000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-ba874772-f094-17dc-2c4c-f19e51c1a5f7/test-directory-3531d013-123a-41b7-2de7-d50c4cb64efe?restype=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-7622221746f40b4aa01ca772c47e8096-ab4bb8cea615f741-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "b58ee828-ce65-beec-57de-f47d14f9b0fe", + "x-ms-date": "Fri, 29 Oct 2021 19:40:14 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:14 GMT", + "ETag": "\u00220x8D99B13EE0DD10E\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:15 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "b58ee828-ce65-beec-57de-f47d14f9b0fe", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-10-29T19:40:15.0202638Z", + "x-ms-file-creation-time": "2021-10-29T19:40:15.0202638Z", + "x-ms-file-id": "11529285414812647424", + "x-ms-file-last-write-time": "2021-10-29T19:40:15.0202638Z", + "x-ms-file-parent-id": "0", + "x-ms-file-permission-key": "15110104144358886944*6706197617703823457", + "x-ms-request-id": "d8bf6403-901a-0009-3ffc-cc22b6000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-ba874772-f094-17dc-2c4c-f19e51c1a5f7/test-directory-3531d013-123a-41b7-2de7-d50c4cb64efe/test-file-7bbcd7aa-1f1b-f383-ec33-c97184bbdc3d", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-296aee3fa2d80b4c922e884b73fd032f-429ea286b6c4c14f-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "8c518e18-3533-08cf-659b-c932047a3a9b", + "x-ms-content-length": "1024", + "x-ms-date": "Fri, 29 Oct 2021 19:40:14 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-type": "file", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:14 GMT", + "ETag": "\u00220x8D99B13EE2AF764\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:15 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "8c518e18-3533-08cf-659b-c932047a3a9b", + "x-ms-file-attributes": "Archive", + "x-ms-file-change-time": "2021-10-29T19:40:15.2112996Z", + "x-ms-file-creation-time": "2021-10-29T19:40:15.2112996Z", + "x-ms-file-id": "16140971433240035328", + "x-ms-file-last-write-time": "2021-10-29T19:40:15.2112996Z", + "x-ms-file-parent-id": "11529285414812647424", + "x-ms-file-permission-key": "13773932323712163591*6706197617703823457", + "x-ms-request-id": "d8bf6404-901a-0009-40fc-cc22b6000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-ba874772-f094-17dc-2c4c-f19e51c1a5f7/test-directory-3531d013-123a-41b7-2de7-d50c4cb64efe/test-file-7bbcd7aa-1f1b-f383-ec33-c97184bbdc3d?restype=directory\u0026comp=rename", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-f7abf777696e5c4c86880265cf89338e-1cd12b9882fd1c4f-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "f559574a-506a-010a-1bdb-fe8dcf650504", + "x-ms-date": "Fri, 29 Oct 2021 19:40:14 GMT", + "x-ms-file-rename-replace-if-exists": "true", + "x-ms-file-rename-source": "https%3A%2F%2F712xscnapby3pev55a.file.preprod.core.windows.net%2Ftest-share-ba874772-f094-17dc-2c4c-f19e51c1a5f7%2Ftest-directory-797eb37b-da79-d358-95dc-926e34414249=", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:14 GMT", + "ETag": "\u00220x8D99B13EE3C3593\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:15 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "f559574a-506a-010a-1bdb-fe8dcf650504", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-10-29T19:40:15.3243027Z", + "x-ms-file-creation-time": "2021-10-29T19:40:14.9502975Z", + "x-ms-file-id": "13835128424026341376", + "x-ms-file-last-write-time": "2021-10-29T19:40:14.9502975Z", + "x-ms-file-parent-id": "11529285414812647424", + "x-ms-file-permission-key": "15110104144358886944*6706197617703823457", + "x-ms-request-id": "d8bf6405-901a-0009-41fc-cc22b6000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-ba874772-f094-17dc-2c4c-f19e51c1a5f7/test-directory-3531d013-123a-41b7-2de7-d50c4cb64efe/test-file-7bbcd7aa-1f1b-f383-ec33-c97184bbdc3d?restype=directory", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "ace843d3-4421-b131-ac45-0e394d4942d9", + "x-ms-date": "Fri, 29 Oct 2021 19:40:14 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:14 GMT", + "ETag": "\u00220x8D99B13EE3C3593\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:15 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "ace843d3-4421-b131-ac45-0e394d4942d9", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-10-29T19:40:15.3243027Z", + "x-ms-file-creation-time": "2021-10-29T19:40:14.9502975Z", + "x-ms-file-id": "13835128424026341376", + "x-ms-file-last-write-time": "2021-10-29T19:40:14.9502975Z", + "x-ms-file-parent-id": "11529285414812647424", + "x-ms-file-permission-key": "15110104144358886944*6706197617703823457", + "x-ms-request-id": "d8bf6406-901a-0009-42fc-cc22b6000000", + "x-ms-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-ba874772-f094-17dc-2c4c-f19e51c1a5f7?restype=share", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-85e94cfafb23024caed95c0bca3be362-e0b9ef208a592048-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "8bb9db24-587d-5fe3-008d-c9d9b0237d6e", + "x-ms-date": "Fri, 29 Oct 2021 19:40:14 GMT", + "x-ms-delete-snapshots": "include", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:14 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "8bb9db24-587d-5fe3-008d-c9d9b0237d6e", + "x-ms-request-id": "d8bf6407-901a-0009-43fc-cc22b6000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + } + ], + "Variables": { + "RandomSeed": "752290619", + "Storage_TestConfigDefault": "ProductionTenant\n712xscnapby3pev55a\nU2FuaXRpemVk\nhttps://712xscnapby3pev55a.blob.preprod.core.windows.net\nhttps://712xscnapby3pev55a.file.preprod.core.windows.net\nhttps://712xscnapby3pev55a.queue.core.windows.net\nhttps://712xscnapby3pev55a.table.core.windows.net\n\n\n\n\nhttps://712xscnapby3pev55a-secondary.blob.core.windows.net\nhttps://712xscnapby3pev55a-secondary.file.core.windows.net\nhttps://712xscnapby3pev55a-secondary.queue.core.windows.net\nhttps://712xscnapby3pev55a-secondary.table.core.windows.net\n\nSanitized\n\n\nCloud\nBlobEndpoint=https://712xscnapby3pev55a.blob.preprod.core.windows.net/;QueueEndpoint=https://712xscnapby3pev55a.queue.core.windows.net/;FileEndpoint=https://712xscnapby3pev55a.file.preprod.core.windows.net/;BlobSecondaryEndpoint=https://712xscnapby3pev55a-secondary.blob.core.windows.net/;QueueSecondaryEndpoint=https://712xscnapby3pev55a-secondary.queue.core.windows.net/;FileSecondaryEndpoint=https://712xscnapby3pev55a-secondary.file.core.windows.net/;AccountName=712xscnapby3pev55a;AccountKey=Kg==;\nscope-1\n\n" + } +} \ No newline at end of file diff --git a/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_ReplaceIfExists(True)Async.json b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_ReplaceIfExists(True)Async.json new file mode 100644 index 000000000000..4e05297511ac --- /dev/null +++ b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_ReplaceIfExists(True)Async.json @@ -0,0 +1,265 @@ +{ + "Entries": [ + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-cb68c2ce-94a2-a648-a76d-2f21f06d58f1?restype=share", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-61ed0d527e488a4aaa8897c1d4795c2a-f9098b6d597f5d48-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "d29d8e9a-9db1-31f5-6efe-7820a8245e86", + "x-ms-date": "Fri, 29 Oct 2021 19:40:18 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:18 GMT", + "ETag": "\u00220x8D99B13F071FA97\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:19 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "d29d8e9a-9db1-31f5-6efe-7820a8245e86", + "x-ms-request-id": "d8bf6438-901a-0009-6bfc-cc22b6000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-cb68c2ce-94a2-a648-a76d-2f21f06d58f1/test-directory-68c58dd9-a54d-c6c8-c6e5-1c58bc88d281?restype=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-6e7ed777cf07ba419033eb1a53fcaf4d-52254e1ef548f542-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "46e651ec-a560-f54b-c6d6-0bcb809d75e6", + "x-ms-date": "Fri, 29 Oct 2021 19:40:18 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:18 GMT", + "ETag": "\u00220x8D99B13F0811CC7\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:19 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "46e651ec-a560-f54b-c6d6-0bcb809d75e6", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-10-29T19:40:19.1313095Z", + "x-ms-file-creation-time": "2021-10-29T19:40:19.1313095Z", + "x-ms-file-id": "13835128424026341376", + "x-ms-file-last-write-time": "2021-10-29T19:40:19.1313095Z", + "x-ms-file-parent-id": "0", + "x-ms-file-permission-key": "15110104144358886944*6706197617703823457", + "x-ms-request-id": "d8bf643a-901a-0009-6cfc-cc22b6000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-cb68c2ce-94a2-a648-a76d-2f21f06d58f1/test-directory-12c0f62c-fc9e-54b7-4c25-5800420037eb?restype=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-4c85cf25ed5214479262d810ac3415c9-d90c70940e72df44-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "999b7cd7-c81b-efec-9a92-fa3a4d4bb3c5", + "x-ms-date": "Fri, 29 Oct 2021 19:40:18 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:18 GMT", + "ETag": "\u00220x8D99B13F08BA773\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:19 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "999b7cd7-c81b-efec-9a92-fa3a4d4bb3c5", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-10-29T19:40:19.2003955Z", + "x-ms-file-creation-time": "2021-10-29T19:40:19.2003955Z", + "x-ms-file-id": "11529285414812647424", + "x-ms-file-last-write-time": "2021-10-29T19:40:19.2003955Z", + "x-ms-file-parent-id": "0", + "x-ms-file-permission-key": "15110104144358886944*6706197617703823457", + "x-ms-request-id": "d8bf643b-901a-0009-6dfc-cc22b6000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-cb68c2ce-94a2-a648-a76d-2f21f06d58f1/test-directory-12c0f62c-fc9e-54b7-4c25-5800420037eb/test-file-eec0209f-0b31-a145-d404-c70d60bedad7", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-019bca1ec1da16429440bc7b6eae2ddc-bad5482ab9d2ff46-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "5959d6dd-30b5-cc40-37fa-c41600df8edc", + "x-ms-content-length": "1024", + "x-ms-date": "Fri, 29 Oct 2021 19:40:18 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-type": "file", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:18 GMT", + "ETag": "\u00220x8D99B13F0971593\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:19 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "5959d6dd-30b5-cc40-37fa-c41600df8edc", + "x-ms-file-attributes": "Archive", + "x-ms-file-change-time": "2021-10-29T19:40:19.2753043Z", + "x-ms-file-creation-time": "2021-10-29T19:40:19.2753043Z", + "x-ms-file-id": "16140971433240035328", + "x-ms-file-last-write-time": "2021-10-29T19:40:19.2753043Z", + "x-ms-file-parent-id": "11529285414812647424", + "x-ms-file-permission-key": "13773932323712163591*6706197617703823457", + "x-ms-request-id": "d8bf643c-901a-0009-6efc-cc22b6000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-cb68c2ce-94a2-a648-a76d-2f21f06d58f1/test-directory-12c0f62c-fc9e-54b7-4c25-5800420037eb/test-file-eec0209f-0b31-a145-d404-c70d60bedad7?restype=directory\u0026comp=rename", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-146d28a25a637949b20cf3e5c6c5f44d-3e0149f1fc0e454d-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "8a30c895-8065-d522-a55c-8e6adab942c6", + "x-ms-date": "Fri, 29 Oct 2021 19:40:18 GMT", + "x-ms-file-rename-replace-if-exists": "true", + "x-ms-file-rename-source": "https%3A%2F%2F712xscnapby3pev55a.file.preprod.core.windows.net%2Ftest-share-cb68c2ce-94a2-a648-a76d-2f21f06d58f1%2Ftest-directory-68c58dd9-a54d-c6c8-c6e5-1c58bc88d281=", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:18 GMT", + "ETag": "\u00220x8D99B13F0A5962E\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:19 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "8a30c895-8065-d522-a55c-8e6adab942c6", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-10-29T19:40:19.3703470Z", + "x-ms-file-creation-time": "2021-10-29T19:40:19.1313095Z", + "x-ms-file-id": "13835128424026341376", + "x-ms-file-last-write-time": "2021-10-29T19:40:19.1313095Z", + "x-ms-file-parent-id": "11529285414812647424", + "x-ms-file-permission-key": "15110104144358886944*6706197617703823457", + "x-ms-request-id": "d8bf643d-901a-0009-6ffc-cc22b6000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-cb68c2ce-94a2-a648-a76d-2f21f06d58f1/test-directory-12c0f62c-fc9e-54b7-4c25-5800420037eb/test-file-eec0209f-0b31-a145-d404-c70d60bedad7?restype=directory", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "3780d6ea-04ae-3777-005f-c2c55ff52696", + "x-ms-date": "Fri, 29 Oct 2021 19:40:18 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:18 GMT", + "ETag": "\u00220x8D99B13F0A5962E\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:19 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "3780d6ea-04ae-3777-005f-c2c55ff52696", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-10-29T19:40:19.3703470Z", + "x-ms-file-creation-time": "2021-10-29T19:40:19.1313095Z", + "x-ms-file-id": "13835128424026341376", + "x-ms-file-last-write-time": "2021-10-29T19:40:19.1313095Z", + "x-ms-file-parent-id": "11529285414812647424", + "x-ms-file-permission-key": "15110104144358886944*6706197617703823457", + "x-ms-request-id": "d8bf643e-901a-0009-70fc-cc22b6000000", + "x-ms-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-cb68c2ce-94a2-a648-a76d-2f21f06d58f1?restype=share", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-3753a880fb14bf49bfd529855dc3362c-09dfc8cabd0c7844-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "03808dcc-0a38-e817-7b1f-6e5245168f7f", + "x-ms-date": "Fri, 29 Oct 2021 19:40:18 GMT", + "x-ms-delete-snapshots": "include", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:18 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "03808dcc-0a38-e817-7b1f-6e5245168f7f", + "x-ms-request-id": "d8bf643f-901a-0009-71fc-cc22b6000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + } + ], + "Variables": { + "RandomSeed": "435935610", + "Storage_TestConfigDefault": "ProductionTenant\n712xscnapby3pev55a\nU2FuaXRpemVk\nhttps://712xscnapby3pev55a.blob.preprod.core.windows.net\nhttps://712xscnapby3pev55a.file.preprod.core.windows.net\nhttps://712xscnapby3pev55a.queue.core.windows.net\nhttps://712xscnapby3pev55a.table.core.windows.net\n\n\n\n\nhttps://712xscnapby3pev55a-secondary.blob.core.windows.net\nhttps://712xscnapby3pev55a-secondary.file.core.windows.net\nhttps://712xscnapby3pev55a-secondary.queue.core.windows.net\nhttps://712xscnapby3pev55a-secondary.table.core.windows.net\n\nSanitized\n\n\nCloud\nBlobEndpoint=https://712xscnapby3pev55a.blob.preprod.core.windows.net/;QueueEndpoint=https://712xscnapby3pev55a.queue.core.windows.net/;FileEndpoint=https://712xscnapby3pev55a.file.preprod.core.windows.net/;BlobSecondaryEndpoint=https://712xscnapby3pev55a-secondary.blob.core.windows.net/;QueueSecondaryEndpoint=https://712xscnapby3pev55a-secondary.queue.core.windows.net/;FileSecondaryEndpoint=https://712xscnapby3pev55a-secondary.file.core.windows.net/;AccountName=712xscnapby3pev55a;AccountKey=Kg==;\nscope-1\n\n" + } +} \ No newline at end of file diff --git a/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_ShareSAS.json b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_ShareSAS.json new file mode 100644 index 000000000000..89bbdb927fa0 --- /dev/null +++ b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_ShareSAS.json @@ -0,0 +1,177 @@ +{ + "Entries": [ + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-8dddf32c-88a3-169f-1c80-90f58289c3c4?restype=share", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-1f3e7836a18edf4aaf74e42875963f2e-eede1fc01c6ceb49-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "9f269070-ab2e-a2ec-50cd-12fc7d335b30", + "x-ms-date": "Fri, 29 Oct 2021 19:39:34 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:39:35 GMT", + "ETag": "\u00220x8D99B13D672E05D\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:39:35 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "9f269070-ab2e-a2ec-50cd-12fc7d335b30", + "x-ms-request-id": "e116b585-c01a-0001-4cfc-cc0599000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-8dddf32c-88a3-169f-1c80-90f58289c3c4/test-directory-a80ace3a-3a68-a1b4-03ed-5b86e8dc2e70?restype=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-c9dc34e9b41e924fa770f424108bfb02-cd9efe49d6e05948-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "1a886fc2-b6a1-36a1-db84-9c415066b974", + "x-ms-date": "Fri, 29 Oct 2021 19:39:34 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:39:35 GMT", + "ETag": "\u00220x8D99B13D68F3337\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:39:35 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "1a886fc2-b6a1-36a1-db84-9c415066b974", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-10-29T19:39:35.6028727Z", + "x-ms-file-creation-time": "2021-10-29T19:39:35.6028727Z", + "x-ms-file-id": "13835128424026341376", + "x-ms-file-last-write-time": "2021-10-29T19:39:35.6028727Z", + "x-ms-file-parent-id": "0", + "x-ms-file-permission-key": "15110104144358886944*6706197617703823457", + "x-ms-request-id": "e116b588-c01a-0001-4dfc-cc0599000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-8dddf32c-88a3-169f-1c80-90f58289c3c4/test-directory-f6daa29f-68ae-16cd-38a3-fb044003290f?sv=2021-04-10\u0026se=2021-10-30T19%3A39%3A34Z\u0026sr=s\u0026sp=rcwdl\u0026sig=Sanitized\u0026restype=directory\u0026comp=rename", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "traceparent": "00-36d7adb54f35fb4abaad610179c4fd71-84da685a8b469047-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "d51185ab-7c19-5950-a172-e2febb9df5d8", + "x-ms-file-rename-source": "https%3A%2F%2F712xscnapby3pev55a.file.preprod.core.windows.net%2Ftest-share-8dddf32c-88a3-169f-1c80-90f58289c3c4%2Ftest-directory-a80ace3a-3a68-a1b4-03ed-5b86e8dc2e70%3Fsv=2021-04-10\u0026se=2021-10-30T19%3A39%3A34Z\u0026sr=s\u0026sp=rcwdl\u0026sig=Sanitized", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:39:35 GMT", + "ETag": "\u00220x8D99B13D69BDD59\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:39:35 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "d51185ab-7c19-5950-a172-e2febb9df5d8", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-10-29T19:39:35.6858713Z", + "x-ms-file-creation-time": "2021-10-29T19:39:35.6028727Z", + "x-ms-file-id": "13835128424026341376", + "x-ms-file-last-write-time": "2021-10-29T19:39:35.6028727Z", + "x-ms-file-parent-id": "0", + "x-ms-file-permission-key": "15110104144358886944*6706197617703823457", + "x-ms-request-id": "e116b58a-c01a-0001-4efc-cc0599000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-8dddf32c-88a3-169f-1c80-90f58289c3c4/test-directory-f6daa29f-68ae-16cd-38a3-fb044003290f?sv=2021-04-10\u0026se=2021-10-30T19%3A39%3A34Z\u0026sr=s\u0026sp=rcwdl\u0026sig=Sanitized\u0026restype=directory", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/xml", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "bb59b38c-54f1-fdf6-0b6a-d7e031cfaf47", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:39:35 GMT", + "ETag": "\u00220x8D99B13D69BDD59\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:39:35 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "bb59b38c-54f1-fdf6-0b6a-d7e031cfaf47", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-10-29T19:39:35.6858713Z", + "x-ms-file-creation-time": "2021-10-29T19:39:35.6028727Z", + "x-ms-file-id": "13835128424026341376", + "x-ms-file-last-write-time": "2021-10-29T19:39:35.6028727Z", + "x-ms-file-parent-id": "0", + "x-ms-file-permission-key": "15110104144358886944*6706197617703823457", + "x-ms-request-id": "e116b58b-c01a-0001-4ffc-cc0599000000", + "x-ms-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-8dddf32c-88a3-169f-1c80-90f58289c3c4?restype=share", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-16d04aa06da92245a3aa6600a0839289-daea0bb060702f44-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "0772fee4-3944-06e7-96ca-e83767415a03", + "x-ms-date": "Fri, 29 Oct 2021 19:39:35 GMT", + "x-ms-delete-snapshots": "include", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:39:35 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "0772fee4-3944-06e7-96ca-e83767415a03", + "x-ms-request-id": "e116b58c-c01a-0001-50fc-cc0599000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + } + ], + "Variables": { + "DateTimeOffsetNow": "2021-10-29T14:39:34.8907625-05:00", + "RandomSeed": "1195858145", + "Storage_TestConfigDefault": "ProductionTenant\n712xscnapby3pev55a\nU2FuaXRpemVk\nhttps://712xscnapby3pev55a.blob.preprod.core.windows.net\nhttps://712xscnapby3pev55a.file.preprod.core.windows.net\nhttps://712xscnapby3pev55a.queue.core.windows.net\nhttps://712xscnapby3pev55a.table.core.windows.net\n\n\n\n\nhttps://712xscnapby3pev55a-secondary.blob.core.windows.net\nhttps://712xscnapby3pev55a-secondary.file.core.windows.net\nhttps://712xscnapby3pev55a-secondary.queue.core.windows.net\nhttps://712xscnapby3pev55a-secondary.table.core.windows.net\n\nSanitized\n\n\nCloud\nBlobEndpoint=https://712xscnapby3pev55a.blob.preprod.core.windows.net/;QueueEndpoint=https://712xscnapby3pev55a.queue.core.windows.net/;FileEndpoint=https://712xscnapby3pev55a.file.preprod.core.windows.net/;BlobSecondaryEndpoint=https://712xscnapby3pev55a-secondary.blob.core.windows.net/;QueueSecondaryEndpoint=https://712xscnapby3pev55a-secondary.queue.core.windows.net/;FileSecondaryEndpoint=https://712xscnapby3pev55a-secondary.file.core.windows.net/;AccountName=712xscnapby3pev55a;AccountKey=Kg==;\nscope-1\n\n" + } +} \ No newline at end of file diff --git a/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_ShareSASAsync.json b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_ShareSASAsync.json new file mode 100644 index 000000000000..73079f084d3c --- /dev/null +++ b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_ShareSASAsync.json @@ -0,0 +1,177 @@ +{ + "Entries": [ + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-d5a900b2-f406-cfa9-2749-8d083b7f7318?restype=share", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-49e96a9a3733b5459a18353369681f68-337a0cd921429746-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "5d1030d8-da61-0a91-5f07-90d465825d95", + "x-ms-date": "Fri, 29 Oct 2021 19:39:35 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:39:35 GMT", + "ETag": "\u00220x8D99B13D6C59338\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:39:35 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "5d1030d8-da61-0a91-5f07-90d465825d95", + "x-ms-request-id": "e116b58d-c01a-0001-51fc-cc0599000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-d5a900b2-f406-cfa9-2749-8d083b7f7318/test-directory-9bb02241-711c-0bb9-5bd7-7bfd24332a24?restype=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-23ba66ec33703245b5e5eaddd23698c7-46b1fb1b0a89e846-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "82353bac-3351-6725-7604-02895f94e52c", + "x-ms-date": "Fri, 29 Oct 2021 19:39:35 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:39:35 GMT", + "ETag": "\u00220x8D99B13D6D6EABC\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:39:36 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "82353bac-3351-6725-7604-02895f94e52c", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-10-29T19:39:36.0728764Z", + "x-ms-file-creation-time": "2021-10-29T19:39:36.0728764Z", + "x-ms-file-id": "13835128424026341376", + "x-ms-file-last-write-time": "2021-10-29T19:39:36.0728764Z", + "x-ms-file-parent-id": "0", + "x-ms-file-permission-key": "15110104144358886944*6706197617703823457", + "x-ms-request-id": "e116b58f-c01a-0001-52fc-cc0599000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-d5a900b2-f406-cfa9-2749-8d083b7f7318/test-directory-19596bdd-5252-2a26-6bab-3cc319c4f38a?sv=2021-04-10\u0026se=2021-10-30T19%3A39%3A35Z\u0026sr=s\u0026sp=rcwdl\u0026sig=Sanitized\u0026restype=directory\u0026comp=rename", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "traceparent": "00-5e1f4a43b06c8b44826f4019b32eeb14-cc75877475c73d41-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "ac172b73-5277-5a85-140a-17a6f6614eb1", + "x-ms-file-rename-source": "https%3A%2F%2F712xscnapby3pev55a.file.preprod.core.windows.net%2Ftest-share-d5a900b2-f406-cfa9-2749-8d083b7f7318%2Ftest-directory-9bb02241-711c-0bb9-5bd7-7bfd24332a24%3Fsv=2021-04-10\u0026se=2021-10-30T19%3A39%3A35Z\u0026sr=s\u0026sp=rcwdl\u0026sig=Sanitized", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:39:35 GMT", + "ETag": "\u00220x8D99B13D6E2D18E\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:39:36 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "ac172b73-5277-5a85-140a-17a6f6614eb1", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-10-29T19:39:36.1508750Z", + "x-ms-file-creation-time": "2021-10-29T19:39:36.0728764Z", + "x-ms-file-id": "13835128424026341376", + "x-ms-file-last-write-time": "2021-10-29T19:39:36.0728764Z", + "x-ms-file-parent-id": "0", + "x-ms-file-permission-key": "15110104144358886944*6706197617703823457", + "x-ms-request-id": "e116b590-c01a-0001-53fc-cc0599000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-d5a900b2-f406-cfa9-2749-8d083b7f7318/test-directory-19596bdd-5252-2a26-6bab-3cc319c4f38a?sv=2021-04-10\u0026se=2021-10-30T19%3A39%3A35Z\u0026sr=s\u0026sp=rcwdl\u0026sig=Sanitized\u0026restype=directory", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/xml", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "ed507204-47ad-1813-1ef6-d3f3902c51c5", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:39:35 GMT", + "ETag": "\u00220x8D99B13D6E2D18E\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:39:36 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "ed507204-47ad-1813-1ef6-d3f3902c51c5", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-10-29T19:39:36.1508750Z", + "x-ms-file-creation-time": "2021-10-29T19:39:36.0728764Z", + "x-ms-file-id": "13835128424026341376", + "x-ms-file-last-write-time": "2021-10-29T19:39:36.0728764Z", + "x-ms-file-parent-id": "0", + "x-ms-file-permission-key": "15110104144358886944*6706197617703823457", + "x-ms-request-id": "e116b591-c01a-0001-54fc-cc0599000000", + "x-ms-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-d5a900b2-f406-cfa9-2749-8d083b7f7318?restype=share", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-995708f459078145b92759271f70b2fb-e14cf4c64d542244-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "83a1d9f3-6011-c904-6304-9d4d293ba56b", + "x-ms-date": "Fri, 29 Oct 2021 19:39:35 GMT", + "x-ms-delete-snapshots": "include", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:39:35 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "83a1d9f3-6011-c904-6304-9d4d293ba56b", + "x-ms-request-id": "e116b592-c01a-0001-55fc-cc0599000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + } + ], + "Variables": { + "DateTimeOffsetNow": "2021-10-29T14:39:35.3578456-05:00", + "RandomSeed": "2123898259", + "Storage_TestConfigDefault": "ProductionTenant\n712xscnapby3pev55a\nU2FuaXRpemVk\nhttps://712xscnapby3pev55a.blob.preprod.core.windows.net\nhttps://712xscnapby3pev55a.file.preprod.core.windows.net\nhttps://712xscnapby3pev55a.queue.core.windows.net\nhttps://712xscnapby3pev55a.table.core.windows.net\n\n\n\n\nhttps://712xscnapby3pev55a-secondary.blob.core.windows.net\nhttps://712xscnapby3pev55a-secondary.file.core.windows.net\nhttps://712xscnapby3pev55a-secondary.queue.core.windows.net\nhttps://712xscnapby3pev55a-secondary.table.core.windows.net\n\nSanitized\n\n\nCloud\nBlobEndpoint=https://712xscnapby3pev55a.blob.preprod.core.windows.net/;QueueEndpoint=https://712xscnapby3pev55a.queue.core.windows.net/;FileEndpoint=https://712xscnapby3pev55a.file.preprod.core.windows.net/;BlobSecondaryEndpoint=https://712xscnapby3pev55a-secondary.blob.core.windows.net/;QueueSecondaryEndpoint=https://712xscnapby3pev55a-secondary.queue.core.windows.net/;FileSecondaryEndpoint=https://712xscnapby3pev55a-secondary.file.core.windows.net/;AccountName=712xscnapby3pev55a;AccountKey=Kg==;\nscope-1\n\n" + } +} \ No newline at end of file diff --git a/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync.json b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync.json new file mode 100644 index 000000000000..9a27dc4ef01c --- /dev/null +++ b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync.json @@ -0,0 +1,265 @@ +{ + "Entries": [ + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-5cfa1ccc-3b4f-19b8-7e73-48aa87c15753?restype=share", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-0827f6aa5d65774d88631a317cb26b05-e0535d3fd0a06e44-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "142d01f2-3e7a-5148-5198-102689bb035c", + "x-ms-date": "Fri, 29 Oct 2021 19:40:23 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:23 GMT", + "ETag": "\u00220x8D99B13F3B3917A\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:24 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "142d01f2-3e7a-5148-5198-102689bb035c", + "x-ms-request-id": "d8bf649a-901a-0009-32fc-cc22b6000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-5cfa1ccc-3b4f-19b8-7e73-48aa87c15753/test-directory-da934636-9fe7-8022-2c4b-7e89ce128de1?restype=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-5d3b055e59cf214b90954065c70d8311-81b280237bce9d43-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "456f10c2-3b0a-52e2-dfac-e82ec0be833f", + "x-ms-date": "Fri, 29 Oct 2021 19:40:23 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:23 GMT", + "ETag": "\u00220x8D99B13F3C3EDA4\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:24 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "456f10c2-3b0a-52e2-dfac-e82ec0be833f", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-10-29T19:40:24.6023588Z", + "x-ms-file-creation-time": "2021-10-29T19:40:24.6023588Z", + "x-ms-file-id": "13835128424026341376", + "x-ms-file-last-write-time": "2021-10-29T19:40:24.6023588Z", + "x-ms-file-parent-id": "0", + "x-ms-file-permission-key": "15110104144358886944*6706197617703823457", + "x-ms-request-id": "d8bf649c-901a-0009-33fc-cc22b6000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-5cfa1ccc-3b4f-19b8-7e73-48aa87c15753/test-directory-da934636-9fe7-8022-2c4b-7e89ce128de1/test-file-bdc75d27-47a2-21d6-9c66-a5e75aaac395", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-1d52909fc5b9df43b0356d66efb643f1-5c0e8a43725aed47-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "62078668-c6f7-c39d-58a7-6f9dd8e198c3", + "x-ms-content-length": "1024", + "x-ms-date": "Fri, 29 Oct 2021 19:40:23 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-type": "file", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:23 GMT", + "ETag": "\u00220x8D99B13F3D3A50F\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:24 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "62078668-c6f7-c39d-58a7-6f9dd8e198c3", + "x-ms-file-attributes": "Archive", + "x-ms-file-change-time": "2021-10-29T19:40:24.7053583Z", + "x-ms-file-creation-time": "2021-10-29T19:40:24.7053583Z", + "x-ms-file-id": "11529285414812647424", + "x-ms-file-last-write-time": "2021-10-29T19:40:24.7053583Z", + "x-ms-file-parent-id": "13835128424026341376", + "x-ms-file-permission-key": "13773932323712163591*6706197617703823457", + "x-ms-request-id": "d8bf649d-901a-0009-34fc-cc22b6000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-5cfa1ccc-3b4f-19b8-7e73-48aa87c15753/test-directory-da934636-9fe7-8022-2c4b-7e89ce128de1/test-file-bdc75d27-47a2-21d6-9c66-a5e75aaac395?comp=range", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "Content-Length": "1024", + "Content-Type": "application/octet-stream", + "traceparent": "00-989de19b2e7778489d87b6f9a15bcda0-7e3b14d4f830fa47-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "80b3d147-7ac9-2b2d-e437-ee129b822f88", + "x-ms-date": "Fri, 29 Oct 2021 19:40:23 GMT", + "x-ms-range": "bytes=0-1023", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10", + "x-ms-write": "update" + }, + "RequestBody": "S/Ht7g43YA0/g3UlcNtr4jtYftSiYJ11m8C0WaqAa2bjE6/Eyzw\u002BMSX5I3RQd1N9O4xhf2PDIetTeFJOggZjvhcPQlwspxf\u002BGk2vqD0pJCNtNx4eH\u002BsCH/LEcVLp8K4elmVdQTX2UJR0Y2UWFHitKlQv4EvoRJ8rDCJqaDbEFSqekBHXzOPud\u002BaJqbuG7At5Fkb\u002Bug9jNlHGMTQTjOhesE47d4Rn1l5wQGlkXpvjpR8X8FLvxVoaO1m/EZqv2\u002Bv9K/ltSnWGEj/ojnqm/te24owU/JuWburzITwqp8TDwWR\u002BZzOidVqqkN4SBjfgdDyCCS4Omt9PZr0OeSk4W2t7JcwVJ5ekE20xamu8hGezE60AqJ2VtCeFLgB2lPsxcTRzluFqykyl3vXB3S9zk\u002BJVW2Z8OLPN5XClj/mWLn9x//g2Se6GSEhgWsqo1Nf3EZseIDiVtTmAprFwxTtTDq91UN03PEn0zhIdG93pJRGYrX1deA1H20q\u002BtqM8FYINDUwaMoT6v9VRKVImd5lbl4Cf1xi99ZWiLnSSeIamt7iQEA6Rz/KNnu2oC066IWSwYx4inT5qTxe2eAQPZ0dOq3KZlWeLysiOEjgqFOpG5w0Q4hVohBp6JsD221fufTemWmDcIYv8JZhWk4oFPzotb5D2/4Qx5SdYH2\u002Bmle9woJUBg7qJasaCE718EfCPdeaFyGvG932ydHQ4hAIbVY\u002Bp5fP0A7yAowXKdOzHtdQ3yKmJIMyDqqgYTg9FUebEZr0t0iz8mnIqBSVm/IOQ67\u002BgAbtYkjTDJjtL3LWsOlIeBQ4vmuKoOi03XxumHa0lh2NQpU8qa9SIaazwsb68fcrSR/d1YVDc\u002BMeNITIZHAmNJlRRXJUC9Jk5pjA2t4hveuJR1NW2ryYSc6yInEqhb0yjY4tpayE00FNdO7ogpkE\u002BHqZQx0gz13YuP\u002BjoeldPmDfjk1P9Bg/AHAOCWXRr8s1rSX6jUKcEb4wVOiw4S1X7DaODPBLtQBiXj6pEsX0Bw0wafDDZq0eP3yPH6MvjiNCuhkvR6La6fgllDMH9v74OE3ffHc8lImJb81zvJVhMtAfZlioyMNuWX/4nc5\u002BGkiBludVUA2oBiGTpdfRay1ixGVi5IyiU3OKcSL7Q/a7D1WA7imyC\u002BLCd1w3FSbvmPJOldlpGzG/40NzyuLqsMYu2JZ\u002BTHkHrLiCoHEsaz5MntQwqKodTfAnxQrmPkD/18aaCDiMbUh1SuUg5nrAj3gFJygOugQYEY6mWotuIXJ7hsiukl8BvDGLu2HA/Gd1YzWS4RcU8Rm\u002Bgfqt5hbBCyV2pWOyFf0ZA2r6gv6mVxUnLPdR30BbYpGy7BBkV9YaxrA4SlcHx0g==", + "StatusCode": 201, + "ResponseHeaders": { + "Content-MD5": "oZRXhigO1O9CuXlF/dsdRA==", + "Date": "Fri, 29 Oct 2021 19:40:23 GMT", + "ETag": "\u00220x8D99B13F3DF8BEC\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:24 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "80b3d147-7ac9-2b2d-e437-ee129b822f88", + "x-ms-request-id": "d8bf649e-901a-0009-35fc-cc22b6000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-5cfa1ccc-3b4f-19b8-7e73-48aa87c15753/test-directory-da934636-9fe7-8022-2c4b-7e89ce128de1/test-file-0bc82e0b-7e03-f3c8-6d0f-862827924462?comp=rename", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-c7198ed96055f040bb31fd23e250d521-e1d795394ae45445-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "c3cb14e2-710d-d409-ef4c-86cfad742987", + "x-ms-date": "Fri, 29 Oct 2021 19:40:24 GMT", + "x-ms-file-rename-source": "https%3A%2F%2F712xscnapby3pev55a.file.preprod.core.windows.net%2Ftest-share-5cfa1ccc-3b4f-19b8-7e73-48aa87c15753%2Ftest-directory-da934636-9fe7-8022-2c4b-7e89ce128de1%2Ftest-file-bdc75d27-47a2-21d6-9c66-a5e75aaac395=", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:23 GMT", + "ETag": "\u00220x8D99B13F3EA886C\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:24 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "c3cb14e2-710d-d409-ef4c-86cfad742987", + "x-ms-file-attributes": "Archive", + "x-ms-file-change-time": "2021-10-29T19:40:24.8553580Z", + "x-ms-file-creation-time": "2021-10-29T19:40:24.7053583Z", + "x-ms-file-id": "11529285414812647424", + "x-ms-file-last-write-time": "2021-10-29T19:40:24.7053583Z", + "x-ms-file-parent-id": "13835128424026341376", + "x-ms-file-permission-key": "13773932323712163591*6706197617703823457", + "x-ms-request-id": "d8bf649f-901a-0009-36fc-cc22b6000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-5cfa1ccc-3b4f-19b8-7e73-48aa87c15753/test-directory-da934636-9fe7-8022-2c4b-7e89ce128de1/test-file-0bc82e0b-7e03-f3c8-6d0f-862827924462", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "873019f7-6cb7-687b-61b1-6a0c24015b70", + "x-ms-date": "Fri, 29 Oct 2021 19:40:24 GMT", + "x-ms-range": "bytes=0-1023", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 206, + "ResponseHeaders": { + "Accept-Ranges": "bytes", + "Content-Length": "1024", + "Content-Range": "bytes 0-1023/1024", + "Content-Type": "application/octet-stream", + "Date": "Fri, 29 Oct 2021 19:40:24 GMT", + "ETag": "\u00220x8D99B13F3EA886C\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:24 GMT", + "x-ms-client-request-id": "873019f7-6cb7-687b-61b1-6a0c24015b70", + "x-ms-file-attributes": "Archive", + "x-ms-file-change-time": "2021-10-29T19:40:24.8553580Z", + "x-ms-file-creation-time": "2021-10-29T19:40:24.7053583Z", + "x-ms-file-id": "11529285414812647424", + "x-ms-file-last-write-time": "2021-10-29T19:40:24.7053583Z", + "x-ms-file-parent-id": "13835128424026341376", + "x-ms-file-permission-key": "13773932323712163591*6706197617703823457", + "x-ms-lease-state": "available", + "x-ms-lease-status": "unlocked", + "x-ms-request-id": "d8bf64a0-901a-0009-37fc-cc22b6000000", + "x-ms-server-encrypted": "false", + "x-ms-type": "File", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": "S/Ht7g43YA0/g3UlcNtr4jtYftSiYJ11m8C0WaqAa2bjE6/Eyzw\u002BMSX5I3RQd1N9O4xhf2PDIetTeFJOggZjvhcPQlwspxf\u002BGk2vqD0pJCNtNx4eH\u002BsCH/LEcVLp8K4elmVdQTX2UJR0Y2UWFHitKlQv4EvoRJ8rDCJqaDbEFSqekBHXzOPud\u002BaJqbuG7At5Fkb\u002Bug9jNlHGMTQTjOhesE47d4Rn1l5wQGlkXpvjpR8X8FLvxVoaO1m/EZqv2\u002Bv9K/ltSnWGEj/ojnqm/te24owU/JuWburzITwqp8TDwWR\u002BZzOidVqqkN4SBjfgdDyCCS4Omt9PZr0OeSk4W2t7JcwVJ5ekE20xamu8hGezE60AqJ2VtCeFLgB2lPsxcTRzluFqykyl3vXB3S9zk\u002BJVW2Z8OLPN5XClj/mWLn9x//g2Se6GSEhgWsqo1Nf3EZseIDiVtTmAprFwxTtTDq91UN03PEn0zhIdG93pJRGYrX1deA1H20q\u002BtqM8FYINDUwaMoT6v9VRKVImd5lbl4Cf1xi99ZWiLnSSeIamt7iQEA6Rz/KNnu2oC066IWSwYx4inT5qTxe2eAQPZ0dOq3KZlWeLysiOEjgqFOpG5w0Q4hVohBp6JsD221fufTemWmDcIYv8JZhWk4oFPzotb5D2/4Qx5SdYH2\u002Bmle9woJUBg7qJasaCE718EfCPdeaFyGvG932ydHQ4hAIbVY\u002Bp5fP0A7yAowXKdOzHtdQ3yKmJIMyDqqgYTg9FUebEZr0t0iz8mnIqBSVm/IOQ67\u002BgAbtYkjTDJjtL3LWsOlIeBQ4vmuKoOi03XxumHa0lh2NQpU8qa9SIaazwsb68fcrSR/d1YVDc\u002BMeNITIZHAmNJlRRXJUC9Jk5pjA2t4hveuJR1NW2ryYSc6yInEqhb0yjY4tpayE00FNdO7ogpkE\u002BHqZQx0gz13YuP\u002BjoeldPmDfjk1P9Bg/AHAOCWXRr8s1rSX6jUKcEb4wVOiw4S1X7DaODPBLtQBiXj6pEsX0Bw0wafDDZq0eP3yPH6MvjiNCuhkvR6La6fgllDMH9v74OE3ffHc8lImJb81zvJVhMtAfZlioyMNuWX/4nc5\u002BGkiBludVUA2oBiGTpdfRay1ixGVi5IyiU3OKcSL7Q/a7D1WA7imyC\u002BLCd1w3FSbvmPJOldlpGzG/40NzyuLqsMYu2JZ\u002BTHkHrLiCoHEsaz5MntQwqKodTfAnxQrmPkD/18aaCDiMbUh1SuUg5nrAj3gFJygOugQYEY6mWotuIXJ7hsiukl8BvDGLu2HA/Gd1YzWS4RcU8Rm\u002Bgfqt5hbBCyV2pWOyFf0ZA2r6gv6mVxUnLPdR30BbYpGy7BBkV9YaxrA4SlcHx0g==" + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-5cfa1ccc-3b4f-19b8-7e73-48aa87c15753?restype=share", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-e725992e0ea932419abfe6b3ca0255f6-d33af72a87f0a54c-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "94d8e9d5-a243-1dd0-5c6b-7aa4059478ff", + "x-ms-date": "Fri, 29 Oct 2021 19:40:24 GMT", + "x-ms-delete-snapshots": "include", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:24 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "94d8e9d5-a243-1dd0-5c6b-7aa4059478ff", + "x-ms-request-id": "d8bf64a1-901a-0009-38fc-cc22b6000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + } + ], + "Variables": { + "RandomSeed": "1997714374", + "Storage_TestConfigDefault": "ProductionTenant\n712xscnapby3pev55a\nU2FuaXRpemVk\nhttps://712xscnapby3pev55a.blob.preprod.core.windows.net\nhttps://712xscnapby3pev55a.file.preprod.core.windows.net\nhttps://712xscnapby3pev55a.queue.core.windows.net\nhttps://712xscnapby3pev55a.table.core.windows.net\n\n\n\n\nhttps://712xscnapby3pev55a-secondary.blob.core.windows.net\nhttps://712xscnapby3pev55a-secondary.file.core.windows.net\nhttps://712xscnapby3pev55a-secondary.queue.core.windows.net\nhttps://712xscnapby3pev55a-secondary.table.core.windows.net\n\nSanitized\n\n\nCloud\nBlobEndpoint=https://712xscnapby3pev55a.blob.preprod.core.windows.net/;QueueEndpoint=https://712xscnapby3pev55a.queue.core.windows.net/;FileEndpoint=https://712xscnapby3pev55a.file.preprod.core.windows.net/;BlobSecondaryEndpoint=https://712xscnapby3pev55a-secondary.blob.core.windows.net/;QueueSecondaryEndpoint=https://712xscnapby3pev55a-secondary.queue.core.windows.net/;FileSecondaryEndpoint=https://712xscnapby3pev55a-secondary.file.core.windows.net/;AccountName=712xscnapby3pev55a;AccountKey=Kg==;\nscope-1\n\n" + } +} \ No newline at end of file diff --git a/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsyncAsync.json b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsyncAsync.json new file mode 100644 index 000000000000..a2bd29cb97ad --- /dev/null +++ b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsyncAsync.json @@ -0,0 +1,265 @@ +{ + "Entries": [ + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-728fb23c-c6c7-0dfb-0fcb-440e636d3bea?restype=share", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-c7f0b331fc56414192de97911768e259-63fa50d7fe48144f-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "097b330a-a251-a549-f16c-434d7e2acb2d", + "x-ms-date": "Fri, 29 Oct 2021 19:40:28 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:29 GMT", + "ETag": "\u00220x8D99B13F68C2DA0\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:29 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "097b330a-a251-a549-f16c-434d7e2acb2d", + "x-ms-request-id": "d8bf64e4-901a-0009-6ffc-cc22b6000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-728fb23c-c6c7-0dfb-0fcb-440e636d3bea/test-directory-14f6d933-c7b3-b9f5-d073-01dc0eb7a5b4?restype=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-22f18bac96fbc14bad235ead31f2ba93-7d4bbfca1ef83245-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "8f118a1f-9763-4214-3ec1-39dea06c963a", + "x-ms-date": "Fri, 29 Oct 2021 19:40:28 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:29 GMT", + "ETag": "\u00220x8D99B13F6AC90DF\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:29 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "8f118a1f-9763-4214-3ec1-39dea06c963a", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-10-29T19:40:29.4824159Z", + "x-ms-file-creation-time": "2021-10-29T19:40:29.4824159Z", + "x-ms-file-id": "13835128424026341376", + "x-ms-file-last-write-time": "2021-10-29T19:40:29.4824159Z", + "x-ms-file-parent-id": "0", + "x-ms-file-permission-key": "15110104144358886944*6706197617703823457", + "x-ms-request-id": "d8bf64e6-901a-0009-70fc-cc22b6000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-728fb23c-c6c7-0dfb-0fcb-440e636d3bea/test-directory-14f6d933-c7b3-b9f5-d073-01dc0eb7a5b4/test-file-84bcbbd4-15a6-8650-66c1-f030f8ba3878", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-d1a45219e7209249a14809b30835fc3d-871bd0b19f19024e-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "e509fe46-12b0-b193-3ea8-9b65ab0b0885", + "x-ms-content-length": "1024", + "x-ms-date": "Fri, 29 Oct 2021 19:40:28 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-type": "file", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:29 GMT", + "ETag": "\u00220x8D99B13F6BB0F82\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:29 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "e509fe46-12b0-b193-3ea8-9b65ab0b0885", + "x-ms-file-attributes": "Archive", + "x-ms-file-change-time": "2021-10-29T19:40:29.5774082Z", + "x-ms-file-creation-time": "2021-10-29T19:40:29.5774082Z", + "x-ms-file-id": "11529285414812647424", + "x-ms-file-last-write-time": "2021-10-29T19:40:29.5774082Z", + "x-ms-file-parent-id": "13835128424026341376", + "x-ms-file-permission-key": "13773932323712163591*6706197617703823457", + "x-ms-request-id": "d8bf64e7-901a-0009-71fc-cc22b6000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-728fb23c-c6c7-0dfb-0fcb-440e636d3bea/test-directory-14f6d933-c7b3-b9f5-d073-01dc0eb7a5b4/test-file-84bcbbd4-15a6-8650-66c1-f030f8ba3878?comp=range", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "Content-Length": "1024", + "Content-Type": "application/octet-stream", + "traceparent": "00-d34473c0df50b44cb522247ddf83c6a9-296fb2d770f2eb4b-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "0df2e1be-ae7b-8d90-8059-76dc47b001ad", + "x-ms-date": "Fri, 29 Oct 2021 19:40:28 GMT", + "x-ms-range": "bytes=0-1023", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10", + "x-ms-write": "update" + }, + "RequestBody": "5LZwbVrK1jicOTWWxgkdGPz26fqxU8hDfDdyvAC510MHyWKy3VeffCfQSXbc/es0ioJptCIN05DtLPEjWBk44mLyjvynajukV23S4ApSZ35MPTJ\u002BUCMg\u002BfXSxLBmeyMOmGYU6W7ujR9HxF21OvOGm8Vy1hrnuZI/0ZUG1KaKPttJxEijPn0QXbASNovFa78CSynr86UIJ97U1RjZ57h5vYaBa3aq4l1IYnlq1IMGeWXWBIl8n0o2QJxpz2llNnX4mHkFRP9IV2jLopEsnlJbzluyA\u002BMv/R48SyvZQRP04ysDcTwKATRmjawgsPy4CqFKDgANsjOSyZtayfjUbxZU175mKS0VUcwmTHY3Dkwhg0GJjjIS5jD4cKihrzg8kR2Vy9k9UuF0NL005ma9WrpPOUW3SuDjQfCObbiFdKGU6rpYoUNz4zBgFVp13gDJOhbtUnXyhEc9sonor\u002BQo7r8bn/usZbl33FUUVzSGbmPwxDOimCIroWZyGu\u002B5ijRMNyaaWT8FHdVcdXYg3S0StkQm9\u002Buxhlad7/2UOUrKvlEhyB8N6xQk66ZdRSKsC8Q5YGSqk5JJmrDP/WlBcOOLkrYk/xUNBMsvAgxEVEE08OQ5W9nlHyu\u002B2C1vPe6q4nrC0bJrhwyvLFuZe5CGBEZumw2FCBQKpXOLZibnncbchR\u002BRgYKPyGjXii99TKOaONPnAKLhJNpmuCs\u002B4CHlyI6UvPZx9IPD39Kkrn3ljFjP8S5T/50k\u002B2BEK8hXUOhG8cKg6ZCtKURPJCDPPHZcgCvSb\u002B7zkcjxb8CWLMi6a4/qXby7RaPIIsjqBNt8Vb/p56udhOH5U2D5rnnQF/x7lLiR5N66oTuICk0mCY3tdRoBrEQdHeet8ApbwpYp9wrLbm8i6nDgLkZvFHmU0krSDDlfz2q3XnfQ4/TUXt6lXxNCWpodyouqIH79rQltGR6/ibVcySigFBD4UgZ8DM9oyrRmUXevtUGuta/rubFuYsnVFNUpSJbqokaKJHiELROvleJUB8imENNzrhN5tFpfiu88pvj5P4IefK8xJZDJKYebPCPOGVsBLwQBtZqCce3rK5qJSIcbtVZgNYsZdOpDqoSM3Xc3kHCTO3b094nnnArBRfr2QOEAgIfNbuTQ6LoZvgsW9pN2tJop9QwQJr3MeJmAVy/wTWmii1zwaiKMwlK72jl\u002B0aZ2SpBfzUrU71nJAPVLT5CLKHGhc2o3hkp4nDK6VUuETqfyCQyekYAezZwCJmktQXLCMLLI3V07P8RG5zAYGpoNRLFNWEaD7ZfwgqXNNF/gS1u/9yWZvHBJtspHV6pPBrMC9OK43\u002BgsPkIa11q4bgtlZZzUWCJ0dIhBA6F8PJXtoA==", + "StatusCode": 201, + "ResponseHeaders": { + "Content-MD5": "OxI/PfdRc\u002BOkOhs3EjKziA==", + "Date": "Fri, 29 Oct 2021 19:40:29 GMT", + "ETag": "\u00220x8D99B13F6C60BD9\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:29 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "0df2e1be-ae7b-8d90-8059-76dc47b001ad", + "x-ms-request-id": "d8bf64e8-901a-0009-72fc-cc22b6000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-728fb23c-c6c7-0dfb-0fcb-440e636d3bea/test-directory-14f6d933-c7b3-b9f5-d073-01dc0eb7a5b4/test-file-022f8ec7-9c26-013b-401c-2ec67d447a3b?comp=rename", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-c9456a7f4dc34d40854d44b460696657-a5cdeeeeba0d0a4d-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "5abd5971-dfa3-cd25-623d-bf23b18f2ce2", + "x-ms-date": "Fri, 29 Oct 2021 19:40:28 GMT", + "x-ms-file-rename-source": "https%3A%2F%2F712xscnapby3pev55a.file.preprod.core.windows.net%2Ftest-share-728fb23c-c6c7-0dfb-0fcb-440e636d3bea%2Ftest-directory-14f6d933-c7b3-b9f5-d073-01dc0eb7a5b4%2Ftest-file-84bcbbd4-15a6-8650-66c1-f030f8ba3878=", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:29 GMT", + "ETag": "\u00220x8D99B13F6D06C6E\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:29 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "5abd5971-dfa3-cd25-623d-bf23b18f2ce2", + "x-ms-file-attributes": "Archive", + "x-ms-file-change-time": "2021-10-29T19:40:29.7174126Z", + "x-ms-file-creation-time": "2021-10-29T19:40:29.5774082Z", + "x-ms-file-id": "11529285414812647424", + "x-ms-file-last-write-time": "2021-10-29T19:40:29.5774082Z", + "x-ms-file-parent-id": "13835128424026341376", + "x-ms-file-permission-key": "13773932323712163591*6706197617703823457", + "x-ms-request-id": "d8bf64e9-901a-0009-73fc-cc22b6000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-728fb23c-c6c7-0dfb-0fcb-440e636d3bea/test-directory-14f6d933-c7b3-b9f5-d073-01dc0eb7a5b4/test-file-022f8ec7-9c26-013b-401c-2ec67d447a3b", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "ed6a4bb5-a7f3-4d0a-1111-63660cc58ba1", + "x-ms-date": "Fri, 29 Oct 2021 19:40:28 GMT", + "x-ms-range": "bytes=0-1023", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 206, + "ResponseHeaders": { + "Accept-Ranges": "bytes", + "Content-Length": "1024", + "Content-Range": "bytes 0-1023/1024", + "Content-Type": "application/octet-stream", + "Date": "Fri, 29 Oct 2021 19:40:29 GMT", + "ETag": "\u00220x8D99B13F6D06C6E\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:29 GMT", + "x-ms-client-request-id": "ed6a4bb5-a7f3-4d0a-1111-63660cc58ba1", + "x-ms-file-attributes": "Archive", + "x-ms-file-change-time": "2021-10-29T19:40:29.7174126Z", + "x-ms-file-creation-time": "2021-10-29T19:40:29.5774082Z", + "x-ms-file-id": "11529285414812647424", + "x-ms-file-last-write-time": "2021-10-29T19:40:29.5774082Z", + "x-ms-file-parent-id": "13835128424026341376", + "x-ms-file-permission-key": "13773932323712163591*6706197617703823457", + "x-ms-lease-state": "available", + "x-ms-lease-status": "unlocked", + "x-ms-request-id": "d8bf64ea-901a-0009-74fc-cc22b6000000", + "x-ms-server-encrypted": "false", + "x-ms-type": "File", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": "5LZwbVrK1jicOTWWxgkdGPz26fqxU8hDfDdyvAC510MHyWKy3VeffCfQSXbc/es0ioJptCIN05DtLPEjWBk44mLyjvynajukV23S4ApSZ35MPTJ\u002BUCMg\u002BfXSxLBmeyMOmGYU6W7ujR9HxF21OvOGm8Vy1hrnuZI/0ZUG1KaKPttJxEijPn0QXbASNovFa78CSynr86UIJ97U1RjZ57h5vYaBa3aq4l1IYnlq1IMGeWXWBIl8n0o2QJxpz2llNnX4mHkFRP9IV2jLopEsnlJbzluyA\u002BMv/R48SyvZQRP04ysDcTwKATRmjawgsPy4CqFKDgANsjOSyZtayfjUbxZU175mKS0VUcwmTHY3Dkwhg0GJjjIS5jD4cKihrzg8kR2Vy9k9UuF0NL005ma9WrpPOUW3SuDjQfCObbiFdKGU6rpYoUNz4zBgFVp13gDJOhbtUnXyhEc9sonor\u002BQo7r8bn/usZbl33FUUVzSGbmPwxDOimCIroWZyGu\u002B5ijRMNyaaWT8FHdVcdXYg3S0StkQm9\u002Buxhlad7/2UOUrKvlEhyB8N6xQk66ZdRSKsC8Q5YGSqk5JJmrDP/WlBcOOLkrYk/xUNBMsvAgxEVEE08OQ5W9nlHyu\u002B2C1vPe6q4nrC0bJrhwyvLFuZe5CGBEZumw2FCBQKpXOLZibnncbchR\u002BRgYKPyGjXii99TKOaONPnAKLhJNpmuCs\u002B4CHlyI6UvPZx9IPD39Kkrn3ljFjP8S5T/50k\u002B2BEK8hXUOhG8cKg6ZCtKURPJCDPPHZcgCvSb\u002B7zkcjxb8CWLMi6a4/qXby7RaPIIsjqBNt8Vb/p56udhOH5U2D5rnnQF/x7lLiR5N66oTuICk0mCY3tdRoBrEQdHeet8ApbwpYp9wrLbm8i6nDgLkZvFHmU0krSDDlfz2q3XnfQ4/TUXt6lXxNCWpodyouqIH79rQltGR6/ibVcySigFBD4UgZ8DM9oyrRmUXevtUGuta/rubFuYsnVFNUpSJbqokaKJHiELROvleJUB8imENNzrhN5tFpfiu88pvj5P4IefK8xJZDJKYebPCPOGVsBLwQBtZqCce3rK5qJSIcbtVZgNYsZdOpDqoSM3Xc3kHCTO3b094nnnArBRfr2QOEAgIfNbuTQ6LoZvgsW9pN2tJop9QwQJr3MeJmAVy/wTWmii1zwaiKMwlK72jl\u002B0aZ2SpBfzUrU71nJAPVLT5CLKHGhc2o3hkp4nDK6VUuETqfyCQyekYAezZwCJmktQXLCMLLI3V07P8RG5zAYGpoNRLFNWEaD7ZfwgqXNNF/gS1u/9yWZvHBJtspHV6pPBrMC9OK43\u002BgsPkIa11q4bgtlZZzUWCJ0dIhBA6F8PJXtoA==" + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-728fb23c-c6c7-0dfb-0fcb-440e636d3bea?restype=share", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-9bf3d8214f87794f85d997d93fc2fece-e5713116372df840-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "656e3442-3e24-10ef-2a03-9d25683ee634", + "x-ms-date": "Fri, 29 Oct 2021 19:40:29 GMT", + "x-ms-delete-snapshots": "include", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:29 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "656e3442-3e24-10ef-2a03-9d25683ee634", + "x-ms-request-id": "d8bf64eb-901a-0009-75fc-cc22b6000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + } + ], + "Variables": { + "RandomSeed": "543010863", + "Storage_TestConfigDefault": "ProductionTenant\n712xscnapby3pev55a\nU2FuaXRpemVk\nhttps://712xscnapby3pev55a.blob.preprod.core.windows.net\nhttps://712xscnapby3pev55a.file.preprod.core.windows.net\nhttps://712xscnapby3pev55a.queue.core.windows.net\nhttps://712xscnapby3pev55a.table.core.windows.net\n\n\n\n\nhttps://712xscnapby3pev55a-secondary.blob.core.windows.net\nhttps://712xscnapby3pev55a-secondary.file.core.windows.net\nhttps://712xscnapby3pev55a-secondary.queue.core.windows.net\nhttps://712xscnapby3pev55a-secondary.table.core.windows.net\n\nSanitized\n\n\nCloud\nBlobEndpoint=https://712xscnapby3pev55a.blob.preprod.core.windows.net/;QueueEndpoint=https://712xscnapby3pev55a.queue.core.windows.net/;FileEndpoint=https://712xscnapby3pev55a.file.preprod.core.windows.net/;BlobSecondaryEndpoint=https://712xscnapby3pev55a-secondary.blob.core.windows.net/;QueueSecondaryEndpoint=https://712xscnapby3pev55a-secondary.queue.core.windows.net/;FileSecondaryEndpoint=https://712xscnapby3pev55a-secondary.file.core.windows.net/;AccountName=712xscnapby3pev55a;AccountKey=Kg==;\nscope-1\n\n" + } +} \ No newline at end of file diff --git a/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_DestinationLeaseId(False).json b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_DestinationLeaseId(False).json new file mode 100644 index 000000000000..8b6f539d7f7d --- /dev/null +++ b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_DestinationLeaseId(False).json @@ -0,0 +1,260 @@ +{ + "Entries": [ + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-53010e64-2ae1-5498-ec2d-6ce7d521aab6?restype=share", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-3627ec68dc09174dac0e300f3b026978-903e587f7368ec4b-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "62c8a3ea-518a-2847-e455-198776144fa8", + "x-ms-date": "Fri, 29 Oct 2021 19:40:21 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:21 GMT", + "ETag": "\u00220x8D99B13F237529F\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:22 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "62c8a3ea-518a-2847-e455-198776144fa8", + "x-ms-request-id": "d8bf6473-901a-0009-11fc-cc22b6000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-53010e64-2ae1-5498-ec2d-6ce7d521aab6/test-directory-c67157de-1ca6-a728-f568-494847981517?restype=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-0a28e770d366b443adae9d580d820dd3-34089b4f648b0b4b-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "e8213a49-de63-cdef-7a20-6c2207ffe04c", + "x-ms-date": "Fri, 29 Oct 2021 19:40:21 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:21 GMT", + "ETag": "\u00220x8D99B13F246C27E\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:22 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "e8213a49-de63-cdef-7a20-6c2207ffe04c", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-10-29T19:40:22.1043326Z", + "x-ms-file-creation-time": "2021-10-29T19:40:22.1043326Z", + "x-ms-file-id": "13835128424026341376", + "x-ms-file-last-write-time": "2021-10-29T19:40:22.1043326Z", + "x-ms-file-parent-id": "0", + "x-ms-file-permission-key": "15110104144358886944*6706197617703823457", + "x-ms-request-id": "d8bf6475-901a-0009-12fc-cc22b6000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-53010e64-2ae1-5498-ec2d-6ce7d521aab6/test-directory-c67157de-1ca6-a728-f568-494847981517/test-file-a0fe023f-1c17-964e-2b6c-d803248d0464", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-f97227007f7fec4b8a5b2b3da7f7afd1-dc29371ea8d8ab43-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "a05aacc2-8193-2cdd-ec8a-bcf606eca9ec", + "x-ms-content-length": "1024", + "x-ms-date": "Fri, 29 Oct 2021 19:40:21 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-type": "file", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:21 GMT", + "ETag": "\u00220x8D99B13F252340F\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:22 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "a05aacc2-8193-2cdd-ec8a-bcf606eca9ec", + "x-ms-file-attributes": "Archive", + "x-ms-file-change-time": "2021-10-29T19:40:22.1793295Z", + "x-ms-file-creation-time": "2021-10-29T19:40:22.1793295Z", + "x-ms-file-id": "11529285414812647424", + "x-ms-file-last-write-time": "2021-10-29T19:40:22.1793295Z", + "x-ms-file-parent-id": "13835128424026341376", + "x-ms-file-permission-key": "13773932323712163591*6706197617703823457", + "x-ms-request-id": "d8bf6476-901a-0009-13fc-cc22b6000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-53010e64-2ae1-5498-ec2d-6ce7d521aab6/test-directory-c67157de-1ca6-a728-f568-494847981517/test-file-b2dd081b-d300-12d4-4e53-bae86515bb22", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-be9e0153d117b74286f780eb756e9b27-140640bf917bd140-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "d21dca85-4a2b-eeed-d748-523fc7f5c7d6", + "x-ms-content-length": "1024", + "x-ms-date": "Fri, 29 Oct 2021 19:40:21 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-type": "file", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:21 GMT", + "ETag": "\u00220x8D99B13F25F2C80\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:22 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "d21dca85-4a2b-eeed-d748-523fc7f5c7d6", + "x-ms-file-attributes": "Archive", + "x-ms-file-change-time": "2021-10-29T19:40:22.2643328Z", + "x-ms-file-creation-time": "2021-10-29T19:40:22.2643328Z", + "x-ms-file-id": "16140971433240035328", + "x-ms-file-last-write-time": "2021-10-29T19:40:22.2643328Z", + "x-ms-file-parent-id": "13835128424026341376", + "x-ms-file-permission-key": "13773932323712163591*6706197617703823457", + "x-ms-request-id": "d8bf6477-901a-0009-14fc-cc22b6000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-53010e64-2ae1-5498-ec2d-6ce7d521aab6/test-directory-c67157de-1ca6-a728-f568-494847981517/test-file-b2dd081b-d300-12d4-4e53-bae86515bb22?comp=lease", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-25cad337ec9e61459cb1b4c5dd429d3b-4a0f727b208b0141-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "d71e490a-8635-544e-1165-9a120ebf3bef", + "x-ms-date": "Fri, 29 Oct 2021 19:40:21 GMT", + "x-ms-lease-action": "acquire", + "x-ms-lease-duration": "-1", + "x-ms-proposed-lease-id": "1d8799ce-31ab-b7b9-3819-3b2eb3e7a091", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:21 GMT", + "ETag": "\u00220x8D99B13F25F2C80\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:22 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "d71e490a-8635-544e-1165-9a120ebf3bef", + "x-ms-lease-id": "1d8799ce-31ab-b7b9-3819-3b2eb3e7a091", + "x-ms-request-id": "d8bf6478-901a-0009-15fc-cc22b6000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-53010e64-2ae1-5498-ec2d-6ce7d521aab6/test-directory-c67157de-1ca6-a728-f568-494847981517/test-file-b2dd081b-d300-12d4-4e53-bae86515bb22?comp=rename", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-6e877762e9edd24482e6d169b9c74d07-6e08e6400fb73243-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "6924b91d-c9c8-295b-710d-89934fe4163c", + "x-ms-date": "Fri, 29 Oct 2021 19:40:21 GMT", + "x-ms-file-rename-replace-if-exists": "true", + "x-ms-file-rename-source": "https%3A%2F%2F712xscnapby3pev55a.file.preprod.core.windows.net%2Ftest-share-53010e64-2ae1-5498-ec2d-6ce7d521aab6%2Ftest-directory-c67157de-1ca6-a728-f568-494847981517%2Ftest-file-a0fe023f-1c17-964e-2b6c-d803248d0464=", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 412, + "ResponseHeaders": { + "Content-Length": "267", + "Content-Type": "application/xml", + "Date": "Fri, 29 Oct 2021 19:40:21 GMT", + "x-ms-client-request-id": "6924b91d-c9c8-295b-710d-89934fe4163c", + "x-ms-error-code": "LeaseIdMissing", + "x-ms-request-id": "d8bf6479-901a-0009-16fc-cc22b6000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [ + "\uFEFF\u003C?xml version=\u00221.0\u0022 encoding=\u0022utf-8\u0022?\u003E\u003CError\u003E\u003CCode\u003ELeaseIdMissing\u003C/Code\u003E\u003CMessage\u003EThere is currently a lease on the file and no lease ID was specified in the request.\n", + "RequestId:d8bf6479-901a-0009-16fc-cc22b6000000\n", + "Time:2021-10-29T19:40:22.4211354Z\u003C/Message\u003E\u003C/Error\u003E" + ] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-53010e64-2ae1-5498-ec2d-6ce7d521aab6?restype=share", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-165a1f69dca6a5499c146b53a4f628d6-b25439c4264ff342-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "55f5f2be-d19a-de27-6565-9685a24a95be", + "x-ms-date": "Fri, 29 Oct 2021 19:40:21 GMT", + "x-ms-delete-snapshots": "include", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:21 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "55f5f2be-d19a-de27-6565-9685a24a95be", + "x-ms-request-id": "d8bf647a-901a-0009-17fc-cc22b6000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + } + ], + "Variables": { + "RandomSeed": "1942802820", + "Storage_TestConfigDefault": "ProductionTenant\n712xscnapby3pev55a\nU2FuaXRpemVk\nhttps://712xscnapby3pev55a.blob.preprod.core.windows.net\nhttps://712xscnapby3pev55a.file.preprod.core.windows.net\nhttps://712xscnapby3pev55a.queue.core.windows.net\nhttps://712xscnapby3pev55a.table.core.windows.net\n\n\n\n\nhttps://712xscnapby3pev55a-secondary.blob.core.windows.net\nhttps://712xscnapby3pev55a-secondary.file.core.windows.net\nhttps://712xscnapby3pev55a-secondary.queue.core.windows.net\nhttps://712xscnapby3pev55a-secondary.table.core.windows.net\n\nSanitized\n\n\nCloud\nBlobEndpoint=https://712xscnapby3pev55a.blob.preprod.core.windows.net/;QueueEndpoint=https://712xscnapby3pev55a.queue.core.windows.net/;FileEndpoint=https://712xscnapby3pev55a.file.preprod.core.windows.net/;BlobSecondaryEndpoint=https://712xscnapby3pev55a-secondary.blob.core.windows.net/;QueueSecondaryEndpoint=https://712xscnapby3pev55a-secondary.queue.core.windows.net/;FileSecondaryEndpoint=https://712xscnapby3pev55a-secondary.file.core.windows.net/;AccountName=712xscnapby3pev55a;AccountKey=Kg==;\nscope-1\n\n" + } +} \ No newline at end of file diff --git a/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_DestinationLeaseId(False)Async.json b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_DestinationLeaseId(False)Async.json new file mode 100644 index 000000000000..8986497a98c5 --- /dev/null +++ b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_DestinationLeaseId(False)Async.json @@ -0,0 +1,260 @@ +{ + "Entries": [ + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-d9e5098c-6518-ae76-d73d-14a6e3e374c9?restype=share", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-960e9abaa00c9e4ca96c0e32938caf40-65c92c6bdd92d64c-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "eebd0acf-f1da-743a-f66a-18c655adb984", + "x-ms-date": "Fri, 29 Oct 2021 19:40:25 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:25 GMT", + "ETag": "\u00220x8D99B13F504F403\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:26 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "eebd0acf-f1da-743a-f66a-18c655adb984", + "x-ms-request-id": "d8bf64bc-901a-0009-4efc-cc22b6000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-d9e5098c-6518-ae76-d73d-14a6e3e374c9/test-directory-d8b2ee12-1c13-cc1c-6490-b90949d324ca?restype=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-31078e9fcb65d04e8ad807ad9033721f-4a389b3088d96840-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "9b909754-6659-b2fa-edf0-8a4a38302b22", + "x-ms-date": "Fri, 29 Oct 2021 19:40:25 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:25 GMT", + "ETag": "\u00220x8D99B13F5132ACB\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:26 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "9b909754-6659-b2fa-edf0-8a4a38302b22", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-10-29T19:40:26.7993803Z", + "x-ms-file-creation-time": "2021-10-29T19:40:26.7993803Z", + "x-ms-file-id": "13835128424026341376", + "x-ms-file-last-write-time": "2021-10-29T19:40:26.7993803Z", + "x-ms-file-parent-id": "0", + "x-ms-file-permission-key": "15110104144358886944*6706197617703823457", + "x-ms-request-id": "d8bf64be-901a-0009-4ffc-cc22b6000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-d9e5098c-6518-ae76-d73d-14a6e3e374c9/test-directory-d8b2ee12-1c13-cc1c-6490-b90949d324ca/test-file-4fc84e46-e1d6-8c5d-ffa0-43c6c3622584", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-04e87c06f0103c4d9bec514c60bb112e-1e82061398b84840-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "59743621-af17-739c-3903-9cb92233ef8b", + "x-ms-content-length": "1024", + "x-ms-date": "Fri, 29 Oct 2021 19:40:26 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-type": "file", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:25 GMT", + "ETag": "\u00220x8D99B13F51FFBE7\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:26 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "59743621-af17-739c-3903-9cb92233ef8b", + "x-ms-file-attributes": "Archive", + "x-ms-file-change-time": "2021-10-29T19:40:26.8833767Z", + "x-ms-file-creation-time": "2021-10-29T19:40:26.8833767Z", + "x-ms-file-id": "11529285414812647424", + "x-ms-file-last-write-time": "2021-10-29T19:40:26.8833767Z", + "x-ms-file-parent-id": "13835128424026341376", + "x-ms-file-permission-key": "13773932323712163591*6706197617703823457", + "x-ms-request-id": "d8bf64bf-901a-0009-50fc-cc22b6000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-d9e5098c-6518-ae76-d73d-14a6e3e374c9/test-directory-d8b2ee12-1c13-cc1c-6490-b90949d324ca/test-file-f2b805cb-797b-bcdf-dd2f-43b2f7289059", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-2e6af23038543c40959f12564be86f46-eb0bac1e8941e444-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "f6695e34-e6ec-a7e9-56b7-7ce76cea7b11", + "x-ms-content-length": "1024", + "x-ms-date": "Fri, 29 Oct 2021 19:40:26 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-type": "file", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:26 GMT", + "ETag": "\u00220x8D99B13F52A83AD\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:26 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "f6695e34-e6ec-a7e9-56b7-7ce76cea7b11", + "x-ms-file-attributes": "Archive", + "x-ms-file-change-time": "2021-10-29T19:40:26.9523885Z", + "x-ms-file-creation-time": "2021-10-29T19:40:26.9523885Z", + "x-ms-file-id": "16140971433240035328", + "x-ms-file-last-write-time": "2021-10-29T19:40:26.9523885Z", + "x-ms-file-parent-id": "13835128424026341376", + "x-ms-file-permission-key": "13773932323712163591*6706197617703823457", + "x-ms-request-id": "d8bf64c0-901a-0009-51fc-cc22b6000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-d9e5098c-6518-ae76-d73d-14a6e3e374c9/test-directory-d8b2ee12-1c13-cc1c-6490-b90949d324ca/test-file-f2b805cb-797b-bcdf-dd2f-43b2f7289059?comp=lease", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-bd80de8603e4d94085b2ba1fe9228950-5d8ae66cf5fd7740-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "aacb66c5-32c4-d249-c069-5d159dafa6b6", + "x-ms-date": "Fri, 29 Oct 2021 19:40:26 GMT", + "x-ms-lease-action": "acquire", + "x-ms-lease-duration": "-1", + "x-ms-proposed-lease-id": "43f34273-628e-ff9d-98d6-493901a0d025", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:26 GMT", + "ETag": "\u00220x8D99B13F52A83AD\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:26 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "aacb66c5-32c4-d249-c069-5d159dafa6b6", + "x-ms-lease-id": "43f34273-628e-ff9d-98d6-493901a0d025", + "x-ms-request-id": "d8bf64c1-901a-0009-52fc-cc22b6000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-d9e5098c-6518-ae76-d73d-14a6e3e374c9/test-directory-d8b2ee12-1c13-cc1c-6490-b90949d324ca/test-file-f2b805cb-797b-bcdf-dd2f-43b2f7289059?comp=rename", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-be0d5f024655674e9f10ec8fd3dff57e-3852b797a6bc9442-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "9a738961-25d4-8761-21ab-d8543c574145", + "x-ms-date": "Fri, 29 Oct 2021 19:40:26 GMT", + "x-ms-file-rename-replace-if-exists": "true", + "x-ms-file-rename-source": "https%3A%2F%2F712xscnapby3pev55a.file.preprod.core.windows.net%2Ftest-share-d9e5098c-6518-ae76-d73d-14a6e3e374c9%2Ftest-directory-d8b2ee12-1c13-cc1c-6490-b90949d324ca%2Ftest-file-4fc84e46-e1d6-8c5d-ffa0-43c6c3622584=", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 412, + "ResponseHeaders": { + "Content-Length": "267", + "Content-Type": "application/xml", + "Date": "Fri, 29 Oct 2021 19:40:26 GMT", + "x-ms-client-request-id": "9a738961-25d4-8761-21ab-d8543c574145", + "x-ms-error-code": "LeaseIdMissing", + "x-ms-request-id": "d8bf64c2-901a-0009-53fc-cc22b6000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [ + "\uFEFF\u003C?xml version=\u00221.0\u0022 encoding=\u0022utf-8\u0022?\u003E\u003CError\u003E\u003CCode\u003ELeaseIdMissing\u003C/Code\u003E\u003CMessage\u003EThere is currently a lease on the file and no lease ID was specified in the request.\n", + "RequestId:d8bf64c2-901a-0009-53fc-cc22b6000000\n", + "Time:2021-10-29T19:40:27.1062496Z\u003C/Message\u003E\u003C/Error\u003E" + ] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-d9e5098c-6518-ae76-d73d-14a6e3e374c9?restype=share", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-3770b86d695dd943b4f6d575ef7a2d50-a26447bcb7f2f749-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "13b44bb9-0c3b-c1e1-f4a6-dfc10afe9c7e", + "x-ms-date": "Fri, 29 Oct 2021 19:40:26 GMT", + "x-ms-delete-snapshots": "include", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:26 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "13b44bb9-0c3b-c1e1-f4a6-dfc10afe9c7e", + "x-ms-request-id": "d8bf64c3-901a-0009-54fc-cc22b6000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + } + ], + "Variables": { + "RandomSeed": "264580652", + "Storage_TestConfigDefault": "ProductionTenant\n712xscnapby3pev55a\nU2FuaXRpemVk\nhttps://712xscnapby3pev55a.blob.preprod.core.windows.net\nhttps://712xscnapby3pev55a.file.preprod.core.windows.net\nhttps://712xscnapby3pev55a.queue.core.windows.net\nhttps://712xscnapby3pev55a.table.core.windows.net\n\n\n\n\nhttps://712xscnapby3pev55a-secondary.blob.core.windows.net\nhttps://712xscnapby3pev55a-secondary.file.core.windows.net\nhttps://712xscnapby3pev55a-secondary.queue.core.windows.net\nhttps://712xscnapby3pev55a-secondary.table.core.windows.net\n\nSanitized\n\n\nCloud\nBlobEndpoint=https://712xscnapby3pev55a.blob.preprod.core.windows.net/;QueueEndpoint=https://712xscnapby3pev55a.queue.core.windows.net/;FileEndpoint=https://712xscnapby3pev55a.file.preprod.core.windows.net/;BlobSecondaryEndpoint=https://712xscnapby3pev55a-secondary.blob.core.windows.net/;QueueSecondaryEndpoint=https://712xscnapby3pev55a-secondary.queue.core.windows.net/;FileSecondaryEndpoint=https://712xscnapby3pev55a-secondary.file.core.windows.net/;AccountName=712xscnapby3pev55a;AccountKey=Kg==;\nscope-1\n\n" + } +} \ No newline at end of file diff --git a/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_DestinationLeaseId(True).json b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_DestinationLeaseId(True).json new file mode 100644 index 000000000000..25e2b202c402 --- /dev/null +++ b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_DestinationLeaseId(True).json @@ -0,0 +1,305 @@ +{ + "Entries": [ + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-95617b6b-ce57-e413-8d23-760672b0c40b?restype=share", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-fcf756b1f76ffd4cbf2966014c2174c3-01b3c7abf8e9e94a-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "92d2a16c-811e-25b3-cb9f-84a876dddf19", + "x-ms-date": "Fri, 29 Oct 2021 19:40:20 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:20 GMT", + "ETag": "\u00220x8D99B13F1D5A931\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:21 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "92d2a16c-811e-25b3-cb9f-84a876dddf19", + "x-ms-request-id": "d8bf646a-901a-0009-09fc-cc22b6000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-95617b6b-ce57-e413-8d23-760672b0c40b/test-directory-1964ea5d-b890-0c68-8ea1-0e4289b980d1?restype=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-0d73ae89629ca040bc549330719cc54b-f996dc9769b3674a-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "7afc2b35-fc56-b3ff-39c5-037d73719b11", + "x-ms-date": "Fri, 29 Oct 2021 19:40:20 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:20 GMT", + "ETag": "\u00220x8D99B13F1E605E3\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:21 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "7afc2b35-fc56-b3ff-39c5-037d73719b11", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-10-29T19:40:21.4703587Z", + "x-ms-file-creation-time": "2021-10-29T19:40:21.4703587Z", + "x-ms-file-id": "13835128424026341376", + "x-ms-file-last-write-time": "2021-10-29T19:40:21.4703587Z", + "x-ms-file-parent-id": "0", + "x-ms-file-permission-key": "15110104144358886944*6706197617703823457", + "x-ms-request-id": "d8bf646c-901a-0009-0afc-cc22b6000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-95617b6b-ce57-e413-8d23-760672b0c40b/test-directory-1964ea5d-b890-0c68-8ea1-0e4289b980d1/test-file-8f9ab31f-0e42-2b3a-fda5-281cd8063149", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-44010a4cf006c1469f6f65ec3aac70d4-26cefea2401b5d47-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "2742ced8-baaa-2667-f0d0-7cb1d3e2da32", + "x-ms-content-length": "1024", + "x-ms-date": "Fri, 29 Oct 2021 19:40:20 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-type": "file", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:20 GMT", + "ETag": "\u00220x8D99B13F1F2B07F\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:21 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "2742ced8-baaa-2667-f0d0-7cb1d3e2da32", + "x-ms-file-attributes": "Archive", + "x-ms-file-change-time": "2021-10-29T19:40:21.5533695Z", + "x-ms-file-creation-time": "2021-10-29T19:40:21.5533695Z", + "x-ms-file-id": "11529285414812647424", + "x-ms-file-last-write-time": "2021-10-29T19:40:21.5533695Z", + "x-ms-file-parent-id": "13835128424026341376", + "x-ms-file-permission-key": "13773932323712163591*6706197617703823457", + "x-ms-request-id": "d8bf646d-901a-0009-0bfc-cc22b6000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-95617b6b-ce57-e413-8d23-760672b0c40b/test-directory-1964ea5d-b890-0c68-8ea1-0e4289b980d1/test-file-0f26ba94-3d64-1954-3888-a85b7622fd8f", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-271f25607e10ea4fa4e54ecb0e8b96ef-dc2fd48386375342-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "7384650c-3d48-9a1b-7a28-ef22110cb0ce", + "x-ms-content-length": "1024", + "x-ms-date": "Fri, 29 Oct 2021 19:40:20 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-type": "file", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:20 GMT", + "ETag": "\u00220x8D99B13F1FD5D1E\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:21 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "7384650c-3d48-9a1b-7a28-ef22110cb0ce", + "x-ms-file-attributes": "Archive", + "x-ms-file-change-time": "2021-10-29T19:40:21.6233246Z", + "x-ms-file-creation-time": "2021-10-29T19:40:21.6233246Z", + "x-ms-file-id": "16140971433240035328", + "x-ms-file-last-write-time": "2021-10-29T19:40:21.6233246Z", + "x-ms-file-parent-id": "13835128424026341376", + "x-ms-file-permission-key": "13773932323712163591*6706197617703823457", + "x-ms-request-id": "d8bf646e-901a-0009-0cfc-cc22b6000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-95617b6b-ce57-e413-8d23-760672b0c40b/test-directory-1964ea5d-b890-0c68-8ea1-0e4289b980d1/test-file-0f26ba94-3d64-1954-3888-a85b7622fd8f?comp=lease", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-56545b3aa04d9e4498611423d6afe54b-1861fd727df07b4e-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "9c1a9e35-136f-3c65-f8fa-56be2a9cc913", + "x-ms-date": "Fri, 29 Oct 2021 19:40:20 GMT", + "x-ms-lease-action": "acquire", + "x-ms-lease-duration": "-1", + "x-ms-proposed-lease-id": "2a59ecd2-d09f-896d-1c89-127ed1678f6f", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:20 GMT", + "ETag": "\u00220x8D99B13F1FD5D1E\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:21 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "9c1a9e35-136f-3c65-f8fa-56be2a9cc913", + "x-ms-lease-id": "2a59ecd2-d09f-896d-1c89-127ed1678f6f", + "x-ms-request-id": "d8bf646f-901a-0009-0dfc-cc22b6000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-95617b6b-ce57-e413-8d23-760672b0c40b/test-directory-1964ea5d-b890-0c68-8ea1-0e4289b980d1/test-file-0f26ba94-3d64-1954-3888-a85b7622fd8f?comp=rename", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-00e50e7431cf014c805c05b21c7ebd5a-89b4ee0d6c7ea443-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "324922fe-f34c-36ff-3e11-18a43388f1f1", + "x-ms-date": "Fri, 29 Oct 2021 19:40:20 GMT", + "x-ms-destination-lease-id": "2a59ecd2-d09f-896d-1c89-127ed1678f6f", + "x-ms-file-rename-replace-if-exists": "true", + "x-ms-file-rename-source": "https%3A%2F%2F712xscnapby3pev55a.file.preprod.core.windows.net%2Ftest-share-95617b6b-ce57-e413-8d23-760672b0c40b%2Ftest-directory-1964ea5d-b890-0c68-8ea1-0e4289b980d1%2Ftest-file-8f9ab31f-0e42-2b3a-fda5-281cd8063149=", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:21 GMT", + "ETag": "\u00220x8D99B13F214DD07\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:21 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "324922fe-f34c-36ff-3e11-18a43388f1f1", + "x-ms-file-attributes": "Archive", + "x-ms-file-change-time": "2021-10-29T19:40:21.7773319Z", + "x-ms-file-creation-time": "2021-10-29T19:40:21.5533695Z", + "x-ms-file-id": "11529285414812647424", + "x-ms-file-last-write-time": "2021-10-29T19:40:21.5533695Z", + "x-ms-file-parent-id": "13835128424026341376", + "x-ms-file-permission-key": "13773932323712163591*6706197617703823457", + "x-ms-request-id": "d8bf6470-901a-0009-0efc-cc22b6000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-95617b6b-ce57-e413-8d23-760672b0c40b/test-directory-1964ea5d-b890-0c68-8ea1-0e4289b980d1/test-file-0f26ba94-3d64-1954-3888-a85b7622fd8f", + "RequestMethod": "HEAD", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "07bfb68b-9753-a5c6-80a1-2fac878b151c", + "x-ms-date": "Fri, 29 Oct 2021 19:40:21 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Length": "1024", + "Content-Type": "application/octet-stream", + "Date": "Fri, 29 Oct 2021 19:40:21 GMT", + "ETag": "\u00220x8D99B13F214DD07\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:21 GMT", + "x-ms-client-request-id": "07bfb68b-9753-a5c6-80a1-2fac878b151c", + "x-ms-file-attributes": "Archive", + "x-ms-file-change-time": "2021-10-29T19:40:21.7773319Z", + "x-ms-file-creation-time": "2021-10-29T19:40:21.5533695Z", + "x-ms-file-id": "11529285414812647424", + "x-ms-file-last-write-time": "2021-10-29T19:40:21.5533695Z", + "x-ms-file-parent-id": "13835128424026341376", + "x-ms-file-permission-key": "13773932323712163591*6706197617703823457", + "x-ms-lease-state": "available", + "x-ms-lease-status": "unlocked", + "x-ms-request-id": "d8bf6471-901a-0009-0ffc-cc22b6000000", + "x-ms-server-encrypted": "false", + "x-ms-type": "File", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-95617b6b-ce57-e413-8d23-760672b0c40b?restype=share", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-db4775bb5c4787458c889d4c9a5604c8-9d7d7608f8c7c740-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "7c18f216-e9c9-479e-b55c-1b02ed850de3", + "x-ms-date": "Fri, 29 Oct 2021 19:40:21 GMT", + "x-ms-delete-snapshots": "include", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:21 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "7c18f216-e9c9-479e-b55c-1b02ed850de3", + "x-ms-request-id": "d8bf6472-901a-0009-10fc-cc22b6000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + } + ], + "Variables": { + "RandomSeed": "772689135", + "Storage_TestConfigDefault": "ProductionTenant\n712xscnapby3pev55a\nU2FuaXRpemVk\nhttps://712xscnapby3pev55a.blob.preprod.core.windows.net\nhttps://712xscnapby3pev55a.file.preprod.core.windows.net\nhttps://712xscnapby3pev55a.queue.core.windows.net\nhttps://712xscnapby3pev55a.table.core.windows.net\n\n\n\n\nhttps://712xscnapby3pev55a-secondary.blob.core.windows.net\nhttps://712xscnapby3pev55a-secondary.file.core.windows.net\nhttps://712xscnapby3pev55a-secondary.queue.core.windows.net\nhttps://712xscnapby3pev55a-secondary.table.core.windows.net\n\nSanitized\n\n\nCloud\nBlobEndpoint=https://712xscnapby3pev55a.blob.preprod.core.windows.net/;QueueEndpoint=https://712xscnapby3pev55a.queue.core.windows.net/;FileEndpoint=https://712xscnapby3pev55a.file.preprod.core.windows.net/;BlobSecondaryEndpoint=https://712xscnapby3pev55a-secondary.blob.core.windows.net/;QueueSecondaryEndpoint=https://712xscnapby3pev55a-secondary.queue.core.windows.net/;FileSecondaryEndpoint=https://712xscnapby3pev55a-secondary.file.core.windows.net/;AccountName=712xscnapby3pev55a;AccountKey=Kg==;\nscope-1\n\n" + } +} \ No newline at end of file diff --git a/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_DestinationLeaseId(True)Async.json b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_DestinationLeaseId(True)Async.json new file mode 100644 index 000000000000..64540d3f1959 --- /dev/null +++ b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_DestinationLeaseId(True)Async.json @@ -0,0 +1,305 @@ +{ + "Entries": [ + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-df6080d5-5f89-6fc0-5817-64b7462b2cc4?restype=share", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-13fc488cdddcfe41aae933cbe4680146-dd1a4042039fca46-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "37e524d5-1d81-64b0-51d8-7e3851379d37", + "x-ms-date": "Fri, 29 Oct 2021 19:40:25 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:25 GMT", + "ETag": "\u00220x8D99B13F4A878F4\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:26 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "37e524d5-1d81-64b0-51d8-7e3851379d37", + "x-ms-request-id": "d8bf64b3-901a-0009-46fc-cc22b6000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-df6080d5-5f89-6fc0-5817-64b7462b2cc4/test-directory-2ca693a4-eda4-ceb2-7d09-fda47fef5997?restype=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-1a789f0981167e4b968a22ca2ad639e4-d4c62604a70ded47-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "822da947-671a-e8d8-7217-ba77200be561", + "x-ms-date": "Fri, 29 Oct 2021 19:40:25 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:25 GMT", + "ETag": "\u00220x8D99B13F4B68BB1\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:26 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "822da947-671a-e8d8-7217-ba77200be561", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-10-29T19:40:26.1923761Z", + "x-ms-file-creation-time": "2021-10-29T19:40:26.1923761Z", + "x-ms-file-id": "13835128424026341376", + "x-ms-file-last-write-time": "2021-10-29T19:40:26.1923761Z", + "x-ms-file-parent-id": "0", + "x-ms-file-permission-key": "15110104144358886944*6706197617703823457", + "x-ms-request-id": "d8bf64b5-901a-0009-47fc-cc22b6000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-df6080d5-5f89-6fc0-5817-64b7462b2cc4/test-directory-2ca693a4-eda4-ceb2-7d09-fda47fef5997/test-file-68b4e67f-7c55-aff1-5006-0e0d85e745b2", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-05aefca1186b3f4790f1d9acc436b4ca-0e2fafb9979c3c4d-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "a24b05b0-9c16-ca55-b77d-311358ca628b", + "x-ms-content-length": "1024", + "x-ms-date": "Fri, 29 Oct 2021 19:40:25 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-type": "file", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:25 GMT", + "ETag": "\u00220x8D99B13F4C2C113\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:26 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "a24b05b0-9c16-ca55-b77d-311358ca628b", + "x-ms-file-attributes": "Archive", + "x-ms-file-change-time": "2021-10-29T19:40:26.2723859Z", + "x-ms-file-creation-time": "2021-10-29T19:40:26.2723859Z", + "x-ms-file-id": "11529285414812647424", + "x-ms-file-last-write-time": "2021-10-29T19:40:26.2723859Z", + "x-ms-file-parent-id": "13835128424026341376", + "x-ms-file-permission-key": "13773932323712163591*6706197617703823457", + "x-ms-request-id": "d8bf64b6-901a-0009-48fc-cc22b6000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-df6080d5-5f89-6fc0-5817-64b7462b2cc4/test-directory-2ca693a4-eda4-ceb2-7d09-fda47fef5997/test-file-ce7207d1-0fae-a89f-6897-585bcec27484", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-e0ce2a634e2a5541ac2ef9b5a5fe6d0d-b6c140546bf2d247-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "335d2397-b058-a064-65a3-397e43fafcf4", + "x-ms-content-length": "1024", + "x-ms-date": "Fri, 29 Oct 2021 19:40:25 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-type": "file", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:25 GMT", + "ETag": "\u00220x8D99B13F4CDBDA7\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:26 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "335d2397-b058-a064-65a3-397e43fafcf4", + "x-ms-file-attributes": "Archive", + "x-ms-file-change-time": "2021-10-29T19:40:26.3443879Z", + "x-ms-file-creation-time": "2021-10-29T19:40:26.3443879Z", + "x-ms-file-id": "16140971433240035328", + "x-ms-file-last-write-time": "2021-10-29T19:40:26.3443879Z", + "x-ms-file-parent-id": "13835128424026341376", + "x-ms-file-permission-key": "13773932323712163591*6706197617703823457", + "x-ms-request-id": "d8bf64b7-901a-0009-49fc-cc22b6000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-df6080d5-5f89-6fc0-5817-64b7462b2cc4/test-directory-2ca693a4-eda4-ceb2-7d09-fda47fef5997/test-file-ce7207d1-0fae-a89f-6897-585bcec27484?comp=lease", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-3137c2b6b4fb7244a0d4c17b86f04894-67861fe719ec5749-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "f83b2996-67df-b4d9-342f-c84dde48b00a", + "x-ms-date": "Fri, 29 Oct 2021 19:40:25 GMT", + "x-ms-lease-action": "acquire", + "x-ms-lease-duration": "-1", + "x-ms-proposed-lease-id": "5d8bac09-e26c-2def-6a0b-d21bf05b02fd", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:25 GMT", + "ETag": "\u00220x8D99B13F4CDBDA7\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:26 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "f83b2996-67df-b4d9-342f-c84dde48b00a", + "x-ms-lease-id": "5d8bac09-e26c-2def-6a0b-d21bf05b02fd", + "x-ms-request-id": "d8bf64b8-901a-0009-4afc-cc22b6000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-df6080d5-5f89-6fc0-5817-64b7462b2cc4/test-directory-2ca693a4-eda4-ceb2-7d09-fda47fef5997/test-file-ce7207d1-0fae-a89f-6897-585bcec27484?comp=rename", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-c284d32fc8ffd7499a89b9e291095271-9ee9ae8a3097694c-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "c785d1e7-0a20-6b1e-390f-763679def94e", + "x-ms-date": "Fri, 29 Oct 2021 19:40:25 GMT", + "x-ms-destination-lease-id": "5d8bac09-e26c-2def-6a0b-d21bf05b02fd", + "x-ms-file-rename-replace-if-exists": "true", + "x-ms-file-rename-source": "https%3A%2F%2F712xscnapby3pev55a.file.preprod.core.windows.net%2Ftest-share-df6080d5-5f89-6fc0-5817-64b7462b2cc4%2Ftest-directory-2ca693a4-eda4-ceb2-7d09-fda47fef5997%2Ftest-file-68b4e67f-7c55-aff1-5006-0e0d85e745b2=", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:25 GMT", + "ETag": "\u00220x8D99B13F4E53CED\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:26 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "c785d1e7-0a20-6b1e-390f-763679def94e", + "x-ms-file-attributes": "Archive", + "x-ms-file-change-time": "2021-10-29T19:40:26.4983789Z", + "x-ms-file-creation-time": "2021-10-29T19:40:26.2723859Z", + "x-ms-file-id": "11529285414812647424", + "x-ms-file-last-write-time": "2021-10-29T19:40:26.2723859Z", + "x-ms-file-parent-id": "13835128424026341376", + "x-ms-file-permission-key": "13773932323712163591*6706197617703823457", + "x-ms-request-id": "d8bf64b9-901a-0009-4bfc-cc22b6000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-df6080d5-5f89-6fc0-5817-64b7462b2cc4/test-directory-2ca693a4-eda4-ceb2-7d09-fda47fef5997/test-file-ce7207d1-0fae-a89f-6897-585bcec27484", + "RequestMethod": "HEAD", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "0d667b6b-e8c3-95e9-1d40-f627db584ea2", + "x-ms-date": "Fri, 29 Oct 2021 19:40:25 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Length": "1024", + "Content-Type": "application/octet-stream", + "Date": "Fri, 29 Oct 2021 19:40:25 GMT", + "ETag": "\u00220x8D99B13F4E53CED\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:26 GMT", + "x-ms-client-request-id": "0d667b6b-e8c3-95e9-1d40-f627db584ea2", + "x-ms-file-attributes": "Archive", + "x-ms-file-change-time": "2021-10-29T19:40:26.4983789Z", + "x-ms-file-creation-time": "2021-10-29T19:40:26.2723859Z", + "x-ms-file-id": "11529285414812647424", + "x-ms-file-last-write-time": "2021-10-29T19:40:26.2723859Z", + "x-ms-file-parent-id": "13835128424026341376", + "x-ms-file-permission-key": "13773932323712163591*6706197617703823457", + "x-ms-lease-state": "available", + "x-ms-lease-status": "unlocked", + "x-ms-request-id": "d8bf64ba-901a-0009-4cfc-cc22b6000000", + "x-ms-server-encrypted": "false", + "x-ms-type": "File", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-df6080d5-5f89-6fc0-5817-64b7462b2cc4?restype=share", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-1479f7c14061444fabbbb00ef8bf92b3-2a07e0af82d8c64e-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "fdcb3822-ec78-238b-26c2-1131fca26942", + "x-ms-date": "Fri, 29 Oct 2021 19:40:25 GMT", + "x-ms-delete-snapshots": "include", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:25 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "fdcb3822-ec78-238b-26c2-1131fca26942", + "x-ms-request-id": "d8bf64bb-901a-0009-4dfc-cc22b6000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + } + ], + "Variables": { + "RandomSeed": "671986073", + "Storage_TestConfigDefault": "ProductionTenant\n712xscnapby3pev55a\nU2FuaXRpemVk\nhttps://712xscnapby3pev55a.blob.preprod.core.windows.net\nhttps://712xscnapby3pev55a.file.preprod.core.windows.net\nhttps://712xscnapby3pev55a.queue.core.windows.net\nhttps://712xscnapby3pev55a.table.core.windows.net\n\n\n\n\nhttps://712xscnapby3pev55a-secondary.blob.core.windows.net\nhttps://712xscnapby3pev55a-secondary.file.core.windows.net\nhttps://712xscnapby3pev55a-secondary.queue.core.windows.net\nhttps://712xscnapby3pev55a-secondary.table.core.windows.net\n\nSanitized\n\n\nCloud\nBlobEndpoint=https://712xscnapby3pev55a.blob.preprod.core.windows.net/;QueueEndpoint=https://712xscnapby3pev55a.queue.core.windows.net/;FileEndpoint=https://712xscnapby3pev55a.file.preprod.core.windows.net/;BlobSecondaryEndpoint=https://712xscnapby3pev55a-secondary.blob.core.windows.net/;QueueSecondaryEndpoint=https://712xscnapby3pev55a-secondary.queue.core.windows.net/;FileSecondaryEndpoint=https://712xscnapby3pev55a-secondary.file.core.windows.net/;AccountName=712xscnapby3pev55a;AccountKey=Kg==;\nscope-1\n\n" + } +} \ No newline at end of file diff --git a/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_DifferentDirectory.json b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_DifferentDirectory.json new file mode 100644 index 000000000000..714c57627755 --- /dev/null +++ b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_DifferentDirectory.json @@ -0,0 +1,268 @@ +{ + "Entries": [ + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-0c782533-e330-2cf1-24fa-c1844c51c45c?restype=share", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-02351affb29bdd4d8505f1796f8d4ea5-5f8f78d580f17b46-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "b55df427-a119-8bea-b073-c4bd4fb0fe34", + "x-ms-date": "Fri, 29 Oct 2021 19:40:24 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:24 GMT", + "ETag": "\u00220x8D99B13F4107F2E\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:25 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "b55df427-a119-8bea-b073-c4bd4fb0fe34", + "x-ms-request-id": "d8bf64a2-901a-0009-39fc-cc22b6000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-0c782533-e330-2cf1-24fa-c1844c51c45c/test-directory-781be9fa-6451-4916-28a2-ea887e47c5c8?restype=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-f1ce2a1cbef8b54498ed9027d61f1c4d-9fa6dd649247c842-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "7db030a9-a541-c385-dd14-8d76b6620d69", + "x-ms-date": "Fri, 29 Oct 2021 19:40:24 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:24 GMT", + "ETag": "\u00220x8D99B13F421C6E8\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:25 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "7db030a9-a541-c385-dd14-8d76b6620d69", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-10-29T19:40:25.2174056Z", + "x-ms-file-creation-time": "2021-10-29T19:40:25.2174056Z", + "x-ms-file-id": "13835128424026341376", + "x-ms-file-last-write-time": "2021-10-29T19:40:25.2174056Z", + "x-ms-file-parent-id": "0", + "x-ms-file-permission-key": "15110104144358886944*6706197617703823457", + "x-ms-request-id": "d8bf64a4-901a-0009-3afc-cc22b6000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-0c782533-e330-2cf1-24fa-c1844c51c45c/test-directory-781be9fa-6451-4916-28a2-ea887e47c5c8/test-file-63e0fbae-a653-eb40-a66c-76eba94023e7", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-7d01776e1206824ba090899a6c2dd2b5-0c87372afc7e4a47-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "29285157-235f-031d-efc4-d6d42f99199d", + "x-ms-content-length": "1024", + "x-ms-date": "Fri, 29 Oct 2021 19:40:24 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-type": "file", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:24 GMT", + "ETag": "\u00220x8D99B13F42D5E04\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:25 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "29285157-235f-031d-efc4-d6d42f99199d", + "x-ms-file-attributes": "Archive", + "x-ms-file-change-time": "2021-10-29T19:40:25.2933636Z", + "x-ms-file-creation-time": "2021-10-29T19:40:25.2933636Z", + "x-ms-file-id": "11529285414812647424", + "x-ms-file-last-write-time": "2021-10-29T19:40:25.2933636Z", + "x-ms-file-parent-id": "13835128424026341376", + "x-ms-file-permission-key": "13773932323712163591*6706197617703823457", + "x-ms-request-id": "d8bf64a5-901a-0009-3bfc-cc22b6000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-0c782533-e330-2cf1-24fa-c1844c51c45c/test-directory-3c5aa5f1-bf82-66d2-74a9-fdb92b6169da?restype=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-1981ce61534f21449b1579166df85013-a9325f7c47641c4f-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "dceedd80-bb72-981d-7fc1-b4b62564d78d", + "x-ms-date": "Fri, 29 Oct 2021 19:40:24 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:24 GMT", + "ETag": "\u00220x8D99B13F4380DA6\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:25 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "dceedd80-bb72-981d-7fc1-b4b62564d78d", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-10-29T19:40:25.3633958Z", + "x-ms-file-creation-time": "2021-10-29T19:40:25.3633958Z", + "x-ms-file-id": "16140971433240035328", + "x-ms-file-last-write-time": "2021-10-29T19:40:25.3633958Z", + "x-ms-file-parent-id": "0", + "x-ms-file-permission-key": "15110104144358886944*6706197617703823457", + "x-ms-request-id": "d8bf64a6-901a-0009-3cfc-cc22b6000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-0c782533-e330-2cf1-24fa-c1844c51c45c/test-directory-3c5aa5f1-bf82-66d2-74a9-fdb92b6169da/test-file-595ffc5a-c006-f785-1d61-e0a661fff6c2?comp=rename", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-38c8882a831bb244997ad52c4ab8c944-782abfa20763c94d-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "7377d004-ae52-c0c6-58f6-bf10da76367f", + "x-ms-date": "Fri, 29 Oct 2021 19:40:24 GMT", + "x-ms-file-rename-source": "https%3A%2F%2F712xscnapby3pev55a.file.preprod.core.windows.net%2Ftest-share-0c782533-e330-2cf1-24fa-c1844c51c45c%2Ftest-directory-781be9fa-6451-4916-28a2-ea887e47c5c8%2Ftest-file-63e0fbae-a653-eb40-a66c-76eba94023e7=", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:24 GMT", + "ETag": "\u00220x8D99B13F442BB14\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:25 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "7377d004-ae52-c0c6-58f6-bf10da76367f", + "x-ms-file-attributes": "Archive", + "x-ms-file-change-time": "2021-10-29T19:40:25.4333716Z", + "x-ms-file-creation-time": "2021-10-29T19:40:25.2933636Z", + "x-ms-file-id": "11529285414812647424", + "x-ms-file-last-write-time": "2021-10-29T19:40:25.2933636Z", + "x-ms-file-parent-id": "16140971433240035328", + "x-ms-file-permission-key": "13773932323712163591*6706197617703823457", + "x-ms-request-id": "d8bf64a7-901a-0009-3dfc-cc22b6000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-0c782533-e330-2cf1-24fa-c1844c51c45c/test-directory-3c5aa5f1-bf82-66d2-74a9-fdb92b6169da/test-file-595ffc5a-c006-f785-1d61-e0a661fff6c2", + "RequestMethod": "HEAD", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "90a2e88d-8288-f26f-6b77-f57cce57df41", + "x-ms-date": "Fri, 29 Oct 2021 19:40:24 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Length": "1024", + "Content-Type": "application/octet-stream", + "Date": "Fri, 29 Oct 2021 19:40:24 GMT", + "ETag": "\u00220x8D99B13F442BB14\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:25 GMT", + "x-ms-client-request-id": "90a2e88d-8288-f26f-6b77-f57cce57df41", + "x-ms-file-attributes": "Archive", + "x-ms-file-change-time": "2021-10-29T19:40:25.4333716Z", + "x-ms-file-creation-time": "2021-10-29T19:40:25.2933636Z", + "x-ms-file-id": "11529285414812647424", + "x-ms-file-last-write-time": "2021-10-29T19:40:25.2933636Z", + "x-ms-file-parent-id": "16140971433240035328", + "x-ms-file-permission-key": "13773932323712163591*6706197617703823457", + "x-ms-lease-state": "available", + "x-ms-lease-status": "unlocked", + "x-ms-request-id": "d8bf64a8-901a-0009-3efc-cc22b6000000", + "x-ms-server-encrypted": "false", + "x-ms-type": "File", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-0c782533-e330-2cf1-24fa-c1844c51c45c?restype=share", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-56ceb59cc0984f43a379273a66f1e9f4-e2a06bbc69e6b748-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "f1827342-a6d4-47f7-8222-88b3949dfe3d", + "x-ms-date": "Fri, 29 Oct 2021 19:40:24 GMT", + "x-ms-delete-snapshots": "include", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:24 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "f1827342-a6d4-47f7-8222-88b3949dfe3d", + "x-ms-request-id": "d8bf64a9-901a-0009-3ffc-cc22b6000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + } + ], + "Variables": { + "RandomSeed": "1245828578", + "Storage_TestConfigDefault": "ProductionTenant\n712xscnapby3pev55a\nU2FuaXRpemVk\nhttps://712xscnapby3pev55a.blob.preprod.core.windows.net\nhttps://712xscnapby3pev55a.file.preprod.core.windows.net\nhttps://712xscnapby3pev55a.queue.core.windows.net\nhttps://712xscnapby3pev55a.table.core.windows.net\n\n\n\n\nhttps://712xscnapby3pev55a-secondary.blob.core.windows.net\nhttps://712xscnapby3pev55a-secondary.file.core.windows.net\nhttps://712xscnapby3pev55a-secondary.queue.core.windows.net\nhttps://712xscnapby3pev55a-secondary.table.core.windows.net\n\nSanitized\n\n\nCloud\nBlobEndpoint=https://712xscnapby3pev55a.blob.preprod.core.windows.net/;QueueEndpoint=https://712xscnapby3pev55a.queue.core.windows.net/;FileEndpoint=https://712xscnapby3pev55a.file.preprod.core.windows.net/;BlobSecondaryEndpoint=https://712xscnapby3pev55a-secondary.blob.core.windows.net/;QueueSecondaryEndpoint=https://712xscnapby3pev55a-secondary.queue.core.windows.net/;FileSecondaryEndpoint=https://712xscnapby3pev55a-secondary.file.core.windows.net/;AccountName=712xscnapby3pev55a;AccountKey=Kg==;\nscope-1\n\n" + } +} \ No newline at end of file diff --git a/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_DifferentDirectoryAsync.json b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_DifferentDirectoryAsync.json new file mode 100644 index 000000000000..f6de379165b8 --- /dev/null +++ b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_DifferentDirectoryAsync.json @@ -0,0 +1,268 @@ +{ + "Entries": [ + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-29aaf7ca-82d4-9a94-a586-d411dd62b5cc?restype=share", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-035b5d7b0ce54147b5b5817995a0493d-2e762ea194f0ba45-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "1bc5a5fe-b1d7-1fa6-01ea-c1a4d445af63", + "x-ms-date": "Fri, 29 Oct 2021 19:40:29 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:29 GMT", + "ETag": "\u00220x8D99B13F6EF8391\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:29 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "1bc5a5fe-b1d7-1fa6-01ea-c1a4d445af63", + "x-ms-request-id": "d8bf64ec-901a-0009-76fc-cc22b6000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-29aaf7ca-82d4-9a94-a586-d411dd62b5cc/test-directory-bce233bc-0121-5a20-e737-adc540457ece?restype=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-c8c06944423a53429125e446801211ad-c8a2e87b18af2640-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "e792de5f-e0f4-fc99-846b-339f03e0debb", + "x-ms-date": "Fri, 29 Oct 2021 19:40:29 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:30 GMT", + "ETag": "\u00220x8D99B13F701B5E1\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:30 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "e792de5f-e0f4-fc99-846b-339f03e0debb", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-10-29T19:40:30.0404193Z", + "x-ms-file-creation-time": "2021-10-29T19:40:30.0404193Z", + "x-ms-file-id": "13835128424026341376", + "x-ms-file-last-write-time": "2021-10-29T19:40:30.0404193Z", + "x-ms-file-parent-id": "0", + "x-ms-file-permission-key": "15110104144358886944*6706197617703823457", + "x-ms-request-id": "d8bf64ee-901a-0009-77fc-cc22b6000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-29aaf7ca-82d4-9a94-a586-d411dd62b5cc/test-directory-bce233bc-0121-5a20-e737-adc540457ece/test-file-b9baf36b-7732-22c6-3e91-d15c8affac7d", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-04fd1b9ebe0f334b9c6ee1865202f88a-087b506bf65b7f4f-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "bbb5bbe6-e5af-e704-1870-a9630f3c7284", + "x-ms-content-length": "1024", + "x-ms-date": "Fri, 29 Oct 2021 19:40:29 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-type": "file", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:30 GMT", + "ETag": "\u00220x8D99B13F70E86EA\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:30 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "bbb5bbe6-e5af-e704-1870-a9630f3c7284", + "x-ms-file-attributes": "Archive", + "x-ms-file-change-time": "2021-10-29T19:40:30.1244138Z", + "x-ms-file-creation-time": "2021-10-29T19:40:30.1244138Z", + "x-ms-file-id": "11529285414812647424", + "x-ms-file-last-write-time": "2021-10-29T19:40:30.1244138Z", + "x-ms-file-parent-id": "13835128424026341376", + "x-ms-file-permission-key": "13773932323712163591*6706197617703823457", + "x-ms-request-id": "d8bf64ef-901a-0009-78fc-cc22b6000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-29aaf7ca-82d4-9a94-a586-d411dd62b5cc/test-directory-8c06b6be-7c7a-d408-19b1-381bc394bbe8?restype=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-e64eb76834cc314eb8e1b369d52c816c-1f176a3fd1164545-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "b0722fa4-c24f-6a90-b3e0-a1feace82483", + "x-ms-date": "Fri, 29 Oct 2021 19:40:29 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:30 GMT", + "ETag": "\u00220x8D99B13F718E762\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:30 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "b0722fa4-c24f-6a90-b3e0-a1feace82483", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-10-29T19:40:30.1924194Z", + "x-ms-file-creation-time": "2021-10-29T19:40:30.1924194Z", + "x-ms-file-id": "16140971433240035328", + "x-ms-file-last-write-time": "2021-10-29T19:40:30.1924194Z", + "x-ms-file-parent-id": "0", + "x-ms-file-permission-key": "15110104144358886944*6706197617703823457", + "x-ms-request-id": "d8bf64f0-901a-0009-79fc-cc22b6000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-29aaf7ca-82d4-9a94-a586-d411dd62b5cc/test-directory-8c06b6be-7c7a-d408-19b1-381bc394bbe8/test-file-4820c1b4-a3c6-cd39-e852-19fb31c6e7a2?comp=rename", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-95b6179f0e879644ace8e550570e07ed-4b52fc1cc35c9749-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "2c8dc65a-b256-007e-f5a5-c7fda99438ec", + "x-ms-date": "Fri, 29 Oct 2021 19:40:29 GMT", + "x-ms-file-rename-source": "https%3A%2F%2F712xscnapby3pev55a.file.preprod.core.windows.net%2Ftest-share-29aaf7ca-82d4-9a94-a586-d411dd62b5cc%2Ftest-directory-bce233bc-0121-5a20-e737-adc540457ece%2Ftest-file-b9baf36b-7732-22c6-3e91-d15c8affac7d=", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:30 GMT", + "ETag": "\u00220x8D99B13F7239591\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:30 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "2c8dc65a-b256-007e-f5a5-c7fda99438ec", + "x-ms-file-attributes": "Archive", + "x-ms-file-change-time": "2021-10-29T19:40:30.2624145Z", + "x-ms-file-creation-time": "2021-10-29T19:40:30.1244138Z", + "x-ms-file-id": "11529285414812647424", + "x-ms-file-last-write-time": "2021-10-29T19:40:30.1244138Z", + "x-ms-file-parent-id": "16140971433240035328", + "x-ms-file-permission-key": "13773932323712163591*6706197617703823457", + "x-ms-request-id": "d8bf64f1-901a-0009-7afc-cc22b6000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-29aaf7ca-82d4-9a94-a586-d411dd62b5cc/test-directory-8c06b6be-7c7a-d408-19b1-381bc394bbe8/test-file-4820c1b4-a3c6-cd39-e852-19fb31c6e7a2", + "RequestMethod": "HEAD", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "6ba18e4b-bb39-044c-7577-9f7c439bd7a2", + "x-ms-date": "Fri, 29 Oct 2021 19:40:29 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Length": "1024", + "Content-Type": "application/octet-stream", + "Date": "Fri, 29 Oct 2021 19:40:30 GMT", + "ETag": "\u00220x8D99B13F7239591\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:30 GMT", + "x-ms-client-request-id": "6ba18e4b-bb39-044c-7577-9f7c439bd7a2", + "x-ms-file-attributes": "Archive", + "x-ms-file-change-time": "2021-10-29T19:40:30.2624145Z", + "x-ms-file-creation-time": "2021-10-29T19:40:30.1244138Z", + "x-ms-file-id": "11529285414812647424", + "x-ms-file-last-write-time": "2021-10-29T19:40:30.1244138Z", + "x-ms-file-parent-id": "16140971433240035328", + "x-ms-file-permission-key": "13773932323712163591*6706197617703823457", + "x-ms-lease-state": "available", + "x-ms-lease-status": "unlocked", + "x-ms-request-id": "d8bf64f2-901a-0009-7bfc-cc22b6000000", + "x-ms-server-encrypted": "false", + "x-ms-type": "File", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-29aaf7ca-82d4-9a94-a586-d411dd62b5cc?restype=share", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-91e2b63ad608f24c9a2e7ed734584ea0-4f3ed3e2d8f7d743-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "1ab1ae27-cdf3-3db2-b243-43f9f0e4658d", + "x-ms-date": "Fri, 29 Oct 2021 19:40:29 GMT", + "x-ms-delete-snapshots": "include", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:30 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "1ab1ae27-cdf3-3db2-b243-43f9f0e4658d", + "x-ms-request-id": "d8bf64f3-901a-0009-7cfc-cc22b6000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + } + ], + "Variables": { + "RandomSeed": "718657613", + "Storage_TestConfigDefault": "ProductionTenant\n712xscnapby3pev55a\nU2FuaXRpemVk\nhttps://712xscnapby3pev55a.blob.preprod.core.windows.net\nhttps://712xscnapby3pev55a.file.preprod.core.windows.net\nhttps://712xscnapby3pev55a.queue.core.windows.net\nhttps://712xscnapby3pev55a.table.core.windows.net\n\n\n\n\nhttps://712xscnapby3pev55a-secondary.blob.core.windows.net\nhttps://712xscnapby3pev55a-secondary.file.core.windows.net\nhttps://712xscnapby3pev55a-secondary.queue.core.windows.net\nhttps://712xscnapby3pev55a-secondary.table.core.windows.net\n\nSanitized\n\n\nCloud\nBlobEndpoint=https://712xscnapby3pev55a.blob.preprod.core.windows.net/;QueueEndpoint=https://712xscnapby3pev55a.queue.core.windows.net/;FileEndpoint=https://712xscnapby3pev55a.file.preprod.core.windows.net/;BlobSecondaryEndpoint=https://712xscnapby3pev55a-secondary.blob.core.windows.net/;QueueSecondaryEndpoint=https://712xscnapby3pev55a-secondary.queue.core.windows.net/;FileSecondaryEndpoint=https://712xscnapby3pev55a-secondary.file.core.windows.net/;AccountName=712xscnapby3pev55a;AccountKey=Kg==;\nscope-1\n\n" + } +} \ No newline at end of file diff --git a/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_IgnoreReadOnly(False).json b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_IgnoreReadOnly(False).json new file mode 100644 index 000000000000..f0831d4428f0 --- /dev/null +++ b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_IgnoreReadOnly(False).json @@ -0,0 +1,228 @@ +{ + "Entries": [ + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-fdeabb69-ce00-ecb4-8b90-24a776c2dfc5?restype=share", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-b4e4d113403f1240bf48312f016930bc-79421f9687a5334d-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "6091754b-fc48-f514-a22e-24e65f7bdd25", + "x-ms-date": "Fri, 29 Oct 2021 19:29:34 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:29:35 GMT", + "ETag": "\u00220x8D99B1270DDD827\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:29:35 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "6091754b-fc48-f514-a22e-24e65f7bdd25", + "x-ms-request-id": "e116b22b-c01a-0001-2afb-cc0599000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-fdeabb69-ce00-ecb4-8b90-24a776c2dfc5/test-directory-249fbc08-c42f-5b5a-c7c4-e9b2c4753953?restype=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-a1394256a83b654db436f47e554ffd18-f271a11129892344-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "f736e471-8297-86e0-1b35-99831362302c", + "x-ms-date": "Fri, 29 Oct 2021 19:29:34 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:29:35 GMT", + "ETag": "\u00220x8D99B1270EE7A47\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:29:35 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "f736e471-8297-86e0-1b35-99831362302c", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-10-29T19:29:35.6029511Z", + "x-ms-file-creation-time": "2021-10-29T19:29:35.6029511Z", + "x-ms-file-id": "13835128424026341376", + "x-ms-file-last-write-time": "2021-10-29T19:29:35.6029511Z", + "x-ms-file-parent-id": "0", + "x-ms-file-permission-key": "15110104144358886944*6706197617703823457", + "x-ms-request-id": "e116b22d-c01a-0001-2bfb-cc0599000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-fdeabb69-ce00-ecb4-8b90-24a776c2dfc5/test-directory-249fbc08-c42f-5b5a-c7c4-e9b2c4753953/test-file-4bfcd1f5-db1e-89f4-3fe8-6414b1d973b9", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-18cb23250b88af48917dd25e8bd0a93e-7751b4924474b343-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "168be5ea-7a11-957a-efac-b8af1ecbd541", + "x-ms-content-length": "1024", + "x-ms-date": "Fri, 29 Oct 2021 19:29:34 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-type": "file", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:29:35 GMT", + "ETag": "\u00220x8D99B1270FB4B39\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:29:35 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "168be5ea-7a11-957a-efac-b8af1ecbd541", + "x-ms-file-attributes": "Archive", + "x-ms-file-change-time": "2021-10-29T19:29:35.6869433Z", + "x-ms-file-creation-time": "2021-10-29T19:29:35.6869433Z", + "x-ms-file-id": "11529285414812647424", + "x-ms-file-last-write-time": "2021-10-29T19:29:35.6869433Z", + "x-ms-file-parent-id": "13835128424026341376", + "x-ms-file-permission-key": "13773932323712163591*6706197617703823457", + "x-ms-request-id": "e116b22e-c01a-0001-2cfb-cc0599000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-fdeabb69-ce00-ecb4-8b90-24a776c2dfc5/test-directory-249fbc08-c42f-5b5a-c7c4-e9b2c4753953/test-file-c384e0c2-5021-b3ed-1595-1748f5f9a445", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-d1ed5e876e18954c9577b2f8b15f159c-b32b96fddbe2174c-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "0538a400-e076-9a3c-f7d7-017c63329ff6", + "x-ms-content-length": "1024", + "x-ms-date": "Fri, 29 Oct 2021 19:29:34 GMT", + "x-ms-file-attributes": "ReadOnly", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-type": "file", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:29:35 GMT", + "ETag": "\u00220x8D99B127105F99D\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:29:35 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "0538a400-e076-9a3c-f7d7-017c63329ff6", + "x-ms-file-attributes": "ReadOnly | Archive", + "x-ms-file-change-time": "2021-10-29T19:29:35.7569437Z", + "x-ms-file-creation-time": "2021-10-29T19:29:35.7569437Z", + "x-ms-file-id": "16140971433240035328", + "x-ms-file-last-write-time": "2021-10-29T19:29:35.7569437Z", + "x-ms-file-parent-id": "13835128424026341376", + "x-ms-file-permission-key": "13773932323712163591*6706197617703823457", + "x-ms-request-id": "e116b22f-c01a-0001-2dfb-cc0599000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-fdeabb69-ce00-ecb4-8b90-24a776c2dfc5/test-directory-249fbc08-c42f-5b5a-c7c4-e9b2c4753953/test-file-c384e0c2-5021-b3ed-1595-1748f5f9a445?comp=rename", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-fcc7c833c83b224b9b18afafd8194ee9-bf17b5191b60fe41-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "5047af4c-9fc0-63cf-ca90-d4765b2b21a2", + "x-ms-date": "Fri, 29 Oct 2021 19:29:35 GMT", + "x-ms-file-rename-ignore-read-only": "false", + "x-ms-file-rename-replace-if-exists": "true", + "x-ms-file-rename-source": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-fdeabb69-ce00-ecb4-8b90-24a776c2dfc5/test-directory-249fbc08-c42f-5b5a-c7c4-e9b2c4753953/test-file-4bfcd1f5-db1e-89f4-3fe8-6414b1d973b9", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 409, + "ResponseHeaders": { + "Content-Length": "258", + "Content-Type": "application/xml", + "Date": "Fri, 29 Oct 2021 19:29:35 GMT", + "x-ms-client-request-id": "5047af4c-9fc0-63cf-ca90-d4765b2b21a2", + "x-ms-error-code": "ReadOnlyAttribute", + "x-ms-request-id": "e116b230-c01a-0001-2efb-cc0599000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [ + "\uFEFF\u003C?xml version=\u00221.0\u0022 encoding=\u0022utf-8\u0022?\u003E\u003CError\u003E\u003CCode\u003EReadOnlyAttribute\u003C/Code\u003E\u003CMessage\u003EThe specified resource is read-only and cannot be modified at this time.\n", + "RequestId:e116b230-c01a-0001-2efb-cc0599000000\n", + "Time:2021-10-29T19:29:35.8339426Z\u003C/Message\u003E\u003C/Error\u003E" + ] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-fdeabb69-ce00-ecb4-8b90-24a776c2dfc5?restype=share", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-079abc54fc8f8a42804fee034e28826a-7f671284ad792740-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "b32ff7ac-4eea-6835-a407-4d10337c090c", + "x-ms-date": "Fri, 29 Oct 2021 19:29:35 GMT", + "x-ms-delete-snapshots": "include", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:29:35 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "b32ff7ac-4eea-6835-a407-4d10337c090c", + "x-ms-request-id": "e116b231-c01a-0001-2ffb-cc0599000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + } + ], + "Variables": { + "RandomSeed": "1617454569", + "Storage_TestConfigDefault": "ProductionTenant\n712xscnapby3pev55a\nU2FuaXRpemVk\nhttps://712xscnapby3pev55a.blob.preprod.core.windows.net\nhttps://712xscnapby3pev55a.file.preprod.core.windows.net\nhttps://712xscnapby3pev55a.queue.core.windows.net\nhttps://712xscnapby3pev55a.table.core.windows.net\n\n\n\n\nhttps://712xscnapby3pev55a-secondary.blob.core.windows.net\nhttps://712xscnapby3pev55a-secondary.file.core.windows.net\nhttps://712xscnapby3pev55a-secondary.queue.core.windows.net\nhttps://712xscnapby3pev55a-secondary.table.core.windows.net\n\nSanitized\n\n\nCloud\nBlobEndpoint=https://712xscnapby3pev55a.blob.preprod.core.windows.net/;QueueEndpoint=https://712xscnapby3pev55a.queue.core.windows.net/;FileEndpoint=https://712xscnapby3pev55a.file.preprod.core.windows.net/;BlobSecondaryEndpoint=https://712xscnapby3pev55a-secondary.blob.core.windows.net/;QueueSecondaryEndpoint=https://712xscnapby3pev55a-secondary.queue.core.windows.net/;FileSecondaryEndpoint=https://712xscnapby3pev55a-secondary.file.core.windows.net/;AccountName=712xscnapby3pev55a;AccountKey=Kg==;\nscope-1\n\n" + } +} \ No newline at end of file diff --git a/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_IgnoreReadOnly(False)Async.json b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_IgnoreReadOnly(False)Async.json new file mode 100644 index 000000000000..2e8134deb641 --- /dev/null +++ b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_IgnoreReadOnly(False)Async.json @@ -0,0 +1,228 @@ +{ + "Entries": [ + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-7c5e7eb6-4a32-be61-6023-1176446e6185?restype=share", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-bfd48ec86c64324083e62fd496e81b59-4b8fe885a091374c-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "fede1db7-720f-b286-2ab8-fcea0304fe63", + "x-ms-date": "Fri, 29 Oct 2021 19:29:40 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:29:41 GMT", + "ETag": "\u00220x8D99B12748F6EFD\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:29:41 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "fede1db7-720f-b286-2ab8-fcea0304fe63", + "x-ms-request-id": "e116b28c-c01a-0001-7afb-cc0599000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-7c5e7eb6-4a32-be61-6023-1176446e6185/test-directory-9d7ba656-ee11-5194-d966-b43d592b164e?restype=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-5900c0212790814b8d0874eb05b330b0-6013541b1f091949-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "01e08ef6-7c95-c893-898c-25a8bd4959ff", + "x-ms-date": "Fri, 29 Oct 2021 19:29:40 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:29:41 GMT", + "ETag": "\u00220x8D99B12749F0184\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:29:41 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "01e08ef6-7c95-c893-898c-25a8bd4959ff", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-10-29T19:29:41.7930116Z", + "x-ms-file-creation-time": "2021-10-29T19:29:41.7930116Z", + "x-ms-file-id": "13835128424026341376", + "x-ms-file-last-write-time": "2021-10-29T19:29:41.7930116Z", + "x-ms-file-parent-id": "0", + "x-ms-file-permission-key": "15110104144358886944*6706197617703823457", + "x-ms-request-id": "e116b28e-c01a-0001-7bfb-cc0599000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-7c5e7eb6-4a32-be61-6023-1176446e6185/test-directory-9d7ba656-ee11-5194-d966-b43d592b164e/test-file-97e0ada1-d745-f3d3-307f-f3dd3032e81f", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-c4b3c66d60613b44b639665387d62159-a3b5d17297b8f94a-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "bbc0bfda-5dd9-1e7e-bbec-d11688b59857", + "x-ms-content-length": "1024", + "x-ms-date": "Fri, 29 Oct 2021 19:29:41 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-type": "file", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:29:41 GMT", + "ETag": "\u00220x8D99B1274AA257A\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:29:41 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "bbc0bfda-5dd9-1e7e-bbec-d11688b59857", + "x-ms-file-attributes": "Archive", + "x-ms-file-change-time": "2021-10-29T19:29:41.8660218Z", + "x-ms-file-creation-time": "2021-10-29T19:29:41.8660218Z", + "x-ms-file-id": "11529285414812647424", + "x-ms-file-last-write-time": "2021-10-29T19:29:41.8660218Z", + "x-ms-file-parent-id": "13835128424026341376", + "x-ms-file-permission-key": "13773932323712163591*6706197617703823457", + "x-ms-request-id": "e116b28f-c01a-0001-7cfb-cc0599000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-7c5e7eb6-4a32-be61-6023-1176446e6185/test-directory-9d7ba656-ee11-5194-d966-b43d592b164e/test-file-cb3705a4-8e02-8cb4-f452-c04e3acfb563", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-31933af92e7be948822ba09910e4e9d3-a2e89f7246080744-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "385e465d-7395-4b5e-0a34-c6869c2fe4eb", + "x-ms-content-length": "1024", + "x-ms-date": "Fri, 29 Oct 2021 19:29:41 GMT", + "x-ms-file-attributes": "ReadOnly", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-type": "file", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:29:41 GMT", + "ETag": "\u00220x8D99B1274B60CB1\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:29:41 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "385e465d-7395-4b5e-0a34-c6869c2fe4eb", + "x-ms-file-attributes": "ReadOnly | Archive", + "x-ms-file-change-time": "2021-10-29T19:29:41.9440305Z", + "x-ms-file-creation-time": "2021-10-29T19:29:41.9440305Z", + "x-ms-file-id": "16140971433240035328", + "x-ms-file-last-write-time": "2021-10-29T19:29:41.9440305Z", + "x-ms-file-parent-id": "13835128424026341376", + "x-ms-file-permission-key": "13773932323712163591*6706197617703823457", + "x-ms-request-id": "e116b290-c01a-0001-7dfb-cc0599000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-7c5e7eb6-4a32-be61-6023-1176446e6185/test-directory-9d7ba656-ee11-5194-d966-b43d592b164e/test-file-cb3705a4-8e02-8cb4-f452-c04e3acfb563?comp=rename", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-0263529564d95940b371152d9ac24a69-5a4103a56c7ef741-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "f3f09e4e-7c71-cccd-34b7-663d66be7643", + "x-ms-date": "Fri, 29 Oct 2021 19:29:41 GMT", + "x-ms-file-rename-ignore-read-only": "false", + "x-ms-file-rename-replace-if-exists": "true", + "x-ms-file-rename-source": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-7c5e7eb6-4a32-be61-6023-1176446e6185/test-directory-9d7ba656-ee11-5194-d966-b43d592b164e/test-file-97e0ada1-d745-f3d3-307f-f3dd3032e81f", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 409, + "ResponseHeaders": { + "Content-Length": "258", + "Content-Type": "application/xml", + "Date": "Fri, 29 Oct 2021 19:29:41 GMT", + "x-ms-client-request-id": "f3f09e4e-7c71-cccd-34b7-663d66be7643", + "x-ms-error-code": "ReadOnlyAttribute", + "x-ms-request-id": "e116b291-c01a-0001-7efb-cc0599000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [ + "\uFEFF\u003C?xml version=\u00221.0\u0022 encoding=\u0022utf-8\u0022?\u003E\u003CError\u003E\u003CCode\u003EReadOnlyAttribute\u003C/Code\u003E\u003CMessage\u003EThe specified resource is read-only and cannot be modified at this time.\n", + "RequestId:e116b291-c01a-0001-7efb-cc0599000000\n", + "Time:2021-10-29T19:29:42.0179645Z\u003C/Message\u003E\u003C/Error\u003E" + ] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-7c5e7eb6-4a32-be61-6023-1176446e6185?restype=share", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-029cf82ef4425741b7e50bb431a44173-0a5f3ecea5329344-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "fd3873eb-f03e-ba7a-a00a-c1fbc1a81100", + "x-ms-date": "Fri, 29 Oct 2021 19:29:41 GMT", + "x-ms-delete-snapshots": "include", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:29:41 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "fd3873eb-f03e-ba7a-a00a-c1fbc1a81100", + "x-ms-request-id": "e116b292-c01a-0001-7ffb-cc0599000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + } + ], + "Variables": { + "RandomSeed": "2114182377", + "Storage_TestConfigDefault": "ProductionTenant\n712xscnapby3pev55a\nU2FuaXRpemVk\nhttps://712xscnapby3pev55a.blob.preprod.core.windows.net\nhttps://712xscnapby3pev55a.file.preprod.core.windows.net\nhttps://712xscnapby3pev55a.queue.core.windows.net\nhttps://712xscnapby3pev55a.table.core.windows.net\n\n\n\n\nhttps://712xscnapby3pev55a-secondary.blob.core.windows.net\nhttps://712xscnapby3pev55a-secondary.file.core.windows.net\nhttps://712xscnapby3pev55a-secondary.queue.core.windows.net\nhttps://712xscnapby3pev55a-secondary.table.core.windows.net\n\nSanitized\n\n\nCloud\nBlobEndpoint=https://712xscnapby3pev55a.blob.preprod.core.windows.net/;QueueEndpoint=https://712xscnapby3pev55a.queue.core.windows.net/;FileEndpoint=https://712xscnapby3pev55a.file.preprod.core.windows.net/;BlobSecondaryEndpoint=https://712xscnapby3pev55a-secondary.blob.core.windows.net/;QueueSecondaryEndpoint=https://712xscnapby3pev55a-secondary.queue.core.windows.net/;FileSecondaryEndpoint=https://712xscnapby3pev55a-secondary.file.core.windows.net/;AccountName=712xscnapby3pev55a;AccountKey=Kg==;\nscope-1\n\n" + } +} \ No newline at end of file diff --git a/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_NonAsciiSourceAndDestination.json b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_NonAsciiSourceAndDestination.json new file mode 100644 index 000000000000..6f2b93180c29 --- /dev/null +++ b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_NonAsciiSourceAndDestination.json @@ -0,0 +1,227 @@ +{ + "Entries": [ + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-cb8e3d44-56bc-fa64-11c5-0b56c2d47dbc?restype=share", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-f56a044d7fc5c241a3bffa27294d8bda-8f5b6c0140effd4b-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "b6ceef9a-d788-e895-2813-5000cdaf097a", + "x-ms-date": "Fri, 29 Oct 2021 19:40:24 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:24 GMT", + "ETag": "\u00220x8D99B13F46184F7\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:25 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "b6ceef9a-d788-e895-2813-5000cdaf097a", + "x-ms-request-id": "d8bf64aa-901a-0009-40fc-cc22b6000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-cb8e3d44-56bc-fa64-11c5-0b56c2d47dbc/test-directory-5f2ddbee-ee95-98ab-631a-f3b307ad86b1?restype=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-355057edc9431d4f8d9601c73ab4d52d-0192194105ded040-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "98c8d400-8732-ab90-4435-526de4e2e07b", + "x-ms-date": "Fri, 29 Oct 2021 19:40:24 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:24 GMT", + "ETag": "\u00220x8D99B13F471BA93\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:25 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "98c8d400-8732-ab90-4435-526de4e2e07b", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-10-29T19:40:25.7413779Z", + "x-ms-file-creation-time": "2021-10-29T19:40:25.7413779Z", + "x-ms-file-id": "13835128424026341376", + "x-ms-file-last-write-time": "2021-10-29T19:40:25.7413779Z", + "x-ms-file-parent-id": "0", + "x-ms-file-permission-key": "15110104144358886944*6706197617703823457", + "x-ms-request-id": "d8bf64ac-901a-0009-41fc-cc22b6000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-cb8e3d44-56bc-fa64-11c5-0b56c2d47dbc/test-directory-5f2ddbee-ee95-98ab-631a-f3b307ad86b1/test-%C6%92%C2%A1%C2%A3%E2%82%AC%E2%80%BD%253A-e8229f8c-37f3-2874-a79d-d39900c93d8b", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-cf6da3dff4ded1449b2fc39a871c8e77-a4e96ae788cb6f4a-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "bb55721a-bdb6-c835-5f9f-f195b4f7aa7b", + "x-ms-content-length": "1024", + "x-ms-date": "Fri, 29 Oct 2021 19:40:25 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-type": "file", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:24 GMT", + "ETag": "\u00220x8D99B13F47DA139\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:25 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "bb55721a-bdb6-c835-5f9f-f195b4f7aa7b", + "x-ms-file-attributes": "Archive", + "x-ms-file-change-time": "2021-10-29T19:40:25.8193721Z", + "x-ms-file-creation-time": "2021-10-29T19:40:25.8193721Z", + "x-ms-file-id": "11529285414812647424", + "x-ms-file-last-write-time": "2021-10-29T19:40:25.8193721Z", + "x-ms-file-parent-id": "13835128424026341376", + "x-ms-file-permission-key": "13773932323712163591*6706197617703823457", + "x-ms-request-id": "d8bf64ad-901a-0009-42fc-cc22b6000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-cb8e3d44-56bc-fa64-11c5-0b56c2d47dbc/test-directory-5f2ddbee-ee95-98ab-631a-f3b307ad86b1/test-%C6%92%C2%A1%C2%A3%E2%82%AC%E2%80%BD%253A-19f9c7f8-ad2f-9f95-20cb-94e2a9a4b4e0?comp=rename", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-7ab1648fb455a7449362a082e39baa4d-64b42ff99a37c043-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "acd71266-92cc-6d7b-dcb5-9aea28531ebb", + "x-ms-date": "Fri, 29 Oct 2021 19:40:25 GMT", + "x-ms-file-rename-source": "https%3A%2F%2F712xscnapby3pev55a.file.preprod.core.windows.net%2Ftest-share-cb8e3d44-56bc-fa64-11c5-0b56c2d47dbc%2Ftest-directory-5f2ddbee-ee95-98ab-631a-f3b307ad86b1%2Ftest-%C6%92%C2%A1%C2%A3%E2%82%AC%E2%80%BD%253A-e8229f8c-37f3-2874-a79d-d39900c93d8b=", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:24 GMT", + "ETag": "\u00220x8D99B13F4889DAE\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:25 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "acd71266-92cc-6d7b-dcb5-9aea28531ebb", + "x-ms-file-attributes": "Archive", + "x-ms-file-change-time": "2021-10-29T19:40:25.8913710Z", + "x-ms-file-creation-time": "2021-10-29T19:40:25.8193721Z", + "x-ms-file-id": "11529285414812647424", + "x-ms-file-last-write-time": "2021-10-29T19:40:25.8193721Z", + "x-ms-file-parent-id": "13835128424026341376", + "x-ms-file-permission-key": "13773932323712163591*6706197617703823457", + "x-ms-request-id": "d8bf64ae-901a-0009-43fc-cc22b6000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-cb8e3d44-56bc-fa64-11c5-0b56c2d47dbc/test-directory-5f2ddbee-ee95-98ab-631a-f3b307ad86b1/test-%C6%92%C2%A1%C2%A3%E2%82%AC%E2%80%BD%253A-19f9c7f8-ad2f-9f95-20cb-94e2a9a4b4e0", + "RequestMethod": "HEAD", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "967c3829-07cd-5e14-ae11-b2bde7e98d41", + "x-ms-date": "Fri, 29 Oct 2021 19:40:25 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Length": "1024", + "Content-Type": "application/octet-stream", + "Date": "Fri, 29 Oct 2021 19:40:25 GMT", + "ETag": "\u00220x8D99B13F4889DAE\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:25 GMT", + "x-ms-client-request-id": "967c3829-07cd-5e14-ae11-b2bde7e98d41", + "x-ms-file-attributes": "Archive", + "x-ms-file-change-time": "2021-10-29T19:40:25.8913710Z", + "x-ms-file-creation-time": "2021-10-29T19:40:25.8193721Z", + "x-ms-file-id": "11529285414812647424", + "x-ms-file-last-write-time": "2021-10-29T19:40:25.8193721Z", + "x-ms-file-parent-id": "13835128424026341376", + "x-ms-file-permission-key": "13773932323712163591*6706197617703823457", + "x-ms-lease-state": "available", + "x-ms-lease-status": "unlocked", + "x-ms-request-id": "d8bf64af-901a-0009-44fc-cc22b6000000", + "x-ms-server-encrypted": "false", + "x-ms-type": "File", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-cb8e3d44-56bc-fa64-11c5-0b56c2d47dbc?restype=share", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-5197a1902647b8469b0ad15a659401ae-70e5d2f8dfbfd74c-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "f0c16211-87d6-e3ee-fc46-dc6769498e09", + "x-ms-date": "Fri, 29 Oct 2021 19:40:25 GMT", + "x-ms-delete-snapshots": "include", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:25 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "f0c16211-87d6-e3ee-fc46-dc6769498e09", + "x-ms-request-id": "d8bf64b2-901a-0009-45fc-cc22b6000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + } + ], + "Variables": { + "RandomSeed": "1148683551", + "Storage_TestConfigDefault": "ProductionTenant\n712xscnapby3pev55a\nU2FuaXRpemVk\nhttps://712xscnapby3pev55a.blob.preprod.core.windows.net\nhttps://712xscnapby3pev55a.file.preprod.core.windows.net\nhttps://712xscnapby3pev55a.queue.core.windows.net\nhttps://712xscnapby3pev55a.table.core.windows.net\n\n\n\n\nhttps://712xscnapby3pev55a-secondary.blob.core.windows.net\nhttps://712xscnapby3pev55a-secondary.file.core.windows.net\nhttps://712xscnapby3pev55a-secondary.queue.core.windows.net\nhttps://712xscnapby3pev55a-secondary.table.core.windows.net\n\nSanitized\n\n\nCloud\nBlobEndpoint=https://712xscnapby3pev55a.blob.preprod.core.windows.net/;QueueEndpoint=https://712xscnapby3pev55a.queue.core.windows.net/;FileEndpoint=https://712xscnapby3pev55a.file.preprod.core.windows.net/;BlobSecondaryEndpoint=https://712xscnapby3pev55a-secondary.blob.core.windows.net/;QueueSecondaryEndpoint=https://712xscnapby3pev55a-secondary.queue.core.windows.net/;FileSecondaryEndpoint=https://712xscnapby3pev55a-secondary.file.core.windows.net/;AccountName=712xscnapby3pev55a;AccountKey=Kg==;\nscope-1\n\n" + } +} \ No newline at end of file diff --git a/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_NonAsciiSourceAndDestinationAsync.json b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_NonAsciiSourceAndDestinationAsync.json new file mode 100644 index 000000000000..f992f987e870 --- /dev/null +++ b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_NonAsciiSourceAndDestinationAsync.json @@ -0,0 +1,227 @@ +{ + "Entries": [ + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-b97fe9af-43cd-ab08-3637-928b01cc7047?restype=share", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-8d84b6a2dbaaaf418ae781ce009b4d59-a3bc46dce5f71d46-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "27e8c12a-3664-62d5-39e5-d14c9e3f7831", + "x-ms-date": "Fri, 29 Oct 2021 19:40:29 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:30 GMT", + "ETag": "\u00220x8D99B13F742FAB6\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:30 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "27e8c12a-3664-62d5-39e5-d14c9e3f7831", + "x-ms-request-id": "d8bf64f4-901a-0009-7dfc-cc22b6000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-b97fe9af-43cd-ab08-3637-928b01cc7047/test-directory-40396d73-3f10-4793-104f-f1f80b65eb4d?restype=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-6eb2ff72d8703b4b9930d298ea55505c-bb4cca57934e134e-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "522f075c-0daf-eaaf-2ea0-171545dd57d4", + "x-ms-date": "Fri, 29 Oct 2021 19:40:29 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:30 GMT", + "ETag": "\u00220x8D99B13F754DF5C\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:30 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "522f075c-0daf-eaaf-2ea0-171545dd57d4", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-10-29T19:40:30.5854300Z", + "x-ms-file-creation-time": "2021-10-29T19:40:30.5854300Z", + "x-ms-file-id": "13835128424026341376", + "x-ms-file-last-write-time": "2021-10-29T19:40:30.5854300Z", + "x-ms-file-parent-id": "0", + "x-ms-file-permission-key": "15110104144358886944*6706197617703823457", + "x-ms-request-id": "d8bf64f6-901a-0009-7efc-cc22b6000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-b97fe9af-43cd-ab08-3637-928b01cc7047/test-directory-40396d73-3f10-4793-104f-f1f80b65eb4d/test-%C6%92%C2%A1%C2%A3%E2%82%AC%E2%80%BD%253A-cb6383f9-38de-2a4c-8adb-63d1d012b083", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-eb82fb2fa5d502429f8b44d63b72194b-0ed4767c3a00ec42-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "13879be7-c729-24a9-ba05-c8d4a9dd1a1c", + "x-ms-content-length": "1024", + "x-ms-date": "Fri, 29 Oct 2021 19:40:29 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-type": "file", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:30 GMT", + "ETag": "\u00220x8D99B13F7609EA0\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:30 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "13879be7-c729-24a9-ba05-c8d4a9dd1a1c", + "x-ms-file-attributes": "Archive", + "x-ms-file-change-time": "2021-10-29T19:40:30.6624160Z", + "x-ms-file-creation-time": "2021-10-29T19:40:30.6624160Z", + "x-ms-file-id": "11529285414812647424", + "x-ms-file-last-write-time": "2021-10-29T19:40:30.6624160Z", + "x-ms-file-parent-id": "13835128424026341376", + "x-ms-file-permission-key": "13773932323712163591*6706197617703823457", + "x-ms-request-id": "d8bf64f7-901a-0009-7ffc-cc22b6000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-b97fe9af-43cd-ab08-3637-928b01cc7047/test-directory-40396d73-3f10-4793-104f-f1f80b65eb4d/test-%C6%92%C2%A1%C2%A3%E2%82%AC%E2%80%BD%253A-db5793f0-5341-609d-e586-a7682708f8bb?comp=rename", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-e7ba5a88f9cf384f8a9d98e8464d1e3a-99977a55645c974a-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "9d53f45b-3c76-93bd-fd26-2ea21f41fcb1", + "x-ms-date": "Fri, 29 Oct 2021 19:40:29 GMT", + "x-ms-file-rename-source": "https%3A%2F%2F712xscnapby3pev55a.file.preprod.core.windows.net%2Ftest-share-b97fe9af-43cd-ab08-3637-928b01cc7047%2Ftest-directory-40396d73-3f10-4793-104f-f1f80b65eb4d%2Ftest-%C6%92%C2%A1%C2%A3%E2%82%AC%E2%80%BD%253A-cb6383f9-38de-2a4c-8adb-63d1d012b083=", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:30 GMT", + "ETag": "\u00220x8D99B13F76B75AA\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:30 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "9d53f45b-3c76-93bd-fd26-2ea21f41fcb1", + "x-ms-file-attributes": "Archive", + "x-ms-file-change-time": "2021-10-29T19:40:30.7334570Z", + "x-ms-file-creation-time": "2021-10-29T19:40:30.6624160Z", + "x-ms-file-id": "11529285414812647424", + "x-ms-file-last-write-time": "2021-10-29T19:40:30.6624160Z", + "x-ms-file-parent-id": "13835128424026341376", + "x-ms-file-permission-key": "13773932323712163591*6706197617703823457", + "x-ms-request-id": "d8bf64f8-901a-0009-80fc-cc22b6000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-b97fe9af-43cd-ab08-3637-928b01cc7047/test-directory-40396d73-3f10-4793-104f-f1f80b65eb4d/test-%C6%92%C2%A1%C2%A3%E2%82%AC%E2%80%BD%253A-db5793f0-5341-609d-e586-a7682708f8bb", + "RequestMethod": "HEAD", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "330c6053-5bb5-8545-a656-36636fb7d67e", + "x-ms-date": "Fri, 29 Oct 2021 19:40:30 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Length": "1024", + "Content-Type": "application/octet-stream", + "Date": "Fri, 29 Oct 2021 19:40:30 GMT", + "ETag": "\u00220x8D99B13F76B75AA\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:30 GMT", + "x-ms-client-request-id": "330c6053-5bb5-8545-a656-36636fb7d67e", + "x-ms-file-attributes": "Archive", + "x-ms-file-change-time": "2021-10-29T19:40:30.7334570Z", + "x-ms-file-creation-time": "2021-10-29T19:40:30.6624160Z", + "x-ms-file-id": "11529285414812647424", + "x-ms-file-last-write-time": "2021-10-29T19:40:30.6624160Z", + "x-ms-file-parent-id": "13835128424026341376", + "x-ms-file-permission-key": "13773932323712163591*6706197617703823457", + "x-ms-lease-state": "available", + "x-ms-lease-status": "unlocked", + "x-ms-request-id": "d8bf64f9-901a-0009-01fc-cc22b6000000", + "x-ms-server-encrypted": "false", + "x-ms-type": "File", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-b97fe9af-43cd-ab08-3637-928b01cc7047?restype=share", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-abb27e25664e4844803c2ee9627a512d-18880636ae23d74d-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "bf4e1197-c935-b0fc-c78c-9f9caf2de482", + "x-ms-date": "Fri, 29 Oct 2021 19:40:30 GMT", + "x-ms-delete-snapshots": "include", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:30 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "bf4e1197-c935-b0fc-c78c-9f9caf2de482", + "x-ms-request-id": "d8bf64fa-901a-0009-02fc-cc22b6000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + } + ], + "Variables": { + "RandomSeed": "1968527694", + "Storage_TestConfigDefault": "ProductionTenant\n712xscnapby3pev55a\nU2FuaXRpemVk\nhttps://712xscnapby3pev55a.blob.preprod.core.windows.net\nhttps://712xscnapby3pev55a.file.preprod.core.windows.net\nhttps://712xscnapby3pev55a.queue.core.windows.net\nhttps://712xscnapby3pev55a.table.core.windows.net\n\n\n\n\nhttps://712xscnapby3pev55a-secondary.blob.core.windows.net\nhttps://712xscnapby3pev55a-secondary.file.core.windows.net\nhttps://712xscnapby3pev55a-secondary.queue.core.windows.net\nhttps://712xscnapby3pev55a-secondary.table.core.windows.net\n\nSanitized\n\n\nCloud\nBlobEndpoint=https://712xscnapby3pev55a.blob.preprod.core.windows.net/;QueueEndpoint=https://712xscnapby3pev55a.queue.core.windows.net/;FileEndpoint=https://712xscnapby3pev55a.file.preprod.core.windows.net/;BlobSecondaryEndpoint=https://712xscnapby3pev55a-secondary.blob.core.windows.net/;QueueSecondaryEndpoint=https://712xscnapby3pev55a-secondary.queue.core.windows.net/;FileSecondaryEndpoint=https://712xscnapby3pev55a-secondary.file.core.windows.net/;AccountName=712xscnapby3pev55a;AccountKey=Kg==;\nscope-1\n\n" + } +} \ No newline at end of file diff --git a/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_ReplaceIfExists(False).json b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_ReplaceIfExists(False).json new file mode 100644 index 000000000000..3a5ee131b7dc --- /dev/null +++ b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_ReplaceIfExists(False).json @@ -0,0 +1,227 @@ +{ + "Entries": [ + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-5b44f5cb-4873-f0c3-d0e5-3d5ae8d608b5?restype=share", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-b4196c9cfabd884888decef79b7c21cc-2ec45e35aaa2dd46-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "adc80ed8-b317-17a4-b3ea-dda11104ab14", + "x-ms-date": "Fri, 29 Oct 2021 19:40:22 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:22 GMT", + "ETag": "\u00220x8D99B13F2DC9224\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:23 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "adc80ed8-b317-17a4-b3ea-dda11104ab14", + "x-ms-request-id": "d8bf6483-901a-0009-1ffc-cc22b6000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-5b44f5cb-4873-f0c3-d0e5-3d5ae8d608b5/test-directory-88c18c3b-63e1-63d9-ee3d-ee87bd98f7b3?restype=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-fda41b80870f5946aaf6ef4a57c0b62a-8d68d72f7bae4b45-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "6cef7640-c65b-745b-3464-bed9c51c591b", + "x-ms-date": "Fri, 29 Oct 2021 19:40:22 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:22 GMT", + "ETag": "\u00220x8D99B13F2EAF22C\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:23 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "6cef7640-c65b-745b-3464-bed9c51c591b", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-10-29T19:40:23.1803436Z", + "x-ms-file-creation-time": "2021-10-29T19:40:23.1803436Z", + "x-ms-file-id": "13835128424026341376", + "x-ms-file-last-write-time": "2021-10-29T19:40:23.1803436Z", + "x-ms-file-parent-id": "0", + "x-ms-file-permission-key": "15110104144358886944*6706197617703823457", + "x-ms-request-id": "d8bf6485-901a-0009-20fc-cc22b6000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-5b44f5cb-4873-f0c3-d0e5-3d5ae8d608b5/test-directory-88c18c3b-63e1-63d9-ee3d-ee87bd98f7b3/test-file-100a2af2-d182-e006-ee05-bb05567bd887", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-6a57db0c26b9b14bac22ac5864299134-50f98f2d49ec2b4b-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "606af281-e45b-6ee5-6f0f-7e560b551db9", + "x-ms-content-length": "1024", + "x-ms-date": "Fri, 29 Oct 2021 19:40:22 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-type": "file", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:22 GMT", + "ETag": "\u00220x8D99B13F2F6B377\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:23 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "606af281-e45b-6ee5-6f0f-7e560b551db9", + "x-ms-file-attributes": "Archive", + "x-ms-file-change-time": "2021-10-29T19:40:23.2573815Z", + "x-ms-file-creation-time": "2021-10-29T19:40:23.2573815Z", + "x-ms-file-id": "11529285414812647424", + "x-ms-file-last-write-time": "2021-10-29T19:40:23.2573815Z", + "x-ms-file-parent-id": "13835128424026341376", + "x-ms-file-permission-key": "13773932323712163591*6706197617703823457", + "x-ms-request-id": "d8bf6486-901a-0009-21fc-cc22b6000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-5b44f5cb-4873-f0c3-d0e5-3d5ae8d608b5/test-directory-88c18c3b-63e1-63d9-ee3d-ee87bd98f7b3/test-file-3e90378b-12d5-6872-d33a-6a752c5d4329", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-fb4ce488b084cc46a7ddcd8cae4c4f51-0b3f4281e2dd9c40-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "651debef-b834-6fd9-8002-8d21796f4111", + "x-ms-content-length": "1024", + "x-ms-date": "Fri, 29 Oct 2021 19:40:22 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-type": "file", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:22 GMT", + "ETag": "\u00220x8D99B13F301142F\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:23 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "651debef-b834-6fd9-8002-8d21796f4111", + "x-ms-file-attributes": "Archive", + "x-ms-file-change-time": "2021-10-29T19:40:23.3253935Z", + "x-ms-file-creation-time": "2021-10-29T19:40:23.3253935Z", + "x-ms-file-id": "16140971433240035328", + "x-ms-file-last-write-time": "2021-10-29T19:40:23.3253935Z", + "x-ms-file-parent-id": "13835128424026341376", + "x-ms-file-permission-key": "13773932323712163591*6706197617703823457", + "x-ms-request-id": "d8bf6487-901a-0009-22fc-cc22b6000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-5b44f5cb-4873-f0c3-d0e5-3d5ae8d608b5/test-directory-88c18c3b-63e1-63d9-ee3d-ee87bd98f7b3/test-file-3e90378b-12d5-6872-d33a-6a752c5d4329?comp=rename", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-650153585c0b2644b15b7fa60c09d609-abff272db6078b49-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "40861975-de3f-55f5-3215-e40eea0aeb30", + "x-ms-date": "Fri, 29 Oct 2021 19:40:22 GMT", + "x-ms-file-rename-replace-if-exists": "false", + "x-ms-file-rename-source": "https%3A%2F%2F712xscnapby3pev55a.file.preprod.core.windows.net%2Ftest-share-5b44f5cb-4873-f0c3-d0e5-3d5ae8d608b5%2Ftest-directory-88c18c3b-63e1-63d9-ee3d-ee87bd98f7b3%2Ftest-file-100a2af2-d182-e006-ee05-bb05567bd887=", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 409, + "ResponseHeaders": { + "Content-Length": "228", + "Content-Type": "application/xml", + "Date": "Fri, 29 Oct 2021 19:40:22 GMT", + "x-ms-client-request-id": "40861975-de3f-55f5-3215-e40eea0aeb30", + "x-ms-error-code": "ResourceAlreadyExists", + "x-ms-request-id": "d8bf6488-901a-0009-23fc-cc22b6000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [ + "\uFEFF\u003C?xml version=\u00221.0\u0022 encoding=\u0022utf-8\u0022?\u003E\u003CError\u003E\u003CCode\u003EResourceAlreadyExists\u003C/Code\u003E\u003CMessage\u003EThe specified resource already exists.\n", + "RequestId:d8bf6488-901a-0009-23fc-cc22b6000000\n", + "Time:2021-10-29T19:40:23.3951357Z\u003C/Message\u003E\u003C/Error\u003E" + ] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-5b44f5cb-4873-f0c3-d0e5-3d5ae8d608b5?restype=share", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-2fb6e1c3f3c82b419bc4ebfaa6b0bde2-bef7abec7a49b048-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "5fabbaa5-01e8-edd1-5ff4-cbbbd49a2800", + "x-ms-date": "Fri, 29 Oct 2021 19:40:22 GMT", + "x-ms-delete-snapshots": "include", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:22 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "5fabbaa5-01e8-edd1-5ff4-cbbbd49a2800", + "x-ms-request-id": "d8bf648a-901a-0009-24fc-cc22b6000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + } + ], + "Variables": { + "RandomSeed": "498793554", + "Storage_TestConfigDefault": "ProductionTenant\n712xscnapby3pev55a\nU2FuaXRpemVk\nhttps://712xscnapby3pev55a.blob.preprod.core.windows.net\nhttps://712xscnapby3pev55a.file.preprod.core.windows.net\nhttps://712xscnapby3pev55a.queue.core.windows.net\nhttps://712xscnapby3pev55a.table.core.windows.net\n\n\n\n\nhttps://712xscnapby3pev55a-secondary.blob.core.windows.net\nhttps://712xscnapby3pev55a-secondary.file.core.windows.net\nhttps://712xscnapby3pev55a-secondary.queue.core.windows.net\nhttps://712xscnapby3pev55a-secondary.table.core.windows.net\n\nSanitized\n\n\nCloud\nBlobEndpoint=https://712xscnapby3pev55a.blob.preprod.core.windows.net/;QueueEndpoint=https://712xscnapby3pev55a.queue.core.windows.net/;FileEndpoint=https://712xscnapby3pev55a.file.preprod.core.windows.net/;BlobSecondaryEndpoint=https://712xscnapby3pev55a-secondary.blob.core.windows.net/;QueueSecondaryEndpoint=https://712xscnapby3pev55a-secondary.queue.core.windows.net/;FileSecondaryEndpoint=https://712xscnapby3pev55a-secondary.file.core.windows.net/;AccountName=712xscnapby3pev55a;AccountKey=Kg==;\nscope-1\n\n" + } +} \ No newline at end of file diff --git a/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_ReplaceIfExists(False)Async.json b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_ReplaceIfExists(False)Async.json new file mode 100644 index 000000000000..0c57251277f9 --- /dev/null +++ b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_ReplaceIfExists(False)Async.json @@ -0,0 +1,227 @@ +{ + "Entries": [ + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-a1cb9a13-de2f-045a-b4b6-3999def8edc7?restype=share", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-464d1113b2fe574294d7f12e1d45e9f6-25eb2a311bd9f045-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "b895134d-73ca-a345-eb99-f1919a6004be", + "x-ms-date": "Fri, 29 Oct 2021 19:40:27 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:26 GMT", + "ETag": "\u00220x8D99B13F5AD3F32\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:27 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "b895134d-73ca-a345-eb99-f1919a6004be", + "x-ms-request-id": "d8bf64cc-901a-0009-5cfc-cc22b6000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-a1cb9a13-de2f-045a-b4b6-3999def8edc7/test-directory-5f62fed3-9609-31c9-a01f-2c40d1c9a885?restype=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-6a433ca111a7c045b959f23e066dc67f-1b73bb4177df404c-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "5cbd4eea-aecc-b7c0-4964-17ab4704d221", + "x-ms-date": "Fri, 29 Oct 2021 19:40:27 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:26 GMT", + "ETag": "\u00220x8D99B13F5BC1545\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:27 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "5cbd4eea-aecc-b7c0-4964-17ab4704d221", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-10-29T19:40:27.9063877Z", + "x-ms-file-creation-time": "2021-10-29T19:40:27.9063877Z", + "x-ms-file-id": "13835128424026341376", + "x-ms-file-last-write-time": "2021-10-29T19:40:27.9063877Z", + "x-ms-file-parent-id": "0", + "x-ms-file-permission-key": "15110104144358886944*6706197617703823457", + "x-ms-request-id": "d8bf64ce-901a-0009-5dfc-cc22b6000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-a1cb9a13-de2f-045a-b4b6-3999def8edc7/test-directory-5f62fed3-9609-31c9-a01f-2c40d1c9a885/test-file-2be96cf0-3914-9d5c-029f-f89556ee4038", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-0c26c653b74e114f95bcd5331358739d-1a891e327ab9744d-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "84eb1ea1-e67f-b000-f21f-592cb62a605b", + "x-ms-content-length": "1024", + "x-ms-date": "Fri, 29 Oct 2021 19:40:27 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-type": "file", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:27 GMT", + "ETag": "\u00220x8D99B13F5C7D593\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:27 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "84eb1ea1-e67f-b000-f21f-592cb62a605b", + "x-ms-file-attributes": "Archive", + "x-ms-file-change-time": "2021-10-29T19:40:27.9834003Z", + "x-ms-file-creation-time": "2021-10-29T19:40:27.9834003Z", + "x-ms-file-id": "11529285414812647424", + "x-ms-file-last-write-time": "2021-10-29T19:40:27.9834003Z", + "x-ms-file-parent-id": "13835128424026341376", + "x-ms-file-permission-key": "13773932323712163591*6706197617703823457", + "x-ms-request-id": "d8bf64cf-901a-0009-5efc-cc22b6000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-a1cb9a13-de2f-045a-b4b6-3999def8edc7/test-directory-5f62fed3-9609-31c9-a01f-2c40d1c9a885/test-file-309ddf23-4fae-a415-b3ef-7c7fb85e80b1", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-1f2d241d56d2e645b78a72e5cbc08a38-660766c8b2fbba49-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "3dda2533-4bb2-51b3-0946-d08f6a80f894", + "x-ms-content-length": "1024", + "x-ms-date": "Fri, 29 Oct 2021 19:40:27 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-type": "file", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:27 GMT", + "ETag": "\u00220x8D99B13F5D40A5E\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:28 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "3dda2533-4bb2-51b3-0946-d08f6a80f894", + "x-ms-file-attributes": "Archive", + "x-ms-file-change-time": "2021-10-29T19:40:28.0633950Z", + "x-ms-file-creation-time": "2021-10-29T19:40:28.0633950Z", + "x-ms-file-id": "16140971433240035328", + "x-ms-file-last-write-time": "2021-10-29T19:40:28.0633950Z", + "x-ms-file-parent-id": "13835128424026341376", + "x-ms-file-permission-key": "13773932323712163591*6706197617703823457", + "x-ms-request-id": "d8bf64d0-901a-0009-5ffc-cc22b6000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-a1cb9a13-de2f-045a-b4b6-3999def8edc7/test-directory-5f62fed3-9609-31c9-a01f-2c40d1c9a885/test-file-309ddf23-4fae-a415-b3ef-7c7fb85e80b1?comp=rename", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-7ee448fd517274499d6380a650bb08f1-629b1c8068584449-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "934cf7ad-4283-d8ff-e2a2-2ebbeb29bc95", + "x-ms-date": "Fri, 29 Oct 2021 19:40:27 GMT", + "x-ms-file-rename-replace-if-exists": "false", + "x-ms-file-rename-source": "https%3A%2F%2F712xscnapby3pev55a.file.preprod.core.windows.net%2Ftest-share-a1cb9a13-de2f-045a-b4b6-3999def8edc7%2Ftest-directory-5f62fed3-9609-31c9-a01f-2c40d1c9a885%2Ftest-file-2be96cf0-3914-9d5c-029f-f89556ee4038=", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 409, + "ResponseHeaders": { + "Content-Length": "228", + "Content-Type": "application/xml", + "Date": "Fri, 29 Oct 2021 19:40:27 GMT", + "x-ms-client-request-id": "934cf7ad-4283-d8ff-e2a2-2ebbeb29bc95", + "x-ms-error-code": "ResourceAlreadyExists", + "x-ms-request-id": "d8bf64d1-901a-0009-60fc-cc22b6000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [ + "\uFEFF\u003C?xml version=\u00221.0\u0022 encoding=\u0022utf-8\u0022?\u003E\u003CError\u003E\u003CCode\u003EResourceAlreadyExists\u003C/Code\u003E\u003CMessage\u003EThe specified resource already exists.\n", + "RequestId:d8bf64d1-901a-0009-60fc-cc22b6000000\n", + "Time:2021-10-29T19:40:28.1352045Z\u003C/Message\u003E\u003C/Error\u003E" + ] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-a1cb9a13-de2f-045a-b4b6-3999def8edc7?restype=share", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-fb6d70a0069fd24c811ca497b371ae0a-eade6f95e160d441-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "72e2a895-6434-5c10-a830-3d93f99c7cfd", + "x-ms-date": "Fri, 29 Oct 2021 19:40:27 GMT", + "x-ms-delete-snapshots": "include", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:27 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "72e2a895-6434-5c10-a830-3d93f99c7cfd", + "x-ms-request-id": "d8bf64d2-901a-0009-61fc-cc22b6000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + } + ], + "Variables": { + "RandomSeed": "124647024", + "Storage_TestConfigDefault": "ProductionTenant\n712xscnapby3pev55a\nU2FuaXRpemVk\nhttps://712xscnapby3pev55a.blob.preprod.core.windows.net\nhttps://712xscnapby3pev55a.file.preprod.core.windows.net\nhttps://712xscnapby3pev55a.queue.core.windows.net\nhttps://712xscnapby3pev55a.table.core.windows.net\n\n\n\n\nhttps://712xscnapby3pev55a-secondary.blob.core.windows.net\nhttps://712xscnapby3pev55a-secondary.file.core.windows.net\nhttps://712xscnapby3pev55a-secondary.queue.core.windows.net\nhttps://712xscnapby3pev55a-secondary.table.core.windows.net\n\nSanitized\n\n\nCloud\nBlobEndpoint=https://712xscnapby3pev55a.blob.preprod.core.windows.net/;QueueEndpoint=https://712xscnapby3pev55a.queue.core.windows.net/;FileEndpoint=https://712xscnapby3pev55a.file.preprod.core.windows.net/;BlobSecondaryEndpoint=https://712xscnapby3pev55a-secondary.blob.core.windows.net/;QueueSecondaryEndpoint=https://712xscnapby3pev55a-secondary.queue.core.windows.net/;FileSecondaryEndpoint=https://712xscnapby3pev55a-secondary.file.core.windows.net/;AccountName=712xscnapby3pev55a;AccountKey=Kg==;\nscope-1\n\n" + } +} \ No newline at end of file diff --git a/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_ReplaceIfExists(True).json b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_ReplaceIfExists(True).json new file mode 100644 index 000000000000..d91939f37082 --- /dev/null +++ b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_ReplaceIfExists(True).json @@ -0,0 +1,271 @@ +{ + "Entries": [ + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-73f67d3a-8a6f-7356-03f5-741adbb0525c?restype=share", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-3562936a1eb4444b8c86a561855bae5f-a99c6f59a0ccb244-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "4cfa7c46-f9d3-4084-cfd4-ad19369490bd", + "x-ms-date": "Fri, 29 Oct 2021 19:40:21 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:21 GMT", + "ETag": "\u00220x8D99B13F28B16B6\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:22 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "4cfa7c46-f9d3-4084-cfd4-ad19369490bd", + "x-ms-request-id": "d8bf647b-901a-0009-18fc-cc22b6000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-73f67d3a-8a6f-7356-03f5-741adbb0525c/test-directory-ad6b2d16-f9a0-e847-6c8b-955f86ac8732?restype=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-a514d88995700e4894d37d540df65c7d-c93271ebc7198d4f-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "be93457f-2566-4db8-3511-df486425b923", + "x-ms-date": "Fri, 29 Oct 2021 19:40:21 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:21 GMT", + "ETag": "\u00220x8D99B13F2999DBA\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:22 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "be93457f-2566-4db8-3511-df486425b923", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-10-29T19:40:22.6473402Z", + "x-ms-file-creation-time": "2021-10-29T19:40:22.6473402Z", + "x-ms-file-id": "13835128424026341376", + "x-ms-file-last-write-time": "2021-10-29T19:40:22.6473402Z", + "x-ms-file-parent-id": "0", + "x-ms-file-permission-key": "15110104144358886944*6706197617703823457", + "x-ms-request-id": "d8bf647d-901a-0009-19fc-cc22b6000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-73f67d3a-8a6f-7356-03f5-741adbb0525c/test-directory-ad6b2d16-f9a0-e847-6c8b-955f86ac8732/test-file-1bf67a4c-31c0-1007-a514-468b69474275", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-5da77bd16353884e84e32896e3284afd-eec2ec99a9a04f43-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "2ab36c5a-1900-4d88-3e82-1951de2ce4ee", + "x-ms-content-length": "1024", + "x-ms-date": "Fri, 29 Oct 2021 19:40:21 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-type": "file", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:21 GMT", + "ETag": "\u00220x8D99B13F2A53691\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:22 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "2ab36c5a-1900-4d88-3e82-1951de2ce4ee", + "x-ms-file-attributes": "Archive", + "x-ms-file-change-time": "2021-10-29T19:40:22.7233425Z", + "x-ms-file-creation-time": "2021-10-29T19:40:22.7233425Z", + "x-ms-file-id": "11529285414812647424", + "x-ms-file-last-write-time": "2021-10-29T19:40:22.7233425Z", + "x-ms-file-parent-id": "13835128424026341376", + "x-ms-file-permission-key": "13773932323712163591*6706197617703823457", + "x-ms-request-id": "d8bf647e-901a-0009-1afc-cc22b6000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-73f67d3a-8a6f-7356-03f5-741adbb0525c/test-directory-ad6b2d16-f9a0-e847-6c8b-955f86ac8732/test-file-18f16acf-7845-830a-aef8-b73a0862ea65", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-8cf29e3be5a79743b3173638188498e2-7687ac412230df43-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "bcd53ba1-d94e-e2fb-6130-7b07614e45db", + "x-ms-content-length": "1024", + "x-ms-date": "Fri, 29 Oct 2021 19:40:22 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-type": "file", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:22 GMT", + "ETag": "\u00220x8D99B13F2B00D5D\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:22 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "bcd53ba1-d94e-e2fb-6130-7b07614e45db", + "x-ms-file-attributes": "Archive", + "x-ms-file-change-time": "2021-10-29T19:40:22.7943773Z", + "x-ms-file-creation-time": "2021-10-29T19:40:22.7943773Z", + "x-ms-file-id": "16140971433240035328", + "x-ms-file-last-write-time": "2021-10-29T19:40:22.7943773Z", + "x-ms-file-parent-id": "13835128424026341376", + "x-ms-file-permission-key": "13773932323712163591*6706197617703823457", + "x-ms-request-id": "d8bf647f-901a-0009-1bfc-cc22b6000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-73f67d3a-8a6f-7356-03f5-741adbb0525c/test-directory-ad6b2d16-f9a0-e847-6c8b-955f86ac8732/test-file-18f16acf-7845-830a-aef8-b73a0862ea65?comp=rename", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-0d46261828502d459f7fbdc8a8809ec9-69418c19e4d2e64c-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "cc9880d9-2e8d-4916-0a4e-9b639c6ddc74", + "x-ms-date": "Fri, 29 Oct 2021 19:40:22 GMT", + "x-ms-file-rename-replace-if-exists": "true", + "x-ms-file-rename-source": "https%3A%2F%2F712xscnapby3pev55a.file.preprod.core.windows.net%2Ftest-share-73f67d3a-8a6f-7356-03f5-741adbb0525c%2Ftest-directory-ad6b2d16-f9a0-e847-6c8b-955f86ac8732%2Ftest-file-1bf67a4c-31c0-1007-a514-468b69474275=", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:22 GMT", + "ETag": "\u00220x8D99B13F2BD795E\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:22 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "cc9880d9-2e8d-4916-0a4e-9b639c6ddc74", + "x-ms-file-attributes": "Archive", + "x-ms-file-change-time": "2021-10-29T19:40:22.8823390Z", + "x-ms-file-creation-time": "2021-10-29T19:40:22.7233425Z", + "x-ms-file-id": "11529285414812647424", + "x-ms-file-last-write-time": "2021-10-29T19:40:22.7233425Z", + "x-ms-file-parent-id": "13835128424026341376", + "x-ms-file-permission-key": "13773932323712163591*6706197617703823457", + "x-ms-request-id": "d8bf6480-901a-0009-1cfc-cc22b6000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-73f67d3a-8a6f-7356-03f5-741adbb0525c/test-directory-ad6b2d16-f9a0-e847-6c8b-955f86ac8732/test-file-18f16acf-7845-830a-aef8-b73a0862ea65", + "RequestMethod": "HEAD", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "e12e475d-78b5-694e-9de5-ceac4cf71987", + "x-ms-date": "Fri, 29 Oct 2021 19:40:22 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Length": "1024", + "Content-Type": "application/octet-stream", + "Date": "Fri, 29 Oct 2021 19:40:22 GMT", + "ETag": "\u00220x8D99B13F2BD795E\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:22 GMT", + "x-ms-client-request-id": "e12e475d-78b5-694e-9de5-ceac4cf71987", + "x-ms-file-attributes": "Archive", + "x-ms-file-change-time": "2021-10-29T19:40:22.8823390Z", + "x-ms-file-creation-time": "2021-10-29T19:40:22.7233425Z", + "x-ms-file-id": "11529285414812647424", + "x-ms-file-last-write-time": "2021-10-29T19:40:22.7233425Z", + "x-ms-file-parent-id": "13835128424026341376", + "x-ms-file-permission-key": "13773932323712163591*6706197617703823457", + "x-ms-lease-state": "available", + "x-ms-lease-status": "unlocked", + "x-ms-request-id": "d8bf6481-901a-0009-1dfc-cc22b6000000", + "x-ms-server-encrypted": "false", + "x-ms-type": "File", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-73f67d3a-8a6f-7356-03f5-741adbb0525c?restype=share", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-128467ff0821d246b1db02ec2a79d876-b395dfc994433f4c-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "5505ade2-fa3e-d3be-d794-5f65788e6ee9", + "x-ms-date": "Fri, 29 Oct 2021 19:40:22 GMT", + "x-ms-delete-snapshots": "include", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:22 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "5505ade2-fa3e-d3be-d794-5f65788e6ee9", + "x-ms-request-id": "d8bf6482-901a-0009-1efc-cc22b6000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + } + ], + "Variables": { + "RandomSeed": "808142164", + "Storage_TestConfigDefault": "ProductionTenant\n712xscnapby3pev55a\nU2FuaXRpemVk\nhttps://712xscnapby3pev55a.blob.preprod.core.windows.net\nhttps://712xscnapby3pev55a.file.preprod.core.windows.net\nhttps://712xscnapby3pev55a.queue.core.windows.net\nhttps://712xscnapby3pev55a.table.core.windows.net\n\n\n\n\nhttps://712xscnapby3pev55a-secondary.blob.core.windows.net\nhttps://712xscnapby3pev55a-secondary.file.core.windows.net\nhttps://712xscnapby3pev55a-secondary.queue.core.windows.net\nhttps://712xscnapby3pev55a-secondary.table.core.windows.net\n\nSanitized\n\n\nCloud\nBlobEndpoint=https://712xscnapby3pev55a.blob.preprod.core.windows.net/;QueueEndpoint=https://712xscnapby3pev55a.queue.core.windows.net/;FileEndpoint=https://712xscnapby3pev55a.file.preprod.core.windows.net/;BlobSecondaryEndpoint=https://712xscnapby3pev55a-secondary.blob.core.windows.net/;QueueSecondaryEndpoint=https://712xscnapby3pev55a-secondary.queue.core.windows.net/;FileSecondaryEndpoint=https://712xscnapby3pev55a-secondary.file.core.windows.net/;AccountName=712xscnapby3pev55a;AccountKey=Kg==;\nscope-1\n\n" + } +} \ No newline at end of file diff --git a/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_ReplaceIfExists(True)Async.json b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_ReplaceIfExists(True)Async.json new file mode 100644 index 000000000000..fb1beb232975 --- /dev/null +++ b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_ReplaceIfExists(True)Async.json @@ -0,0 +1,271 @@ +{ + "Entries": [ + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-568312a4-5f97-06b1-c644-3957ac1c519d?restype=share", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-cdfc9211e2d9e34e84697509c8aa7f25-c50729a109deef4c-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "7fcb4716-1d06-1b2b-b81c-ceea5b72918b", + "x-ms-date": "Fri, 29 Oct 2021 19:40:26 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:26 GMT", + "ETag": "\u00220x8D99B13F55B7664\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:27 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "7fcb4716-1d06-1b2b-b81c-ceea5b72918b", + "x-ms-request-id": "d8bf64c4-901a-0009-55fc-cc22b6000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-568312a4-5f97-06b1-c644-3957ac1c519d/test-directory-3a237949-3be4-8d79-baf3-20d4ccc03bd7?restype=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-ec482c7b03e20447b62e963fce3c0d8c-8aeeca094454cb47-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "51a70731-84cb-da9a-cd3d-c513fd564ff7", + "x-ms-date": "Fri, 29 Oct 2021 19:40:26 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:26 GMT", + "ETag": "\u00220x8D99B13F56AC0D3\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:27 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "51a70731-84cb-da9a-cd3d-c513fd564ff7", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-10-29T19:40:27.3733843Z", + "x-ms-file-creation-time": "2021-10-29T19:40:27.3733843Z", + "x-ms-file-id": "13835128424026341376", + "x-ms-file-last-write-time": "2021-10-29T19:40:27.3733843Z", + "x-ms-file-parent-id": "0", + "x-ms-file-permission-key": "15110104144358886944*6706197617703823457", + "x-ms-request-id": "d8bf64c6-901a-0009-56fc-cc22b6000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-568312a4-5f97-06b1-c644-3957ac1c519d/test-directory-3a237949-3be4-8d79-baf3-20d4ccc03bd7/test-file-a164f7e0-2c31-773a-e293-e55ffd79464c", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-0c618241e926b649b72e08c6936d0c5c-ae5c8d759cb74e4a-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "4f1e4635-9309-0592-cc2f-6f389f3bdc54", + "x-ms-content-length": "1024", + "x-ms-date": "Fri, 29 Oct 2021 19:40:26 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-type": "file", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:26 GMT", + "ETag": "\u00220x8D99B13F5768099\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:27 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "4f1e4635-9309-0592-cc2f-6f389f3bdc54", + "x-ms-file-attributes": "Archive", + "x-ms-file-change-time": "2021-10-29T19:40:27.4503833Z", + "x-ms-file-creation-time": "2021-10-29T19:40:27.4503833Z", + "x-ms-file-id": "11529285414812647424", + "x-ms-file-last-write-time": "2021-10-29T19:40:27.4503833Z", + "x-ms-file-parent-id": "13835128424026341376", + "x-ms-file-permission-key": "13773932323712163591*6706197617703823457", + "x-ms-request-id": "d8bf64c7-901a-0009-57fc-cc22b6000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-568312a4-5f97-06b1-c644-3957ac1c519d/test-directory-3a237949-3be4-8d79-baf3-20d4ccc03bd7/test-file-a15578f6-8ab3-f7dd-ec62-83ca94266a5e", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-9c2e567286a57d45b68696c2d04125ad-48c7c16e54f5864e-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "941d4389-f12e-ab4a-6827-63a710c770a6", + "x-ms-content-length": "1024", + "x-ms-date": "Fri, 29 Oct 2021 19:40:26 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-type": "file", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:26 GMT", + "ETag": "\u00220x8D99B13F5812F06\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:27 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "941d4389-f12e-ab4a-6827-63a710c770a6", + "x-ms-file-attributes": "Archive", + "x-ms-file-change-time": "2021-10-29T19:40:27.5203846Z", + "x-ms-file-creation-time": "2021-10-29T19:40:27.5203846Z", + "x-ms-file-id": "16140971433240035328", + "x-ms-file-last-write-time": "2021-10-29T19:40:27.5203846Z", + "x-ms-file-parent-id": "13835128424026341376", + "x-ms-file-permission-key": "13773932323712163591*6706197617703823457", + "x-ms-request-id": "d8bf64c8-901a-0009-58fc-cc22b6000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-568312a4-5f97-06b1-c644-3957ac1c519d/test-directory-3a237949-3be4-8d79-baf3-20d4ccc03bd7/test-file-a15578f6-8ab3-f7dd-ec62-83ca94266a5e?comp=rename", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-3bf9f9dfa0e3624ea19837f6dd4fde2d-320cd94f5c49b242-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "51419fff-d609-0e2f-9c7e-4f33949b1902", + "x-ms-date": "Fri, 29 Oct 2021 19:40:26 GMT", + "x-ms-file-rename-replace-if-exists": "true", + "x-ms-file-rename-source": "https%3A%2F%2F712xscnapby3pev55a.file.preprod.core.windows.net%2Ftest-share-568312a4-5f97-06b1-c644-3957ac1c519d%2Ftest-directory-3a237949-3be4-8d79-baf3-20d4ccc03bd7%2Ftest-file-a164f7e0-2c31-773a-e293-e55ffd79464c=", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:26 GMT", + "ETag": "\u00220x8D99B13F58E2758\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:27 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "51419fff-d609-0e2f-9c7e-4f33949b1902", + "x-ms-file-attributes": "Archive", + "x-ms-file-change-time": "2021-10-29T19:40:27.6053848Z", + "x-ms-file-creation-time": "2021-10-29T19:40:27.4503833Z", + "x-ms-file-id": "11529285414812647424", + "x-ms-file-last-write-time": "2021-10-29T19:40:27.4503833Z", + "x-ms-file-parent-id": "13835128424026341376", + "x-ms-file-permission-key": "13773932323712163591*6706197617703823457", + "x-ms-request-id": "d8bf64c9-901a-0009-59fc-cc22b6000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-568312a4-5f97-06b1-c644-3957ac1c519d/test-directory-3a237949-3be4-8d79-baf3-20d4ccc03bd7/test-file-a15578f6-8ab3-f7dd-ec62-83ca94266a5e", + "RequestMethod": "HEAD", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "70a749aa-1f86-ee9c-e029-1b92d5c56b9a", + "x-ms-date": "Fri, 29 Oct 2021 19:40:26 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Length": "1024", + "Content-Type": "application/octet-stream", + "Date": "Fri, 29 Oct 2021 19:40:26 GMT", + "ETag": "\u00220x8D99B13F58E2758\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:27 GMT", + "x-ms-client-request-id": "70a749aa-1f86-ee9c-e029-1b92d5c56b9a", + "x-ms-file-attributes": "Archive", + "x-ms-file-change-time": "2021-10-29T19:40:27.6053848Z", + "x-ms-file-creation-time": "2021-10-29T19:40:27.4503833Z", + "x-ms-file-id": "11529285414812647424", + "x-ms-file-last-write-time": "2021-10-29T19:40:27.4503833Z", + "x-ms-file-parent-id": "13835128424026341376", + "x-ms-file-permission-key": "13773932323712163591*6706197617703823457", + "x-ms-lease-state": "available", + "x-ms-lease-status": "unlocked", + "x-ms-request-id": "d8bf64ca-901a-0009-5afc-cc22b6000000", + "x-ms-server-encrypted": "false", + "x-ms-type": "File", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-568312a4-5f97-06b1-c644-3957ac1c519d?restype=share", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-9ca2cf6e8f97ef43a5b8a547988aef5f-6423a376ec612d4b-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "4a89da65-a8f3-0d7b-b537-88728e3f8e84", + "x-ms-date": "Fri, 29 Oct 2021 19:40:26 GMT", + "x-ms-delete-snapshots": "include", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:26 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "4a89da65-a8f3-0d7b-b537-88728e3f8e84", + "x-ms-request-id": "d8bf64cb-901a-0009-5bfc-cc22b6000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + } + ], + "Variables": { + "RandomSeed": "201115707", + "Storage_TestConfigDefault": "ProductionTenant\n712xscnapby3pev55a\nU2FuaXRpemVk\nhttps://712xscnapby3pev55a.blob.preprod.core.windows.net\nhttps://712xscnapby3pev55a.file.preprod.core.windows.net\nhttps://712xscnapby3pev55a.queue.core.windows.net\nhttps://712xscnapby3pev55a.table.core.windows.net\n\n\n\n\nhttps://712xscnapby3pev55a-secondary.blob.core.windows.net\nhttps://712xscnapby3pev55a-secondary.file.core.windows.net\nhttps://712xscnapby3pev55a-secondary.queue.core.windows.net\nhttps://712xscnapby3pev55a-secondary.table.core.windows.net\n\nSanitized\n\n\nCloud\nBlobEndpoint=https://712xscnapby3pev55a.blob.preprod.core.windows.net/;QueueEndpoint=https://712xscnapby3pev55a.queue.core.windows.net/;FileEndpoint=https://712xscnapby3pev55a.file.preprod.core.windows.net/;BlobSecondaryEndpoint=https://712xscnapby3pev55a-secondary.blob.core.windows.net/;QueueSecondaryEndpoint=https://712xscnapby3pev55a-secondary.queue.core.windows.net/;FileSecondaryEndpoint=https://712xscnapby3pev55a-secondary.file.core.windows.net/;AccountName=712xscnapby3pev55a;AccountKey=Kg==;\nscope-1\n\n" + } +} \ No newline at end of file diff --git a/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_ShareSAS.json b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_ShareSAS.json new file mode 100644 index 000000000000..315268cae09d --- /dev/null +++ b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_ShareSAS.json @@ -0,0 +1,224 @@ +{ + "Entries": [ + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-d53bc2b4-57b4-b7f2-82c5-5d45af382658?restype=share", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-612708397ffa754b99a5be6bb4535369-dcc253a7c2cb904b-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "eb88d84d-3671-5934-1e22-2081bde84486", + "x-ms-date": "Fri, 29 Oct 2021 19:39:35 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:39:35 GMT", + "ETag": "\u00220x8D99B13D7029C30\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:39:36 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "eb88d84d-3671-5934-1e22-2081bde84486", + "x-ms-request-id": "e116b593-c01a-0001-56fc-cc0599000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-d53bc2b4-57b4-b7f2-82c5-5d45af382658/test-directory-530afb0f-9a76-ea9c-3ac7-bc9b59b81e0b?restype=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-7657b048532c7c49a7056e146636f2fd-1e0e0a8e00c58b4a-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "9d2a77d5-566c-b3e6-3c9d-b1a97a98ff66", + "x-ms-date": "Fri, 29 Oct 2021 19:39:35 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:39:36 GMT", + "ETag": "\u00220x8D99B13D712E435\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:39:36 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "9d2a77d5-566c-b3e6-3c9d-b1a97a98ff66", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-10-29T19:39:36.4659253Z", + "x-ms-file-creation-time": "2021-10-29T19:39:36.4659253Z", + "x-ms-file-id": "13835128424026341376", + "x-ms-file-last-write-time": "2021-10-29T19:39:36.4659253Z", + "x-ms-file-parent-id": "0", + "x-ms-file-permission-key": "15110104144358886944*6706197617703823457", + "x-ms-request-id": "e116b595-c01a-0001-57fc-cc0599000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-d53bc2b4-57b4-b7f2-82c5-5d45af382658/test-directory-530afb0f-9a76-ea9c-3ac7-bc9b59b81e0b/test-file-bd651404-6df0-d4d6-14dc-4f6f83e34032", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-4981e6e94b85b241bc890743df92761d-4486eae8dcfdba43-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "95b4b006-f8a1-6840-a056-889006772f58", + "x-ms-content-length": "1024", + "x-ms-date": "Fri, 29 Oct 2021 19:39:35 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-type": "file", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:39:36 GMT", + "ETag": "\u00220x8D99B13D723D257\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:39:36 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "95b4b006-f8a1-6840-a056-889006772f58", + "x-ms-file-attributes": "Archive", + "x-ms-file-change-time": "2021-10-29T19:39:36.5768791Z", + "x-ms-file-creation-time": "2021-10-29T19:39:36.5768791Z", + "x-ms-file-id": "11529285414812647424", + "x-ms-file-last-write-time": "2021-10-29T19:39:36.5768791Z", + "x-ms-file-parent-id": "13835128424026341376", + "x-ms-file-permission-key": "13773932323712163591*6706197617703823457", + "x-ms-request-id": "e116b598-c01a-0001-58fc-cc0599000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-d53bc2b4-57b4-b7f2-82c5-5d45af382658/test-directory-530afb0f-9a76-ea9c-3ac7-bc9b59b81e0b/test-file-ef977e5d-1dd3-83d8-75a1-a3abd2c44bd7?sv=2021-04-10\u0026se=2021-10-30T19%3A39%3A35Z\u0026sr=s\u0026sp=rcwdl\u0026sig=Sanitized\u0026comp=rename", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "traceparent": "00-93e70f143b9d5c429da30ad9f7d80323-270f13be7b124047-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "0ab44115-c3a5-e897-d831-2000549595dc", + "x-ms-file-rename-source": "https%3A%2F%2F712xscnapby3pev55a.file.preprod.core.windows.net%2Ftest-share-d53bc2b4-57b4-b7f2-82c5-5d45af382658%2Ftest-directory-530afb0f-9a76-ea9c-3ac7-bc9b59b81e0b%2Ftest-file-bd651404-6df0-d4d6-14dc-4f6f83e34032%3Fsv=2021-04-10\u0026se=2021-10-30T19%3A39%3A35Z\u0026sr=s\u0026sp=rcwdl\u0026sig=Sanitized", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:39:36 GMT", + "ETag": "\u00220x8D99B13D72FE059\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:39:36 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "0ab44115-c3a5-e897-d831-2000549595dc", + "x-ms-file-attributes": "Archive", + "x-ms-file-change-time": "2021-10-29T19:39:36.6558809Z", + "x-ms-file-creation-time": "2021-10-29T19:39:36.5768791Z", + "x-ms-file-id": "11529285414812647424", + "x-ms-file-last-write-time": "2021-10-29T19:39:36.5768791Z", + "x-ms-file-parent-id": "13835128424026341376", + "x-ms-file-permission-key": "13773932323712163591*6706197617703823457", + "x-ms-request-id": "e116b599-c01a-0001-59fc-cc0599000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-d53bc2b4-57b4-b7f2-82c5-5d45af382658/test-directory-530afb0f-9a76-ea9c-3ac7-bc9b59b81e0b/test-file-ef977e5d-1dd3-83d8-75a1-a3abd2c44bd7?sv=2021-04-10\u0026se=2021-10-30T19%3A39%3A35Z\u0026sr=s\u0026sp=rcwdl\u0026sig=Sanitized", + "RequestMethod": "HEAD", + "RequestHeaders": { + "Accept": "application/xml", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "909501e3-400f-6532-4d7f-fafd8a91c5b4", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Length": "1024", + "Content-Type": "application/octet-stream", + "Date": "Fri, 29 Oct 2021 19:39:36 GMT", + "ETag": "\u00220x8D99B13D72FE059\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:39:36 GMT", + "x-ms-client-request-id": "909501e3-400f-6532-4d7f-fafd8a91c5b4", + "x-ms-file-attributes": "Archive", + "x-ms-file-change-time": "2021-10-29T19:39:36.6558809Z", + "x-ms-file-creation-time": "2021-10-29T19:39:36.5768791Z", + "x-ms-file-id": "11529285414812647424", + "x-ms-file-last-write-time": "2021-10-29T19:39:36.5768791Z", + "x-ms-file-parent-id": "13835128424026341376", + "x-ms-file-permission-key": "13773932323712163591*6706197617703823457", + "x-ms-lease-state": "available", + "x-ms-lease-status": "unlocked", + "x-ms-request-id": "e116b59a-c01a-0001-5afc-cc0599000000", + "x-ms-server-encrypted": "false", + "x-ms-type": "File", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-d53bc2b4-57b4-b7f2-82c5-5d45af382658?restype=share", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-11c9dfa5c1494b4d9b91b3ec1812760b-447fea5058840e43-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "521cb9a6-05ff-c9cc-7e02-d48e622d285b", + "x-ms-date": "Fri, 29 Oct 2021 19:39:36 GMT", + "x-ms-delete-snapshots": "include", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:39:36 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "521cb9a6-05ff-c9cc-7e02-d48e622d285b", + "x-ms-request-id": "e116b59b-c01a-0001-5bfc-cc0599000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + } + ], + "Variables": { + "DateTimeOffsetNow": "2021-10-29T14:39:35.8623478-05:00", + "RandomSeed": "1012891027", + "Storage_TestConfigDefault": "ProductionTenant\n712xscnapby3pev55a\nU2FuaXRpemVk\nhttps://712xscnapby3pev55a.blob.preprod.core.windows.net\nhttps://712xscnapby3pev55a.file.preprod.core.windows.net\nhttps://712xscnapby3pev55a.queue.core.windows.net\nhttps://712xscnapby3pev55a.table.core.windows.net\n\n\n\n\nhttps://712xscnapby3pev55a-secondary.blob.core.windows.net\nhttps://712xscnapby3pev55a-secondary.file.core.windows.net\nhttps://712xscnapby3pev55a-secondary.queue.core.windows.net\nhttps://712xscnapby3pev55a-secondary.table.core.windows.net\n\nSanitized\n\n\nCloud\nBlobEndpoint=https://712xscnapby3pev55a.blob.preprod.core.windows.net/;QueueEndpoint=https://712xscnapby3pev55a.queue.core.windows.net/;FileEndpoint=https://712xscnapby3pev55a.file.preprod.core.windows.net/;BlobSecondaryEndpoint=https://712xscnapby3pev55a-secondary.blob.core.windows.net/;QueueSecondaryEndpoint=https://712xscnapby3pev55a-secondary.queue.core.windows.net/;FileSecondaryEndpoint=https://712xscnapby3pev55a-secondary.file.core.windows.net/;AccountName=712xscnapby3pev55a;AccountKey=Kg==;\nscope-1\n\n" + } +} \ No newline at end of file diff --git a/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_ShareSASAsync.json b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_ShareSASAsync.json new file mode 100644 index 000000000000..c88698b98fa2 --- /dev/null +++ b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_ShareSASAsync.json @@ -0,0 +1,224 @@ +{ + "Entries": [ + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-2cd1f83c-cdb8-30fc-ad5e-5809631dacb2?restype=share", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-be58fb1c8c83784e92356e730d933954-196e54f2a7a72d47-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "be7179f6-2115-64d0-c265-b17fec07d5ac", + "x-ms-date": "Fri, 29 Oct 2021 19:39:36 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:39:36 GMT", + "ETag": "\u00220x8D99B13D7526A74\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:39:36 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "be7179f6-2115-64d0-c265-b17fec07d5ac", + "x-ms-request-id": "e116b59c-c01a-0001-5cfc-cc0599000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-2cd1f83c-cdb8-30fc-ad5e-5809631dacb2/test-directory-a6760e9d-b1b0-675d-2e70-a9727bb1c890?restype=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-8c54d50fe7e7754b93a7d7591715514c-5ef40884d6a9f546-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "59ada570-7fa5-45e1-1b0a-8fa4775de910", + "x-ms-date": "Fri, 29 Oct 2021 19:39:36 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:39:36 GMT", + "ETag": "\u00220x8D99B13D761540A\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:39:36 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "59ada570-7fa5-45e1-1b0a-8fa4775de910", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-10-29T19:39:36.9799690Z", + "x-ms-file-creation-time": "2021-10-29T19:39:36.9799690Z", + "x-ms-file-id": "13835128424026341376", + "x-ms-file-last-write-time": "2021-10-29T19:39:36.9799690Z", + "x-ms-file-parent-id": "0", + "x-ms-file-permission-key": "15110104144358886944*6706197617703823457", + "x-ms-request-id": "e116b59e-c01a-0001-5dfc-cc0599000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-2cd1f83c-cdb8-30fc-ad5e-5809631dacb2/test-directory-a6760e9d-b1b0-675d-2e70-a9727bb1c890/test-file-2646209d-ecf4-af00-7176-7ae04ca744e4", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-f9fe09be27ceba4bbb50df6b9733557a-008a2bb969218f41-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "021954e7-4d03-8485-a5fd-e72f0401f974", + "x-ms-content-length": "1024", + "x-ms-date": "Fri, 29 Oct 2021 19:39:36 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-type": "file", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:39:36 GMT", + "ETag": "\u00220x8D99B13D76DACF6\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:39:37 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "021954e7-4d03-8485-a5fd-e72f0401f974", + "x-ms-file-attributes": "Archive", + "x-ms-file-change-time": "2021-10-29T19:39:37.0608886Z", + "x-ms-file-creation-time": "2021-10-29T19:39:37.0608886Z", + "x-ms-file-id": "11529285414812647424", + "x-ms-file-last-write-time": "2021-10-29T19:39:37.0608886Z", + "x-ms-file-parent-id": "13835128424026341376", + "x-ms-file-permission-key": "13773932323712163591*6706197617703823457", + "x-ms-request-id": "e116b59f-c01a-0001-5efc-cc0599000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-2cd1f83c-cdb8-30fc-ad5e-5809631dacb2/test-directory-a6760e9d-b1b0-675d-2e70-a9727bb1c890/test-file-48a8abc6-135c-2d0c-368b-42271e5e5178?sv=2021-04-10\u0026se=2021-10-30T19%3A39%3A36Z\u0026sr=s\u0026sp=rcwdl\u0026sig=Sanitized\u0026comp=rename", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "traceparent": "00-28d706626a218a4ea045e50692ac95e9-2984586443bcb241-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "b2db58d4-4050-d370-48eb-cc780b5e6547", + "x-ms-file-rename-source": "https%3A%2F%2F712xscnapby3pev55a.file.preprod.core.windows.net%2Ftest-share-2cd1f83c-cdb8-30fc-ad5e-5809631dacb2%2Ftest-directory-a6760e9d-b1b0-675d-2e70-a9727bb1c890%2Ftest-file-2646209d-ecf4-af00-7176-7ae04ca744e4%3Fsv=2021-04-10\u0026se=2021-10-30T19%3A39%3A36Z\u0026sr=s\u0026sp=rcwdl\u0026sig=Sanitized", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:39:36 GMT", + "ETag": "\u00220x8D99B13D7791EA6\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:39:37 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "b2db58d4-4050-d370-48eb-cc780b5e6547", + "x-ms-file-attributes": "Archive", + "x-ms-file-change-time": "2021-10-29T19:39:37.1358886Z", + "x-ms-file-creation-time": "2021-10-29T19:39:37.0608886Z", + "x-ms-file-id": "11529285414812647424", + "x-ms-file-last-write-time": "2021-10-29T19:39:37.0608886Z", + "x-ms-file-parent-id": "13835128424026341376", + "x-ms-file-permission-key": "13773932323712163591*6706197617703823457", + "x-ms-request-id": "e116b5a0-c01a-0001-5ffc-cc0599000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-2cd1f83c-cdb8-30fc-ad5e-5809631dacb2/test-directory-a6760e9d-b1b0-675d-2e70-a9727bb1c890/test-file-48a8abc6-135c-2d0c-368b-42271e5e5178?sv=2021-04-10\u0026se=2021-10-30T19%3A39%3A36Z\u0026sr=s\u0026sp=rcwdl\u0026sig=Sanitized", + "RequestMethod": "HEAD", + "RequestHeaders": { + "Accept": "application/xml", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "c6535fd5-9e82-ad28-3c25-afa17568a34b", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Length": "1024", + "Content-Type": "application/octet-stream", + "Date": "Fri, 29 Oct 2021 19:39:36 GMT", + "ETag": "\u00220x8D99B13D7791EA6\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:39:37 GMT", + "x-ms-client-request-id": "c6535fd5-9e82-ad28-3c25-afa17568a34b", + "x-ms-file-attributes": "Archive", + "x-ms-file-change-time": "2021-10-29T19:39:37.1358886Z", + "x-ms-file-creation-time": "2021-10-29T19:39:37.0608886Z", + "x-ms-file-id": "11529285414812647424", + "x-ms-file-last-write-time": "2021-10-29T19:39:37.0608886Z", + "x-ms-file-parent-id": "13835128424026341376", + "x-ms-file-permission-key": "13773932323712163591*6706197617703823457", + "x-ms-lease-state": "available", + "x-ms-lease-status": "unlocked", + "x-ms-request-id": "e116b5a1-c01a-0001-60fc-cc0599000000", + "x-ms-server-encrypted": "false", + "x-ms-type": "File", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-2cd1f83c-cdb8-30fc-ad5e-5809631dacb2?restype=share", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-705d48e5a5d79640a7f385bcc24025f3-654a915008b4c04a-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "aba35145-9f0b-0dc5-4693-19e351450f62", + "x-ms-date": "Fri, 29 Oct 2021 19:39:36 GMT", + "x-ms-delete-snapshots": "include", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:39:36 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "aba35145-9f0b-0dc5-4693-19e351450f62", + "x-ms-request-id": "e116b5a2-c01a-0001-61fc-cc0599000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + } + ], + "Variables": { + "DateTimeOffsetNow": "2021-10-29T14:39:36.3445213-05:00", + "RandomSeed": "1234203479", + "Storage_TestConfigDefault": "ProductionTenant\n712xscnapby3pev55a\nU2FuaXRpemVk\nhttps://712xscnapby3pev55a.blob.preprod.core.windows.net\nhttps://712xscnapby3pev55a.file.preprod.core.windows.net\nhttps://712xscnapby3pev55a.queue.core.windows.net\nhttps://712xscnapby3pev55a.table.core.windows.net\n\n\n\n\nhttps://712xscnapby3pev55a-secondary.blob.core.windows.net\nhttps://712xscnapby3pev55a-secondary.file.core.windows.net\nhttps://712xscnapby3pev55a-secondary.queue.core.windows.net\nhttps://712xscnapby3pev55a-secondary.table.core.windows.net\n\nSanitized\n\n\nCloud\nBlobEndpoint=https://712xscnapby3pev55a.blob.preprod.core.windows.net/;QueueEndpoint=https://712xscnapby3pev55a.queue.core.windows.net/;FileEndpoint=https://712xscnapby3pev55a.file.preprod.core.windows.net/;BlobSecondaryEndpoint=https://712xscnapby3pev55a-secondary.blob.core.windows.net/;QueueSecondaryEndpoint=https://712xscnapby3pev55a-secondary.queue.core.windows.net/;FileSecondaryEndpoint=https://712xscnapby3pev55a-secondary.file.core.windows.net/;AccountName=712xscnapby3pev55a;AccountKey=Kg==;\nscope-1\n\n" + } +} \ No newline at end of file diff --git a/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_SourceLeaseId(False).json b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_SourceLeaseId(False).json new file mode 100644 index 000000000000..1f1d17d7662a --- /dev/null +++ b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_SourceLeaseId(False).json @@ -0,0 +1,216 @@ +{ + "Entries": [ + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-c92393f0-6257-8104-a92a-89a638363bac?restype=share", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-e81ebd0ecf6fe447a562a09fa50bd2b6-083763fdd01a5941-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "981376d7-da36-4a7a-d5cb-94eb710ee927", + "x-ms-date": "Fri, 29 Oct 2021 19:40:23 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:23 GMT", + "ETag": "\u00220x8D99B13F37046E1\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:24 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "981376d7-da36-4a7a-d5cb-94eb710ee927", + "x-ms-request-id": "d8bf6493-901a-0009-2cfc-cc22b6000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-c92393f0-6257-8104-a92a-89a638363bac/test-directory-e8072175-37bf-2031-3d8c-c2c22aeb8ca4?restype=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-ab59bcc246703e4fb63fb17d643286f9-78a14a848dfb824a-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "d4a20fab-1ffd-a0be-44f3-5aa917b720e9", + "x-ms-date": "Fri, 29 Oct 2021 19:40:23 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:23 GMT", + "ETag": "\u00220x8D99B13F37FB8C5\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:24 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "d4a20fab-1ffd-a0be-44f3-5aa917b720e9", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-10-29T19:40:24.1553605Z", + "x-ms-file-creation-time": "2021-10-29T19:40:24.1553605Z", + "x-ms-file-id": "13835128424026341376", + "x-ms-file-last-write-time": "2021-10-29T19:40:24.1553605Z", + "x-ms-file-parent-id": "0", + "x-ms-file-permission-key": "15110104144358886944*6706197617703823457", + "x-ms-request-id": "d8bf6495-901a-0009-2dfc-cc22b6000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-c92393f0-6257-8104-a92a-89a638363bac/test-directory-e8072175-37bf-2031-3d8c-c2c22aeb8ca4/test-file-65caef3e-2740-d205-abcc-fb668ec5e4d2", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-e9efb1d30f506649a290e2eb9894a087-06b1f904e8f1b84d-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "4c2dbe39-bfa0-83b8-0ad0-28312457127f", + "x-ms-content-length": "1024", + "x-ms-date": "Fri, 29 Oct 2021 19:40:23 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-type": "file", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:23 GMT", + "ETag": "\u00220x8D99B13F38B050B\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:24 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "4c2dbe39-bfa0-83b8-0ad0-28312457127f", + "x-ms-file-attributes": "Archive", + "x-ms-file-change-time": "2021-10-29T19:40:24.2294027Z", + "x-ms-file-creation-time": "2021-10-29T19:40:24.2294027Z", + "x-ms-file-id": "11529285414812647424", + "x-ms-file-last-write-time": "2021-10-29T19:40:24.2294027Z", + "x-ms-file-parent-id": "13835128424026341376", + "x-ms-file-permission-key": "13773932323712163591*6706197617703823457", + "x-ms-request-id": "d8bf6496-901a-0009-2efc-cc22b6000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-c92393f0-6257-8104-a92a-89a638363bac/test-directory-e8072175-37bf-2031-3d8c-c2c22aeb8ca4/test-file-65caef3e-2740-d205-abcc-fb668ec5e4d2?comp=lease", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-67fc3be1aabb1f4290bd157f36e9b518-20dd93b1b1597244-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "c01ffd1b-d589-3495-1ea7-03d8a7a5d934", + "x-ms-date": "Fri, 29 Oct 2021 19:40:23 GMT", + "x-ms-lease-action": "acquire", + "x-ms-lease-duration": "-1", + "x-ms-proposed-lease-id": "4e42880f-04a0-86a0-48c8-1812aad68adf", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:23 GMT", + "ETag": "\u00220x8D99B13F38B050B\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:24 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "c01ffd1b-d589-3495-1ea7-03d8a7a5d934", + "x-ms-lease-id": "4e42880f-04a0-86a0-48c8-1812aad68adf", + "x-ms-request-id": "d8bf6497-901a-0009-2ffc-cc22b6000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-c92393f0-6257-8104-a92a-89a638363bac/test-directory-e8072175-37bf-2031-3d8c-c2c22aeb8ca4/test-file-5d884946-422a-77e8-5599-3c0bf327f7d2?comp=rename", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-f84d1cd934a7734f8fadcb5e5f6d165a-b5c8e29a14c76e42-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "4532dcbb-7fed-d8cb-14a8-6af0988940f6", + "x-ms-date": "Fri, 29 Oct 2021 19:40:23 GMT", + "x-ms-file-rename-source": "https%3A%2F%2F712xscnapby3pev55a.file.preprod.core.windows.net%2Ftest-share-c92393f0-6257-8104-a92a-89a638363bac%2Ftest-directory-e8072175-37bf-2031-3d8c-c2c22aeb8ca4%2Ftest-file-65caef3e-2740-d205-abcc-fb668ec5e4d2=", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 412, + "ResponseHeaders": { + "Content-Length": "267", + "Content-Type": "application/xml", + "Date": "Fri, 29 Oct 2021 19:40:23 GMT", + "x-ms-client-request-id": "4532dcbb-7fed-d8cb-14a8-6af0988940f6", + "x-ms-error-code": "LeaseIdMissing", + "x-ms-request-id": "d8bf6498-901a-0009-30fc-cc22b6000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [ + "\uFEFF\u003C?xml version=\u00221.0\u0022 encoding=\u0022utf-8\u0022?\u003E\u003CError\u003E\u003CCode\u003ELeaseIdMissing\u003C/Code\u003E\u003CMessage\u003EThere is currently a lease on the file and no lease ID was specified in the request.\n", + "RequestId:d8bf6498-901a-0009-30fc-cc22b6000000\n", + "Time:2021-10-29T19:40:24.3641454Z\u003C/Message\u003E\u003C/Error\u003E" + ] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-c92393f0-6257-8104-a92a-89a638363bac?restype=share", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-296b5ab3e4281b48a9e01832e10100d9-a4d9a30785e29146-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "1750d198-b1f4-6ae5-561e-980d5f653aa7", + "x-ms-date": "Fri, 29 Oct 2021 19:40:23 GMT", + "x-ms-delete-snapshots": "include", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:23 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "1750d198-b1f4-6ae5-561e-980d5f653aa7", + "x-ms-request-id": "d8bf6499-901a-0009-31fc-cc22b6000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + } + ], + "Variables": { + "RandomSeed": "1521447346", + "Storage_TestConfigDefault": "ProductionTenant\n712xscnapby3pev55a\nU2FuaXRpemVk\nhttps://712xscnapby3pev55a.blob.preprod.core.windows.net\nhttps://712xscnapby3pev55a.file.preprod.core.windows.net\nhttps://712xscnapby3pev55a.queue.core.windows.net\nhttps://712xscnapby3pev55a.table.core.windows.net\n\n\n\n\nhttps://712xscnapby3pev55a-secondary.blob.core.windows.net\nhttps://712xscnapby3pev55a-secondary.file.core.windows.net\nhttps://712xscnapby3pev55a-secondary.queue.core.windows.net\nhttps://712xscnapby3pev55a-secondary.table.core.windows.net\n\nSanitized\n\n\nCloud\nBlobEndpoint=https://712xscnapby3pev55a.blob.preprod.core.windows.net/;QueueEndpoint=https://712xscnapby3pev55a.queue.core.windows.net/;FileEndpoint=https://712xscnapby3pev55a.file.preprod.core.windows.net/;BlobSecondaryEndpoint=https://712xscnapby3pev55a-secondary.blob.core.windows.net/;QueueSecondaryEndpoint=https://712xscnapby3pev55a-secondary.queue.core.windows.net/;FileSecondaryEndpoint=https://712xscnapby3pev55a-secondary.file.core.windows.net/;AccountName=712xscnapby3pev55a;AccountKey=Kg==;\nscope-1\n\n" + } +} \ No newline at end of file diff --git a/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_SourceLeaseId(False)Async.json b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_SourceLeaseId(False)Async.json new file mode 100644 index 000000000000..7609f0d460c2 --- /dev/null +++ b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_SourceLeaseId(False)Async.json @@ -0,0 +1,216 @@ +{ + "Entries": [ + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-5f92b9fe-aef3-3749-f86b-0b74517279b7?restype=share", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-5a273e4d9bb8bb4397d2bcb6ba27f22c-8ec4d399ce777e44-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "52ce51b7-6bf9-06fb-16be-cfa414b0a6c1", + "x-ms-date": "Fri, 29 Oct 2021 19:40:28 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:27 GMT", + "ETag": "\u00220x8D99B13F6475C69\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:28 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "52ce51b7-6bf9-06fb-16be-cfa414b0a6c1", + "x-ms-request-id": "d8bf64dc-901a-0009-69fc-cc22b6000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-5f92b9fe-aef3-3749-f86b-0b74517279b7/test-directory-6407f7ce-7e08-9c75-05a5-1336e17156c5?restype=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-d20d0aff66229e44b86a3d5f738f692a-f50d2b8d13acf949-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "e9080b16-e32b-3804-db31-4d5358c525a4", + "x-ms-date": "Fri, 29 Oct 2021 19:40:28 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:27 GMT", + "ETag": "\u00220x8D99B13F656F64B\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:28 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "e9080b16-e32b-3804-db31-4d5358c525a4", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-10-29T19:40:28.9214027Z", + "x-ms-file-creation-time": "2021-10-29T19:40:28.9214027Z", + "x-ms-file-id": "13835128424026341376", + "x-ms-file-last-write-time": "2021-10-29T19:40:28.9214027Z", + "x-ms-file-parent-id": "0", + "x-ms-file-permission-key": "15110104144358886944*6706197617703823457", + "x-ms-request-id": "d8bf64de-901a-0009-6afc-cc22b6000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-5f92b9fe-aef3-3749-f86b-0b74517279b7/test-directory-6407f7ce-7e08-9c75-05a5-1336e17156c5/test-file-15800967-a6f3-a81d-39f0-1ac160e30af5", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-b3460358e151184a968f2e7784386fc1-b9f1b59da1a40444-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "882b7921-c28f-6fa6-ed60-af3ac943d8f8", + "x-ms-content-length": "1024", + "x-ms-date": "Fri, 29 Oct 2021 19:40:28 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-type": "file", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:29 GMT", + "ETag": "\u00220x8D99B13F6629045\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:28 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "882b7921-c28f-6fa6-ed60-af3ac943d8f8", + "x-ms-file-attributes": "Archive", + "x-ms-file-change-time": "2021-10-29T19:40:28.9974341Z", + "x-ms-file-creation-time": "2021-10-29T19:40:28.9974341Z", + "x-ms-file-id": "11529285414812647424", + "x-ms-file-last-write-time": "2021-10-29T19:40:28.9974341Z", + "x-ms-file-parent-id": "13835128424026341376", + "x-ms-file-permission-key": "13773932323712163591*6706197617703823457", + "x-ms-request-id": "d8bf64df-901a-0009-6bfc-cc22b6000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-5f92b9fe-aef3-3749-f86b-0b74517279b7/test-directory-6407f7ce-7e08-9c75-05a5-1336e17156c5/test-file-15800967-a6f3-a81d-39f0-1ac160e30af5?comp=lease", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-175e64156f110848a51555064d1bd06e-0bd72b37a6fc8541-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "814a2cac-dfe2-d2df-3d31-184fa637ed41", + "x-ms-date": "Fri, 29 Oct 2021 19:40:28 GMT", + "x-ms-lease-action": "acquire", + "x-ms-lease-duration": "-1", + "x-ms-proposed-lease-id": "df875727-4fa4-f93b-6f3f-1b6f82accfcf", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:29 GMT", + "ETag": "\u00220x8D99B13F6629045\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:28 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "814a2cac-dfe2-d2df-3d31-184fa637ed41", + "x-ms-lease-id": "df875727-4fa4-f93b-6f3f-1b6f82accfcf", + "x-ms-request-id": "d8bf64e0-901a-0009-6cfc-cc22b6000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-5f92b9fe-aef3-3749-f86b-0b74517279b7/test-directory-6407f7ce-7e08-9c75-05a5-1336e17156c5/test-file-3308e090-f1a3-a53f-f17d-0cf466323c10?comp=rename", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-255df0551e88c24189ebf4a28fe82f8e-ff7fa62455ab2f41-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "dd78a7c3-4356-bb12-eca5-8f65d2eb6b0b", + "x-ms-date": "Fri, 29 Oct 2021 19:40:28 GMT", + "x-ms-file-rename-source": "https%3A%2F%2F712xscnapby3pev55a.file.preprod.core.windows.net%2Ftest-share-5f92b9fe-aef3-3749-f86b-0b74517279b7%2Ftest-directory-6407f7ce-7e08-9c75-05a5-1336e17156c5%2Ftest-file-15800967-a6f3-a81d-39f0-1ac160e30af5=", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 412, + "ResponseHeaders": { + "Content-Length": "267", + "Content-Type": "application/xml", + "Date": "Fri, 29 Oct 2021 19:40:29 GMT", + "x-ms-client-request-id": "dd78a7c3-4356-bb12-eca5-8f65d2eb6b0b", + "x-ms-error-code": "LeaseIdMissing", + "x-ms-request-id": "d8bf64e2-901a-0009-6dfc-cc22b6000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [ + "\uFEFF\u003C?xml version=\u00221.0\u0022 encoding=\u0022utf-8\u0022?\u003E\u003CError\u003E\u003CCode\u003ELeaseIdMissing\u003C/Code\u003E\u003CMessage\u003EThere is currently a lease on the file and no lease ID was specified in the request.\n", + "RequestId:d8bf64e2-901a-0009-6dfc-cc22b6000000\n", + "Time:2021-10-29T19:40:29.1401623Z\u003C/Message\u003E\u003C/Error\u003E" + ] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-5f92b9fe-aef3-3749-f86b-0b74517279b7?restype=share", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-9025f3831a2cf54bba9ad1c73f2b99e6-1a50206683edfd40-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "be30721a-5eb9-85b9-5207-69bcbe8780c9", + "x-ms-date": "Fri, 29 Oct 2021 19:40:28 GMT", + "x-ms-delete-snapshots": "include", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:29 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "be30721a-5eb9-85b9-5207-69bcbe8780c9", + "x-ms-request-id": "d8bf64e3-901a-0009-6efc-cc22b6000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + } + ], + "Variables": { + "RandomSeed": "748852155", + "Storage_TestConfigDefault": "ProductionTenant\n712xscnapby3pev55a\nU2FuaXRpemVk\nhttps://712xscnapby3pev55a.blob.preprod.core.windows.net\nhttps://712xscnapby3pev55a.file.preprod.core.windows.net\nhttps://712xscnapby3pev55a.queue.core.windows.net\nhttps://712xscnapby3pev55a.table.core.windows.net\n\n\n\n\nhttps://712xscnapby3pev55a-secondary.blob.core.windows.net\nhttps://712xscnapby3pev55a-secondary.file.core.windows.net\nhttps://712xscnapby3pev55a-secondary.queue.core.windows.net\nhttps://712xscnapby3pev55a-secondary.table.core.windows.net\n\nSanitized\n\n\nCloud\nBlobEndpoint=https://712xscnapby3pev55a.blob.preprod.core.windows.net/;QueueEndpoint=https://712xscnapby3pev55a.queue.core.windows.net/;FileEndpoint=https://712xscnapby3pev55a.file.preprod.core.windows.net/;BlobSecondaryEndpoint=https://712xscnapby3pev55a-secondary.blob.core.windows.net/;QueueSecondaryEndpoint=https://712xscnapby3pev55a-secondary.queue.core.windows.net/;FileSecondaryEndpoint=https://712xscnapby3pev55a-secondary.file.core.windows.net/;AccountName=712xscnapby3pev55a;AccountKey=Kg==;\nscope-1\n\n" + } +} \ No newline at end of file diff --git a/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_SourceLeaseId(True).json b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_SourceLeaseId(True).json new file mode 100644 index 000000000000..72fb232f776b --- /dev/null +++ b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_SourceLeaseId(True).json @@ -0,0 +1,262 @@ +{ + "Entries": [ + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-48a5c167-d632-159f-a658-ed1d1880b093?restype=share", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-d111fa0311fe4e46a8dacce517c8135b-a3cdc2f38f5adf40-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "830f394d-3701-7aa3-8f1e-bf6654add57c", + "x-ms-date": "Fri, 29 Oct 2021 19:40:22 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:22 GMT", + "ETag": "\u00220x8D99B13F3229C54\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:23 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "830f394d-3701-7aa3-8f1e-bf6654add57c", + "x-ms-request-id": "d8bf648b-901a-0009-25fc-cc22b6000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-48a5c167-d632-159f-a658-ed1d1880b093/test-directory-f9e67973-a721-7482-530c-638d1c46d4b9?restype=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-6831ac95b43bd84a8da60b8ddcee3456-24b25f5d86d71d41-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "c8e43dcf-e806-a667-b69b-2ff4d4155e48", + "x-ms-date": "Fri, 29 Oct 2021 19:40:22 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:22 GMT", + "ETag": "\u00220x8D99B13F330D4D0\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:23 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "c8e43dcf-e806-a667-b69b-2ff4d4155e48", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-10-29T19:40:23.6383440Z", + "x-ms-file-creation-time": "2021-10-29T19:40:23.6383440Z", + "x-ms-file-id": "13835128424026341376", + "x-ms-file-last-write-time": "2021-10-29T19:40:23.6383440Z", + "x-ms-file-parent-id": "0", + "x-ms-file-permission-key": "15110104144358886944*6706197617703823457", + "x-ms-request-id": "d8bf648d-901a-0009-26fc-cc22b6000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-48a5c167-d632-159f-a658-ed1d1880b093/test-directory-f9e67973-a721-7482-530c-638d1c46d4b9/test-file-eff0064a-f6dc-470b-e737-4d1fa9c33f4d", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-aeb819517c7c8f45af24fd1b5bc70aa2-4bb963a92cc73f4c-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "2d75b5a3-5516-d85b-329d-e0cf9b47fcf3", + "x-ms-content-length": "1024", + "x-ms-date": "Fri, 29 Oct 2021 19:40:22 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-type": "file", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:22 GMT", + "ETag": "\u00220x8D99B13F33C487F\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:23 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "2d75b5a3-5516-d85b-329d-e0cf9b47fcf3", + "x-ms-file-attributes": "Archive", + "x-ms-file-change-time": "2021-10-29T19:40:23.7133951Z", + "x-ms-file-creation-time": "2021-10-29T19:40:23.7133951Z", + "x-ms-file-id": "11529285414812647424", + "x-ms-file-last-write-time": "2021-10-29T19:40:23.7133951Z", + "x-ms-file-parent-id": "13835128424026341376", + "x-ms-file-permission-key": "13773932323712163591*6706197617703823457", + "x-ms-request-id": "d8bf648e-901a-0009-27fc-cc22b6000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-48a5c167-d632-159f-a658-ed1d1880b093/test-directory-f9e67973-a721-7482-530c-638d1c46d4b9/test-file-eff0064a-f6dc-470b-e737-4d1fa9c33f4d?comp=lease", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-b3c9d0962532aa458cb107045b5a88a9-f64cec87ee2e8e48-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "197a352d-3170-233d-cd37-dab263a90afd", + "x-ms-date": "Fri, 29 Oct 2021 19:40:22 GMT", + "x-ms-lease-action": "acquire", + "x-ms-lease-duration": "-1", + "x-ms-proposed-lease-id": "a92ce25b-7f57-3de7-5363-f1b2ce344a4a", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:22 GMT", + "ETag": "\u00220x8D99B13F33C487F\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:23 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "197a352d-3170-233d-cd37-dab263a90afd", + "x-ms-lease-id": "a92ce25b-7f57-3de7-5363-f1b2ce344a4a", + "x-ms-request-id": "d8bf648f-901a-0009-28fc-cc22b6000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-48a5c167-d632-159f-a658-ed1d1880b093/test-directory-f9e67973-a721-7482-530c-638d1c46d4b9/test-file-e3739552-08cb-49a4-abb8-db72d4221270?comp=rename", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-15b19e800716344389692627d6bd1876-050d9ff03faa594a-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "9671adda-0f6f-25e9-9031-6eb856cb4faa", + "x-ms-date": "Fri, 29 Oct 2021 19:40:23 GMT", + "x-ms-file-rename-source": "https%3A%2F%2F712xscnapby3pev55a.file.preprod.core.windows.net%2Ftest-share-48a5c167-d632-159f-a658-ed1d1880b093%2Ftest-directory-f9e67973-a721-7482-530c-638d1c46d4b9%2Ftest-file-eff0064a-f6dc-470b-e737-4d1fa9c33f4d=", + "x-ms-return-client-request-id": "true", + "x-ms-source-lease-id": "a92ce25b-7f57-3de7-5363-f1b2ce344a4a", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:23 GMT", + "ETag": "\u00220x8D99B13F3512E4E\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:23 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "9671adda-0f6f-25e9-9031-6eb856cb4faa", + "x-ms-file-attributes": "Archive", + "x-ms-file-change-time": "2021-10-29T19:40:23.8503502Z", + "x-ms-file-creation-time": "2021-10-29T19:40:23.7133951Z", + "x-ms-file-id": "11529285414812647424", + "x-ms-file-last-write-time": "2021-10-29T19:40:23.7133951Z", + "x-ms-file-parent-id": "13835128424026341376", + "x-ms-file-permission-key": "13773932323712163591*6706197617703823457", + "x-ms-request-id": "d8bf6490-901a-0009-29fc-cc22b6000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-48a5c167-d632-159f-a658-ed1d1880b093/test-directory-f9e67973-a721-7482-530c-638d1c46d4b9/test-file-e3739552-08cb-49a4-abb8-db72d4221270", + "RequestMethod": "HEAD", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "2697b6a8-7bb1-6201-5260-0788c321d4ae", + "x-ms-date": "Fri, 29 Oct 2021 19:40:23 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Length": "1024", + "Content-Type": "application/octet-stream", + "Date": "Fri, 29 Oct 2021 19:40:23 GMT", + "ETag": "\u00220x8D99B13F3512E4E\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:23 GMT", + "x-ms-client-request-id": "2697b6a8-7bb1-6201-5260-0788c321d4ae", + "x-ms-file-attributes": "Archive", + "x-ms-file-change-time": "2021-10-29T19:40:23.8503502Z", + "x-ms-file-creation-time": "2021-10-29T19:40:23.7133951Z", + "x-ms-file-id": "11529285414812647424", + "x-ms-file-last-write-time": "2021-10-29T19:40:23.7133951Z", + "x-ms-file-parent-id": "13835128424026341376", + "x-ms-file-permission-key": "13773932323712163591*6706197617703823457", + "x-ms-lease-duration": "infinite", + "x-ms-lease-state": "leased", + "x-ms-lease-status": "locked", + "x-ms-request-id": "d8bf6491-901a-0009-2afc-cc22b6000000", + "x-ms-server-encrypted": "false", + "x-ms-type": "File", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-48a5c167-d632-159f-a658-ed1d1880b093?restype=share", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-c289808190badb4f8e4007993c8fdb01-94046b3dda907b4c-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "a00f4720-2934-a9f9-67df-d5c36aba5e99", + "x-ms-date": "Fri, 29 Oct 2021 19:40:23 GMT", + "x-ms-delete-snapshots": "include", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:23 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "a00f4720-2934-a9f9-67df-d5c36aba5e99", + "x-ms-request-id": "d8bf6492-901a-0009-2bfc-cc22b6000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + } + ], + "Variables": { + "RandomSeed": "143210662", + "Storage_TestConfigDefault": "ProductionTenant\n712xscnapby3pev55a\nU2FuaXRpemVk\nhttps://712xscnapby3pev55a.blob.preprod.core.windows.net\nhttps://712xscnapby3pev55a.file.preprod.core.windows.net\nhttps://712xscnapby3pev55a.queue.core.windows.net\nhttps://712xscnapby3pev55a.table.core.windows.net\n\n\n\n\nhttps://712xscnapby3pev55a-secondary.blob.core.windows.net\nhttps://712xscnapby3pev55a-secondary.file.core.windows.net\nhttps://712xscnapby3pev55a-secondary.queue.core.windows.net\nhttps://712xscnapby3pev55a-secondary.table.core.windows.net\n\nSanitized\n\n\nCloud\nBlobEndpoint=https://712xscnapby3pev55a.blob.preprod.core.windows.net/;QueueEndpoint=https://712xscnapby3pev55a.queue.core.windows.net/;FileEndpoint=https://712xscnapby3pev55a.file.preprod.core.windows.net/;BlobSecondaryEndpoint=https://712xscnapby3pev55a-secondary.blob.core.windows.net/;QueueSecondaryEndpoint=https://712xscnapby3pev55a-secondary.queue.core.windows.net/;FileSecondaryEndpoint=https://712xscnapby3pev55a-secondary.file.core.windows.net/;AccountName=712xscnapby3pev55a;AccountKey=Kg==;\nscope-1\n\n" + } +} \ No newline at end of file diff --git a/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_SourceLeaseId(True)Async.json b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_SourceLeaseId(True)Async.json new file mode 100644 index 000000000000..24ffd5879010 --- /dev/null +++ b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_SourceLeaseId(True)Async.json @@ -0,0 +1,262 @@ +{ + "Entries": [ + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-e3218105-1b67-21ad-dc99-ddd32a55dac3?restype=share", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-0f8db426dd9adc40a7a6fa2459a31599-de5834550c5b5349-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "36a5eb07-8407-41e6-2d3e-a501db2fa3ac", + "x-ms-date": "Fri, 29 Oct 2021 19:40:27 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:27 GMT", + "ETag": "\u00220x8D99B13F5F6CB63\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:28 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "36a5eb07-8407-41e6-2d3e-a501db2fa3ac", + "x-ms-request-id": "d8bf64d3-901a-0009-62fc-cc22b6000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-e3218105-1b67-21ad-dc99-ddd32a55dac3/test-directory-1e90057e-8859-1d1e-531c-a7d82552c516?restype=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-246ae8fe770fc7419f699b52f37988ee-d4534104ede97f4f-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "55dd49ec-3c34-7e0c-cc88-e2eadd0d1cda", + "x-ms-date": "Fri, 29 Oct 2021 19:40:27 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:27 GMT", + "ETag": "\u00220x8D99B13F606173D\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:28 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "55dd49ec-3c34-7e0c-cc88-e2eadd0d1cda", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-10-29T19:40:28.3914045Z", + "x-ms-file-creation-time": "2021-10-29T19:40:28.3914045Z", + "x-ms-file-id": "13835128424026341376", + "x-ms-file-last-write-time": "2021-10-29T19:40:28.3914045Z", + "x-ms-file-parent-id": "0", + "x-ms-file-permission-key": "15110104144358886944*6706197617703823457", + "x-ms-request-id": "d8bf64d5-901a-0009-63fc-cc22b6000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-e3218105-1b67-21ad-dc99-ddd32a55dac3/test-directory-1e90057e-8859-1d1e-531c-a7d82552c516/test-file-64c28e78-6363-d9fc-49c4-9e131074da27", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-3a3e44cdbd7481409d1c5254082b6d4b-4f745c04aefb4d47-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "b5319d29-c469-88a9-4d03-0c709ef96d57", + "x-ms-content-length": "1024", + "x-ms-date": "Fri, 29 Oct 2021 19:40:27 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-type": "file", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:27 GMT", + "ETag": "\u00220x8D99B13F6116189\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:28 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "b5319d29-c469-88a9-4d03-0c709ef96d57", + "x-ms-file-attributes": "Archive", + "x-ms-file-change-time": "2021-10-29T19:40:28.4653961Z", + "x-ms-file-creation-time": "2021-10-29T19:40:28.4653961Z", + "x-ms-file-id": "11529285414812647424", + "x-ms-file-last-write-time": "2021-10-29T19:40:28.4653961Z", + "x-ms-file-parent-id": "13835128424026341376", + "x-ms-file-permission-key": "13773932323712163591*6706197617703823457", + "x-ms-request-id": "d8bf64d6-901a-0009-64fc-cc22b6000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-e3218105-1b67-21ad-dc99-ddd32a55dac3/test-directory-1e90057e-8859-1d1e-531c-a7d82552c516/test-file-64c28e78-6363-d9fc-49c4-9e131074da27?comp=lease", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-b961500396f3cb4c9fa98fc25106612a-34812c5a15d3d545-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "05791cdf-aad9-e84f-3829-08a8cb949777", + "x-ms-date": "Fri, 29 Oct 2021 19:40:27 GMT", + "x-ms-lease-action": "acquire", + "x-ms-lease-duration": "-1", + "x-ms-proposed-lease-id": "43f7bbae-4021-0865-acc1-f915f0d51878", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:27 GMT", + "ETag": "\u00220x8D99B13F6116189\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:28 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "05791cdf-aad9-e84f-3829-08a8cb949777", + "x-ms-lease-id": "43f7bbae-4021-0865-acc1-f915f0d51878", + "x-ms-request-id": "d8bf64d8-901a-0009-65fc-cc22b6000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-e3218105-1b67-21ad-dc99-ddd32a55dac3/test-directory-1e90057e-8859-1d1e-531c-a7d82552c516/test-file-719993eb-f90f-8814-feca-53beb2f2a43a?comp=rename", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-a5445ac0cd52a64aafcc2d0f14e8bc1f-ce973bcb43669548-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "cf8716cb-f1d7-e561-07f0-070f56913645", + "x-ms-date": "Fri, 29 Oct 2021 19:40:27 GMT", + "x-ms-file-rename-source": "https%3A%2F%2F712xscnapby3pev55a.file.preprod.core.windows.net%2Ftest-share-e3218105-1b67-21ad-dc99-ddd32a55dac3%2Ftest-directory-1e90057e-8859-1d1e-531c-a7d82552c516%2Ftest-file-64c28e78-6363-d9fc-49c4-9e131074da27=", + "x-ms-return-client-request-id": "true", + "x-ms-source-lease-id": "43f7bbae-4021-0865-acc1-f915f0d51878", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:27 GMT", + "ETag": "\u00220x8D99B13F6278239\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:28 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "cf8716cb-f1d7-e561-07f0-070f56913645", + "x-ms-file-attributes": "Archive", + "x-ms-file-change-time": "2021-10-29T19:40:28.6104121Z", + "x-ms-file-creation-time": "2021-10-29T19:40:28.4653961Z", + "x-ms-file-id": "11529285414812647424", + "x-ms-file-last-write-time": "2021-10-29T19:40:28.4653961Z", + "x-ms-file-parent-id": "13835128424026341376", + "x-ms-file-permission-key": "13773932323712163591*6706197617703823457", + "x-ms-request-id": "d8bf64d9-901a-0009-66fc-cc22b6000000", + "x-ms-request-server-encrypted": "false", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-e3218105-1b67-21ad-dc99-ddd32a55dac3/test-directory-1e90057e-8859-1d1e-531c-a7d82552c516/test-file-719993eb-f90f-8814-feca-53beb2f2a43a", + "RequestMethod": "HEAD", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "9cf2f767-d56b-6d62-2650-cd6a0a8fd54a", + "x-ms-date": "Fri, 29 Oct 2021 19:40:27 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Length": "1024", + "Content-Type": "application/octet-stream", + "Date": "Fri, 29 Oct 2021 19:40:27 GMT", + "ETag": "\u00220x8D99B13F6278239\u0022", + "Last-Modified": "Fri, 29 Oct 2021 19:40:28 GMT", + "x-ms-client-request-id": "9cf2f767-d56b-6d62-2650-cd6a0a8fd54a", + "x-ms-file-attributes": "Archive", + "x-ms-file-change-time": "2021-10-29T19:40:28.6104121Z", + "x-ms-file-creation-time": "2021-10-29T19:40:28.4653961Z", + "x-ms-file-id": "11529285414812647424", + "x-ms-file-last-write-time": "2021-10-29T19:40:28.4653961Z", + "x-ms-file-parent-id": "13835128424026341376", + "x-ms-file-permission-key": "13773932323712163591*6706197617703823457", + "x-ms-lease-duration": "infinite", + "x-ms-lease-state": "leased", + "x-ms-lease-status": "locked", + "x-ms-request-id": "d8bf64da-901a-0009-67fc-cc22b6000000", + "x-ms-server-encrypted": "false", + "x-ms-type": "File", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-e3218105-1b67-21ad-dc99-ddd32a55dac3?restype=share", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-b2b8692cf0e95e498ff3a29960368389-42ecac1501952741-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", + "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + ], + "x-ms-client-request-id": "5ea81f84-9a9f-afd9-6bdc-1c0df6b1cd65", + "x-ms-date": "Fri, 29 Oct 2021 19:40:27 GMT", + "x-ms-delete-snapshots": "include", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "Date": "Fri, 29 Oct 2021 19:40:27 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "5ea81f84-9a9f-afd9-6bdc-1c0df6b1cd65", + "x-ms-request-id": "d8bf64db-901a-0009-68fc-cc22b6000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + } + ], + "Variables": { + "RandomSeed": "109969424", + "Storage_TestConfigDefault": "ProductionTenant\n712xscnapby3pev55a\nU2FuaXRpemVk\nhttps://712xscnapby3pev55a.blob.preprod.core.windows.net\nhttps://712xscnapby3pev55a.file.preprod.core.windows.net\nhttps://712xscnapby3pev55a.queue.core.windows.net\nhttps://712xscnapby3pev55a.table.core.windows.net\n\n\n\n\nhttps://712xscnapby3pev55a-secondary.blob.core.windows.net\nhttps://712xscnapby3pev55a-secondary.file.core.windows.net\nhttps://712xscnapby3pev55a-secondary.queue.core.windows.net\nhttps://712xscnapby3pev55a-secondary.table.core.windows.net\n\nSanitized\n\n\nCloud\nBlobEndpoint=https://712xscnapby3pev55a.blob.preprod.core.windows.net/;QueueEndpoint=https://712xscnapby3pev55a.queue.core.windows.net/;FileEndpoint=https://712xscnapby3pev55a.file.preprod.core.windows.net/;BlobSecondaryEndpoint=https://712xscnapby3pev55a-secondary.blob.core.windows.net/;QueueSecondaryEndpoint=https://712xscnapby3pev55a-secondary.queue.core.windows.net/;FileSecondaryEndpoint=https://712xscnapby3pev55a-secondary.file.core.windows.net/;AccountName=712xscnapby3pev55a;AccountKey=Kg==;\nscope-1\n\n" + } +} \ No newline at end of file From 9ee3c3b552ca806881ee300b75d6eb4bbc883646 Mon Sep 17 00:00:00 2001 From: Sean McCullough Date: Mon, 15 Nov 2021 12:33:25 -0600 Subject: [PATCH 17/21] Swagger update --- .../src/Generated/DirectoryRestClient.cs | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/sdk/storage/Azure.Storage.Files.Shares/src/Generated/DirectoryRestClient.cs b/sdk/storage/Azure.Storage.Files.Shares/src/Generated/DirectoryRestClient.cs index fe55d68eb1f6..e17bc5c6f2c6 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/src/Generated/DirectoryRestClient.cs +++ b/sdk/storage/Azure.Storage.Files.Shares/src/Generated/DirectoryRestClient.cs @@ -697,7 +697,7 @@ public ResponseWithHeaders ForceCloseHandles( } } - internal HttpMessage CreateRenameRequest(string renameSource, int? timeout, bool? replaceIfExists, bool? ignoreReadOnly, string sourceLeaseId, string destinationLeaseId, string filePermission, string filePermissionKey, CopyFileSmbInfo copyFileSmbInfo, FileHttpHeaders fileHttpHeaders) + internal HttpMessage CreateRenameRequest(string renameSource, int? timeout, bool? replaceIfExists, bool? ignoreReadOnly, string sourceLeaseId, string destinationLeaseId, string filePermission, string filePermissionKey, CopyFileSmbInfo copyFileSmbInfo) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -749,10 +749,6 @@ internal HttpMessage CreateRenameRequest(string renameSource, int? timeout, bool { request.Headers.Add("x-ms-file-permission-key", filePermissionKey); } - if (fileHttpHeaders?.FileContentType != null) - { - request.Headers.Add("x-ms-content-type", fileHttpHeaders.FileContentType); - } request.Headers.Add("Accept", "application/xml"); return message; } @@ -767,17 +763,16 @@ internal HttpMessage CreateRenameRequest(string renameSource, int? timeout, bool /// If specified the permission (security descriptor) shall be set for the directory/file. This header can be used if Permission size is <= 8KB, else x-ms-file-permission-key header shall be used. Default value: Inherit. If SDDL is specified as input, it must have owner, group and dacl. Note: Only one of the x-ms-file-permission or x-ms-file-permission-key should be specified. /// Key of the permission to be set for the directory/file. Note: Only one of the x-ms-file-permission or x-ms-file-permission-key should be specified. /// Parameter group. - /// Parameter group. /// The cancellation token to use. /// is null. - public async Task> RenameAsync(string renameSource, int? timeout = null, bool? replaceIfExists = null, bool? ignoreReadOnly = null, string sourceLeaseId = null, string destinationLeaseId = null, string filePermission = null, string filePermissionKey = null, CopyFileSmbInfo copyFileSmbInfo = null, FileHttpHeaders fileHttpHeaders = null, CancellationToken cancellationToken = default) + public async Task> RenameAsync(string renameSource, int? timeout = null, bool? replaceIfExists = null, bool? ignoreReadOnly = null, string sourceLeaseId = null, string destinationLeaseId = null, string filePermission = null, string filePermissionKey = null, CopyFileSmbInfo copyFileSmbInfo = null, CancellationToken cancellationToken = default) { if (renameSource == null) { throw new ArgumentNullException(nameof(renameSource)); } - using var message = CreateRenameRequest(renameSource, timeout, replaceIfExists, ignoreReadOnly, sourceLeaseId, destinationLeaseId, filePermission, filePermissionKey, copyFileSmbInfo, fileHttpHeaders); + using var message = CreateRenameRequest(renameSource, timeout, replaceIfExists, ignoreReadOnly, sourceLeaseId, destinationLeaseId, filePermission, filePermissionKey, copyFileSmbInfo); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); var headers = new DirectoryRenameHeaders(message.Response); switch (message.Response.Status) @@ -799,17 +794,16 @@ public async Task> RenameAsync(strin /// If specified the permission (security descriptor) shall be set for the directory/file. This header can be used if Permission size is <= 8KB, else x-ms-file-permission-key header shall be used. Default value: Inherit. If SDDL is specified as input, it must have owner, group and dacl. Note: Only one of the x-ms-file-permission or x-ms-file-permission-key should be specified. /// Key of the permission to be set for the directory/file. Note: Only one of the x-ms-file-permission or x-ms-file-permission-key should be specified. /// Parameter group. - /// Parameter group. /// The cancellation token to use. /// is null. - public ResponseWithHeaders Rename(string renameSource, int? timeout = null, bool? replaceIfExists = null, bool? ignoreReadOnly = null, string sourceLeaseId = null, string destinationLeaseId = null, string filePermission = null, string filePermissionKey = null, CopyFileSmbInfo copyFileSmbInfo = null, FileHttpHeaders fileHttpHeaders = null, CancellationToken cancellationToken = default) + public ResponseWithHeaders Rename(string renameSource, int? timeout = null, bool? replaceIfExists = null, bool? ignoreReadOnly = null, string sourceLeaseId = null, string destinationLeaseId = null, string filePermission = null, string filePermissionKey = null, CopyFileSmbInfo copyFileSmbInfo = null, CancellationToken cancellationToken = default) { if (renameSource == null) { throw new ArgumentNullException(nameof(renameSource)); } - using var message = CreateRenameRequest(renameSource, timeout, replaceIfExists, ignoreReadOnly, sourceLeaseId, destinationLeaseId, filePermission, filePermissionKey, copyFileSmbInfo, fileHttpHeaders); + using var message = CreateRenameRequest(renameSource, timeout, replaceIfExists, ignoreReadOnly, sourceLeaseId, destinationLeaseId, filePermission, filePermissionKey, copyFileSmbInfo); _pipeline.Send(message, cancellationToken); var headers = new DirectoryRenameHeaders(message.Response); switch (message.Response.Status) From 670dd427bf9adda697de3ae2f9e832989c75478d Mon Sep 17 00:00:00 2001 From: Sean McCullough Date: Mon, 29 Nov 2021 13:37:03 -0600 Subject: [PATCH 18/21] Update --- ...ure.Storage.Files.Shares.netstandard2.0.cs | 5 +--- .../src/Models/ShareFileRenameOptions.cs | 29 +++++-------------- .../src/ShareDirectoryClient.cs | 17 ++++------- .../src/ShareFileClient.cs | 10 +++---- .../src/autorest.md | 2 +- .../tests/DirectoryClientTests.cs | 5 +++- 6 files changed, 23 insertions(+), 45 deletions(-) diff --git a/sdk/storage/Azure.Storage.Files.Shares/api/Azure.Storage.Files.Shares.netstandard2.0.cs b/sdk/storage/Azure.Storage.Files.Shares/api/Azure.Storage.Files.Shares.netstandard2.0.cs index 8714c70a0ae8..c1e7d9a4f855 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/api/Azure.Storage.Files.Shares.netstandard2.0.cs +++ b/sdk/storage/Azure.Storage.Files.Shares/api/Azure.Storage.Files.Shares.netstandard2.0.cs @@ -797,13 +797,10 @@ public partial class ShareFileRenameOptions public ShareFileRenameOptions() { } public string ContentType { get { throw null; } set { } } public Azure.Storage.Files.Shares.Models.ShareFileRequestConditions DestinationRequestConditions { get { throw null; } set { } } - public Azure.Storage.Files.Shares.Models.NtfsFileAttributes? FileAttributes { get { throw null; } set { } } - public System.DateTimeOffset? FileCreatedOn { get { throw null; } set { } } - public System.DateTimeOffset? FileLastWrittenOn { get { throw null; } set { } } public string FilePermission { get { throw null; } set { } } - public string FilePermissionKey { get { throw null; } set { } } public bool? IgnoreReadOnly { get { throw null; } set { } } public bool? ReplaceIfExists { get { throw null; } set { } } + public Azure.Storage.Files.Shares.Models.FileSmbProperties SmbProperties { get { throw null; } set { } } public Azure.Storage.Files.Shares.Models.ShareFileRequestConditions SourceRequestConditions { get { throw null; } set { } } } public partial class ShareFileRequestConditions diff --git a/sdk/storage/Azure.Storage.Files.Shares/src/Models/ShareFileRenameOptions.cs b/sdk/storage/Azure.Storage.Files.Shares/src/Models/ShareFileRenameOptions.cs index 5b7f4e5655b3..28a89fa92192 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/src/Models/ShareFileRenameOptions.cs +++ b/sdk/storage/Azure.Storage.Files.Shares/src/Models/ShareFileRenameOptions.cs @@ -34,39 +34,24 @@ public class ShareFileRenameOptions public ShareFileRequestConditions SourceRequestConditions { get; set; } /// - /// Destination request conditions. + /// Destination request conditions. /// public ShareFileRequestConditions DestinationRequestConditions { get; set; } /// - /// The file system attributes for this file. + /// Optional SMB properties to set on the destination file or directory. /// - public NtfsFileAttributes? FileAttributes { get; set; } + public FileSmbProperties SmbProperties { get; set; } /// - /// The creation time of the file. - /// - public DateTimeOffset? FileCreatedOn { get; set; } - - /// - /// The last write time of the file. - /// - public DateTimeOffset? FileLastWrittenOn { get; set; } - - /// - /// Optional file permission to set on the destination. + /// Optional file permission to set on the destination file or directory. /// public string FilePermission { get; set; } /// - /// Optional if FilePermission is not specified. This can only be specified if FilePermission is not specified. - /// - public string FilePermissionKey { get; set; } - - /// - /// Optional. Sets the file’s content type. If this property is not specified on the request, then the property will - /// be cleared for the file. Subsequent calls to Get File Properties will not return this property, unless it is explicitly - /// set on the file again. + /// Optional. Not applicable for directories. Sets the file’s content type. If this property is not specified on the request, + /// then the property will be cleared for the file. Subsequent calls to Get File Properties will not return this property, + /// unless it is explicitly set on the file again. /// public string ContentType { get; set; } } diff --git a/sdk/storage/Azure.Storage.Files.Shares/src/ShareDirectoryClient.cs b/sdk/storage/Azure.Storage.Files.Shares/src/ShareDirectoryClient.cs index ab93cb7aff3d..ba32e9233657 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/src/ShareDirectoryClient.cs +++ b/sdk/storage/Azure.Storage.Files.Shares/src/ShareDirectoryClient.cs @@ -2458,17 +2458,12 @@ private async Task> RenameInternal( CopyFileSmbInfo copyFileSmbInfo = new CopyFileSmbInfo { - FileAttributes = options?.FileAttributes?.ToAttributesString(), - FileCreationTime = options?.FileCreatedOn.ToFileDateTimeString(), - FileLastWriteTime = options?.FileLastWrittenOn.ToFileDateTimeString(), + FileAttributes = options?.SmbProperties?.FileAttributes?.ToAttributesString(), + FileCreationTime = options?.SmbProperties?.FileCreatedOn.ToFileDateTimeString(), + FileLastWriteTime = options?.SmbProperties?.FileLastWrittenOn.ToFileDateTimeString(), IgnoreReadOnly = options?.IgnoreReadOnly }; - FileHttpHeaders fileHttpHeaders = new FileHttpHeaders - { - FileContentType = options?.ContentType - }; - if (async) { response = await destDirectoryClient.DirectoryRestClient.RenameAsync( @@ -2478,9 +2473,8 @@ private async Task> RenameInternal( sourceLeaseId: options?.SourceRequestConditions?.LeaseId, destinationLeaseId: options?.DestinationRequestConditions?.LeaseId, filePermission: options?.FilePermission, - filePermissionKey: options?.FilePermissionKey, + filePermissionKey: options?.SmbProperties?.FilePermissionKey, copyFileSmbInfo: copyFileSmbInfo, - fileHttpHeaders: fileHttpHeaders, cancellationToken: cancellationToken) .ConfigureAwait(false); } @@ -2493,9 +2487,8 @@ private async Task> RenameInternal( sourceLeaseId: options?.SourceRequestConditions?.LeaseId, destinationLeaseId: options?.DestinationRequestConditions?.LeaseId, filePermission: options?.FilePermission, - filePermissionKey: options?.FilePermissionKey, + filePermissionKey: options?.SmbProperties?.FilePermissionKey, copyFileSmbInfo: copyFileSmbInfo, - fileHttpHeaders: fileHttpHeaders, cancellationToken: cancellationToken); } diff --git a/sdk/storage/Azure.Storage.Files.Shares/src/ShareFileClient.cs b/sdk/storage/Azure.Storage.Files.Shares/src/ShareFileClient.cs index 8706ccfbf75c..5ac0ebbad9a4 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/src/ShareFileClient.cs +++ b/sdk/storage/Azure.Storage.Files.Shares/src/ShareFileClient.cs @@ -5958,9 +5958,9 @@ private async Task> RenameInternal( CopyFileSmbInfo copyFileSmbInfo = new CopyFileSmbInfo { - FileAttributes = options?.FileAttributes?.ToAttributesString(), - FileCreationTime = options?.FileCreatedOn.ToFileDateTimeString(), - FileLastWriteTime = options?.FileLastWrittenOn.ToFileDateTimeString(), + FileAttributes = options?.SmbProperties?.FileAttributes?.ToAttributesString(), + FileCreationTime = options?.SmbProperties?.FileCreatedOn.ToFileDateTimeString(), + FileLastWriteTime = options?.SmbProperties?.FileLastWrittenOn.ToFileDateTimeString(), IgnoreReadOnly = options?.IgnoreReadOnly }; @@ -5978,7 +5978,7 @@ private async Task> RenameInternal( sourceLeaseId: options?.SourceRequestConditions?.LeaseId, destinationLeaseId: options?.DestinationRequestConditions?.LeaseId, filePermission: options?.FilePermission, - filePermissionKey: options?.FilePermissionKey, + filePermissionKey: options?.SmbProperties?.FilePermissionKey, copyFileSmbInfo: copyFileSmbInfo, fileHttpHeaders: fileHttpHeaders, cancellationToken: cancellationToken) @@ -5993,7 +5993,7 @@ private async Task> RenameInternal( sourceLeaseId: options?.SourceRequestConditions?.LeaseId, destinationLeaseId: options?.DestinationRequestConditions?.LeaseId, filePermission: options?.FilePermission, - filePermissionKey: options?.FilePermissionKey, + filePermissionKey: options?.SmbProperties?.FilePermissionKey, copyFileSmbInfo: copyFileSmbInfo, fileHttpHeaders: fileHttpHeaders, cancellationToken: cancellationToken); diff --git a/sdk/storage/Azure.Storage.Files.Shares/src/autorest.md b/sdk/storage/Azure.Storage.Files.Shares/src/autorest.md index e48b5e6b548e..c1825566cd81 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/src/autorest.md +++ b/sdk/storage/Azure.Storage.Files.Shares/src/autorest.md @@ -4,7 +4,7 @@ Run `dotnet build /t:GenerateCode` to generate code. ``` yaml input-file: - - C:\Users\seanmcc\git\azure-rest-api-specs\specification\storage\data-plane\Microsoft.FileStorage\preview\2021-04-10\file.json + - https://raw.githubusercontent.com/Azure/azure-rest-api-specs/564d0137d08defea63d9de2413ef5336fbfe2e6d/specification/storage/data-plane/Microsoft.FileStorage/preview/2021-04-10/file.json # https://github.com/Azure/autorest/issues/4075 skip-semantics-validation: true modelerfour: diff --git a/sdk/storage/Azure.Storage.Files.Shares/tests/DirectoryClientTests.cs b/sdk/storage/Azure.Storage.Files.Shares/tests/DirectoryClientTests.cs index 29603706c32c..794af693bfc3 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/tests/DirectoryClientTests.cs +++ b/sdk/storage/Azure.Storage.Files.Shares/tests/DirectoryClientTests.cs @@ -1336,7 +1336,10 @@ await destFile.CreateAsync( { ReplaceIfExists = true, IgnoreReadOnly = ignoreReadOnly, - FileAttributes = NtfsFileAttributes.Directory + SmbProperties = new FileSmbProperties + { + FileAttributes = NtfsFileAttributes.Directory + } }; // Act From b43528c09fd6960e952b8f1b2b3575cadc926ec2 Mon Sep 17 00:00:00 2001 From: Sean McCullough Date: Tue, 30 Nov 2021 13:04:47 -0600 Subject: [PATCH 19/21] more tests --- .../src/Models/ShareFileRenameOptions.cs | 2 +- .../src/ShareDirectoryClient.cs | 2 + .../src/ShareFileClient.cs | 2 + .../tests/DirectoryClientTests.cs | 131 ++++++++- .../tests/FileClientTests.cs | 121 ++++++++ .../RenameAsync_FilePermission.json | 181 ++++++++++++ ...FilePermissionAndFilePermissionKeySet.json | 106 +++++++ ...ermissionAndFilePermissionKeySetAsync.json | 106 +++++++ .../RenameAsync_FilePermissionAsync.json | 181 ++++++++++++ .../RenameAsync_FilePermissionTooLarge.json | 106 +++++++ ...nameAsync_FilePermissionTooLargeAsync.json | 106 +++++++ .../RenameAsync_SmbPropertie.json | 216 +++++++++++++++ .../RenameAsync_SmbPropertieAsync.json | 216 +++++++++++++++ .../RenameAsync_FilePermission.json | 226 +++++++++++++++ ...FilePermissionAndFilePermissionKeySet.json | 149 ++++++++++ ...ermissionAndFilePermissionKeySetAsync.json | 149 ++++++++++ .../RenameAsync_FilePermissionAsync.json | 226 +++++++++++++++ .../RenameAsync_FilePermissionTooLarge.json | 149 ++++++++++ ...nameAsync_FilePermissionTooLargeAsync.json | 149 ++++++++++ .../RenameAsync_SmbProperties.json | 261 ++++++++++++++++++ .../RenameAsync_SmbPropertiesAsync.json | 261 ++++++++++++++++++ 21 files changed, 3042 insertions(+), 4 deletions(-) create mode 100644 sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_FilePermission.json create mode 100644 sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_FilePermissionAndFilePermissionKeySet.json create mode 100644 sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_FilePermissionAndFilePermissionKeySetAsync.json create mode 100644 sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_FilePermissionAsync.json create mode 100644 sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_FilePermissionTooLarge.json create mode 100644 sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_FilePermissionTooLargeAsync.json create mode 100644 sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_SmbPropertie.json create mode 100644 sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_SmbPropertieAsync.json create mode 100644 sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_FilePermission.json create mode 100644 sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_FilePermissionAndFilePermissionKeySet.json create mode 100644 sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_FilePermissionAndFilePermissionKeySetAsync.json create mode 100644 sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_FilePermissionAsync.json create mode 100644 sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_FilePermissionTooLarge.json create mode 100644 sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_FilePermissionTooLargeAsync.json create mode 100644 sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_SmbProperties.json create mode 100644 sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_SmbPropertiesAsync.json diff --git a/sdk/storage/Azure.Storage.Files.Shares/src/Models/ShareFileRenameOptions.cs b/sdk/storage/Azure.Storage.Files.Shares/src/Models/ShareFileRenameOptions.cs index 28a89fa92192..3256a81aefad 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/src/Models/ShareFileRenameOptions.cs +++ b/sdk/storage/Azure.Storage.Files.Shares/src/Models/ShareFileRenameOptions.cs @@ -29,7 +29,7 @@ public class ShareFileRenameOptions public bool? IgnoreReadOnly { get; set; } /// - /// Source request conditions. + /// Source request conditions. This parameter is only applicable if the source is a file. /// public ShareFileRequestConditions SourceRequestConditions { get; set; } diff --git a/sdk/storage/Azure.Storage.Files.Shares/src/ShareDirectoryClient.cs b/sdk/storage/Azure.Storage.Files.Shares/src/ShareDirectoryClient.cs index ba32e9233657..27a1046debfe 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/src/ShareDirectoryClient.cs +++ b/sdk/storage/Azure.Storage.Files.Shares/src/ShareDirectoryClient.cs @@ -2431,6 +2431,8 @@ private async Task> RenameInternal( { scope.Start(); + ShareExtensions.AssertValidFilePermissionAndKey(options?.FilePermission, options?.SmbProperties?.FilePermissionKey); + // Build destination URI ShareUriBuilder destUriBuilder = new ShareUriBuilder(Uri) { diff --git a/sdk/storage/Azure.Storage.Files.Shares/src/ShareFileClient.cs b/sdk/storage/Azure.Storage.Files.Shares/src/ShareFileClient.cs index 5ac0ebbad9a4..fc001cb8ad05 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/src/ShareFileClient.cs +++ b/sdk/storage/Azure.Storage.Files.Shares/src/ShareFileClient.cs @@ -5931,6 +5931,8 @@ private async Task> RenameInternal( { scope.Start(); + ShareExtensions.AssertValidFilePermissionAndKey(options?.FilePermission, options?.SmbProperties?.FilePermissionKey); + // Build destination URI ShareUriBuilder destUriBuilder = new ShareUriBuilder(Uri) { diff --git a/sdk/storage/Azure.Storage.Files.Shares/tests/DirectoryClientTests.cs b/sdk/storage/Azure.Storage.Files.Shares/tests/DirectoryClientTests.cs index 794af693bfc3..ac012bc63834 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/tests/DirectoryClientTests.cs +++ b/sdk/storage/Azure.Storage.Files.Shares/tests/DirectoryClientTests.cs @@ -1416,18 +1416,143 @@ public async Task RenameAsync_NonAsciiSourceAndDestination() { // Arrange await using DisposingShare test = await SharesClientBuilder.GetTestShareAsync(); - ShareDirectoryClient SourceDir = InstrumentClient(test.Share.GetDirectoryClient(GetNewNonAsciiDirectoryName())); - await SourceDir.CreateAsync(); + ShareDirectoryClient sourceDir = InstrumentClient(test.Share.GetDirectoryClient(GetNewNonAsciiDirectoryName())); + await sourceDir.CreateAsync(); string destDirName = GetNewNonAsciiDirectoryName(); // Act - ShareDirectoryClient destDir = await SourceDir.RenameAsync(destinationPath: destDirName); + ShareDirectoryClient destDir = await sourceDir.RenameAsync(destinationPath: destDirName); // Assert await destDir.GetPropertiesAsync(); } + [RecordedTest] + [ServiceVersion(Min = ShareClientOptions.ServiceVersion.V2021_04_10)] + public async Task RenameAsync_FilePermission() + { + // Arrange + await using DisposingShare test = await SharesClientBuilder.GetTestShareAsync(); + ShareDirectoryClient sourceDir = InstrumentClient(test.Share.GetDirectoryClient(GetNewNonAsciiDirectoryName())); + await sourceDir.CreateAsync(); + + string destDirName = GetNewDirectoryName(); + + ShareFileRenameOptions options = new ShareFileRenameOptions + { + FilePermission = "O:S-1-5-21-2127521184-1604012920-1887927527-21560751G:S-1-5-21-2127521184-1604012920-1887927527-513D:AI(A;;FA;;;SY)(A;;FA;;;BA)(A;;0x1200a9;;;S-1-5-21-397955417-626881126-188441444-3053964)" + }; + + // Act + ShareDirectoryClient destDir = await sourceDir.RenameAsync( + destinationPath: destDirName, + options: options); + + Response propertiesResponse = await destDir.GetPropertiesAsync(); + + // Assert + Assert.IsNotNull(propertiesResponse.Value.SmbProperties.FilePermissionKey); + } + + [RecordedTest] + [ServiceVersion(Min = ShareClientOptions.ServiceVersion.V2021_04_10)] + public async Task RenameAsync_FilePermissionAndFilePermissionKeySet() + { + // Arrange + await using DisposingShare test = await SharesClientBuilder.GetTestShareAsync(); + ShareDirectoryClient sourceDir = InstrumentClient(test.Share.GetDirectoryClient(GetNewNonAsciiDirectoryName())); + await sourceDir.CreateAsync(); + + string destDirName = GetNewDirectoryName(); + + ShareFileRenameOptions options = new ShareFileRenameOptions + { + FilePermission = "O:S-1-5-21-2127521184-1604012920-1887927527-21560751G:S-1-5-21-2127521184-1604012920-1887927527-513D:AI(A;;FA;;;SY)(A;;FA;;;BA)(A;;0x1200a9;;;S-1-5-21-397955417-626881126-188441444-3053964)", + SmbProperties = new FileSmbProperties + { + FilePermissionKey = "filePermissionKey" + } + }; + + // Act + await TestHelper.AssertExpectedExceptionAsync( + sourceDir.RenameAsync( + destinationPath: destDirName, + options: options), + e => Assert.AreEqual("filePermission and filePermissionKey cannot both be set", e.Message)); + } + + [RecordedTest] + [ServiceVersion(Min = ShareClientOptions.ServiceVersion.V2021_04_10)] + public async Task RenameAsync_FilePermissionTooLarge() + { + // Arrange + await using DisposingShare test = await SharesClientBuilder.GetTestShareAsync(); + ShareDirectoryClient sourceDir = InstrumentClient(test.Share.GetDirectoryClient(GetNewNonAsciiDirectoryName())); + await sourceDir.CreateAsync(); + + string destDirName = GetNewDirectoryName(); + + string filePermission = new string('*', 9 * Constants.KB); + + ShareFileRenameOptions options = new ShareFileRenameOptions + { + FilePermission = filePermission + }; + + // Act + await TestHelper.AssertExpectedExceptionAsync( + sourceDir.RenameAsync( + destinationPath: destDirName, + options: options), + e => + { + Assert.AreEqual("filePermission", e.ParamName); + StringAssert.StartsWith("Value must be less than or equal to 8192", e.Message); + }); + } + + [RecordedTest] + [ServiceVersion(Min = ShareClientOptions.ServiceVersion.V2021_04_10)] + public async Task RenameAsync_SmbPropertie() + { + // Arrange + await using DisposingShare test = await SharesClientBuilder.GetTestShareAsync(); + ShareDirectoryClient sourceDir = InstrumentClient(test.Share.GetDirectoryClient(GetNewNonAsciiDirectoryName())); + await sourceDir.CreateAsync(); + + string destDirName = GetNewDirectoryName(); + + string permission = "O:S-1-5-21-2127521184-1604012920-1887927527-21560751G:S-1-5-21-2127521184-1604012920-1887927527-513D:AI(A;;FA;;;SY)(A;;FA;;;BA)(A;;0x1200a9;;;S-1-5-21-397955417-626881126-188441444-3053964)"; + Response createPermissionResponse = await test.Share.CreatePermissionAsync(permission); + + FileSmbProperties smbProperties = new FileSmbProperties + { + FilePermissionKey = createPermissionResponse.Value.FilePermissionKey, + FileAttributes = ShareExtensions.ToFileAttributes("Directory|ReadOnly"), + FileCreatedOn = new DateTimeOffset(2019, 8, 15, 5, 15, 25, 60, TimeSpan.Zero), + FileLastWrittenOn = new DateTimeOffset(2019, 8, 26, 5, 15, 25, 60, TimeSpan.Zero), + }; + + ShareFileRenameOptions options = new ShareFileRenameOptions + { + SmbProperties = smbProperties + }; + + // Act + ShareDirectoryClient destDir = await sourceDir.RenameAsync( + destinationPath: destDirName, + options: options); + + Response propertiesResponse = await destDir.GetPropertiesAsync(); + + // Assert + Assert.AreEqual(smbProperties.FileAttributes, propertiesResponse.Value.SmbProperties.FileAttributes); + Assert.AreEqual(smbProperties.FileCreatedOn, propertiesResponse.Value.SmbProperties.FileCreatedOn); + Assert.AreEqual(smbProperties.FileLastWrittenOn, propertiesResponse.Value.SmbProperties.FileLastWrittenOn); + } + [RecordedTest] [ServiceVersion(Min = ShareClientOptions.ServiceVersion.V2021_04_10)] public async Task RenameAsync_ShareSAS() diff --git a/sdk/storage/Azure.Storage.Files.Shares/tests/FileClientTests.cs b/sdk/storage/Azure.Storage.Files.Shares/tests/FileClientTests.cs index b3fb843e5a35..24a25c3e9b38 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/tests/FileClientTests.cs +++ b/sdk/storage/Azure.Storage.Files.Shares/tests/FileClientTests.cs @@ -3901,6 +3901,127 @@ public async Task RenameAsync_NonAsciiSourceAndDestination() await destFile.GetPropertiesAsync(); } + [RecordedTest] + [ServiceVersion(Min = ShareClientOptions.ServiceVersion.V2021_04_10)] + public async Task RenameAsync_FilePermission() + { + // Arrange + await using DisposingDirectory test = await SharesClientBuilder.GetTestDirectoryAsync(); + ShareFileClient sourceFile = InstrumentClient(test.Directory.GetFileClient(GetNewFileName())); + await sourceFile.CreateAsync(Constants.KB); + string destFileName = GetNewFileName(); + + ShareFileRenameOptions options = new ShareFileRenameOptions + { + FilePermission = "O:S-1-5-21-2127521184-1604012920-1887927527-21560751G:S-1-5-21-2127521184-1604012920-1887927527-513D:AI(A;;FA;;;SY)(A;;FA;;;BA)(A;;0x1200a9;;;S-1-5-21-397955417-626881126-188441444-3053964)" + }; + + // Act + ShareFileClient destFile = await sourceFile.RenameAsync( + destinationPath: test.Directory.Name + "/" + destFileName, + options: options); + + Response propertiesResponse = await destFile.GetPropertiesAsync(); + + // Assert + Assert.IsNotNull(propertiesResponse.Value.SmbProperties.FilePermissionKey); + } + + [RecordedTest] + [ServiceVersion(Min = ShareClientOptions.ServiceVersion.V2021_04_10)] + public async Task RenameAsync_FilePermissionAndFilePermissionKeySet() + { + // Arrange + await using DisposingDirectory test = await SharesClientBuilder.GetTestDirectoryAsync(); + ShareFileClient sourceFile = InstrumentClient(test.Directory.GetFileClient(GetNewFileName())); + await sourceFile.CreateAsync(Constants.KB); + string destFileName = GetNewFileName(); + + ShareFileRenameOptions options = new ShareFileRenameOptions + { + FilePermission = "O:S-1-5-21-2127521184-1604012920-1887927527-21560751G:S-1-5-21-2127521184-1604012920-1887927527-513D:AI(A;;FA;;;SY)(A;;FA;;;BA)(A;;0x1200a9;;;S-1-5-21-397955417-626881126-188441444-3053964)", + SmbProperties = new FileSmbProperties + { + FilePermissionKey = "filePermissionKey" + } + }; + + // Act + await TestHelper.AssertExpectedExceptionAsync( + sourceFile.RenameAsync( + destinationPath: test.Directory.Name + "/" + destFileName, + options: options), + e => Assert.AreEqual("filePermission and filePermissionKey cannot both be set", e.Message)); + } + + [RecordedTest] + [ServiceVersion(Min = ShareClientOptions.ServiceVersion.V2021_04_10)] + public async Task RenameAsync_FilePermissionTooLarge() + { + // Arrange + await using DisposingDirectory test = await SharesClientBuilder.GetTestDirectoryAsync(); + ShareFileClient sourceFile = InstrumentClient(test.Directory.GetFileClient(GetNewFileName())); + await sourceFile.CreateAsync(Constants.KB); + string destFileName = GetNewFileName(); + + string filePermission = new string('*', 9 * Constants.KB); + + ShareFileRenameOptions options = new ShareFileRenameOptions + { + FilePermission = filePermission + }; + + // Act + await TestHelper.AssertExpectedExceptionAsync( + sourceFile.RenameAsync( + destinationPath: test.Directory.Name + "/" + destFileName, + options: options), + e => + { + Assert.AreEqual("filePermission", e.ParamName); + StringAssert.StartsWith("Value must be less than or equal to 8192", e.Message); + }); + } + + [RecordedTest] + [ServiceVersion(Min = ShareClientOptions.ServiceVersion.V2021_04_10)] + public async Task RenameAsync_SmbProperties() + { + // Arrange + await using DisposingDirectory test = await SharesClientBuilder.GetTestDirectoryAsync(); + ShareFileClient sourceFile = InstrumentClient(test.Directory.GetFileClient(GetNewFileName())); + await sourceFile.CreateAsync(Constants.KB); + string destFileName = GetNewFileName(); + + string permission = "O:S-1-5-21-2127521184-1604012920-1887927527-21560751G:S-1-5-21-2127521184-1604012920-1887927527-513D:AI(A;;FA;;;SY)(A;;FA;;;BA)(A;;0x1200a9;;;S-1-5-21-397955417-626881126-188441444-3053964)"; + Response createPermissionResponse = await test.Share.CreatePermissionAsync(permission); + + FileSmbProperties smbProperties = new FileSmbProperties + { + FilePermissionKey = createPermissionResponse.Value.FilePermissionKey, + FileAttributes = ShareExtensions.ToFileAttributes("Archive|ReadOnly"), + FileCreatedOn = new DateTimeOffset(2019, 8, 15, 5, 15, 25, 60, TimeSpan.Zero), + FileLastWrittenOn = new DateTimeOffset(2019, 8, 26, 5, 15, 25, 60, TimeSpan.Zero), + }; + + ShareFileRenameOptions options = new ShareFileRenameOptions + { + SmbProperties = smbProperties + }; + + // Act + ShareFileClient destFile = await sourceFile.RenameAsync( + destinationPath: test.Directory.Name + "/" + destFileName, + options: options); + + Response propertiesResponse = await destFile.GetPropertiesAsync(); + + // Assert + Assert.AreEqual(smbProperties.FileAttributes, propertiesResponse.Value.SmbProperties.FileAttributes); + Assert.AreEqual(smbProperties.FileCreatedOn, propertiesResponse.Value.SmbProperties.FileCreatedOn); + Assert.AreEqual(smbProperties.FileLastWrittenOn, propertiesResponse.Value.SmbProperties.FileLastWrittenOn); + } + [RecordedTest] [ServiceVersion(Min = ShareClientOptions.ServiceVersion.V2021_04_10)] public async Task RenameAsync_ShareSAS() diff --git a/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_FilePermission.json b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_FilePermission.json new file mode 100644 index 000000000000..0ef9e24e73d9 --- /dev/null +++ b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_FilePermission.json @@ -0,0 +1,181 @@ +{ + "Entries": [ + { + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-15e9e942-2a14-a7b0-7d9b-b84894068227?restype=share", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-737efaf4bd0cba469305f94ccbba5010-82aa42bfef5c1747-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" + ], + "x-ms-client-request-id": "7f144905-43f2-2570-cbb6-eadf4d87aaaa", + "x-ms-date": "Tue, 30 Nov 2021 19:04:08 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Tue, 30 Nov 2021 19:04:11 GMT", + "ETag": "\u00220x8D9B43431BF31B6\u0022", + "Last-Modified": "Tue, 30 Nov 2021 19:04:11 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "7f144905-43f2-2570-cbb6-eadf4d87aaaa", + "x-ms-request-id": "11fc74aa-201a-0000-481d-e6e568000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-15e9e942-2a14-a7b0-7d9b-b84894068227/test-dire%C2%A2t%20%C3%98%C2%AE%CF%92%253A-04268a3f-2246-6b88-2020-a29a24a95066?restype=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-2a62bdd6af1d4f41b86c7f9450d6cb67-16e9da872d052240-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" + ], + "x-ms-client-request-id": "ccc65bcf-a4f0-e236-c0a8-5fd1a0d50021", + "x-ms-date": "Tue, 30 Nov 2021 19:04:09 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Tue, 30 Nov 2021 19:04:11 GMT", + "ETag": "\u00220x8D9B43431DB6E42\u0022", + "Last-Modified": "Tue, 30 Nov 2021 19:04:11 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "ccc65bcf-a4f0-e236-c0a8-5fd1a0d50021", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-11-30T19:04:11.7399106Z", + "x-ms-file-creation-time": "2021-11-30T19:04:11.7399106Z", + "x-ms-file-id": "13835128424026341376", + "x-ms-file-last-write-time": "2021-11-30T19:04:11.7399106Z", + "x-ms-file-parent-id": "0", + "x-ms-file-permission-key": "10156757773834485186*23892369358363523", + "x-ms-request-id": "11fc74ad-201a-0000-491d-e6e568000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-15e9e942-2a14-a7b0-7d9b-b84894068227/test-directory-11ed8366-5f44-3db8-55fd-00402bb77e36?restype=directory\u0026comp=rename", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-e0e996698c1f01468d1b3a3d4c60698e-328e321ee2578744-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" + ], + "x-ms-client-request-id": "696bd505-69fc-70a6-a389-77f2a3f5b709", + "x-ms-date": "Tue, 30 Nov 2021 19:04:09 GMT", + "x-ms-file-permission": "O:S-1-5-21-2127521184-1604012920-1887927527-21560751G:S-1-5-21-2127521184-1604012920-1887927527-513D:AI(A;;FA;;;SY)(A;;FA;;;BA)(A;;0x1200a9;;;S-1-5-21-397955417-626881126-188441444-3053964)", + "x-ms-file-rename-source": "https%3A%2F%2Ffp8xscnapby3pev24a.file.preprod.core.windows.net%2Ftest-share-15e9e942-2a14-a7b0-7d9b-b84894068227%2Ftest-dire%C2%A2t\u002B%C3%98%C2%AE%CF%92%253A-04268a3f-2246-6b88-2020-a29a24a95066=", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Date": "Tue, 30 Nov 2021 19:04:11 GMT", + "ETag": "\u00220x8D9B43431EA3BBB\u0022", + "Last-Modified": "Tue, 30 Nov 2021 19:04:11 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "696bd505-69fc-70a6-a389-77f2a3f5b709", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-11-30T19:04:11.8369211Z", + "x-ms-file-creation-time": "2021-11-30T19:04:11.7399106Z", + "x-ms-file-id": "13835128424026341376", + "x-ms-file-last-write-time": "2021-11-30T19:04:11.7399106Z", + "x-ms-file-parent-id": "0", + "x-ms-file-permission-key": "12075044870606081650*23892369358363523", + "x-ms-request-id": "11fc74af-201a-0000-4a1d-e6e568000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-15e9e942-2a14-a7b0-7d9b-b84894068227/test-directory-11ed8366-5f44-3db8-55fd-00402bb77e36?restype=directory", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" + ], + "x-ms-client-request-id": "553ad375-154b-3c39-115a-26590c83aa0f", + "x-ms-date": "Tue, 30 Nov 2021 19:04:09 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Date": "Tue, 30 Nov 2021 19:04:11 GMT", + "ETag": "\u00220x8D9B43431EA3BBB\u0022", + "Last-Modified": "Tue, 30 Nov 2021 19:04:11 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "553ad375-154b-3c39-115a-26590c83aa0f", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-11-30T19:04:11.8369211Z", + "x-ms-file-creation-time": "2021-11-30T19:04:11.7399106Z", + "x-ms-file-id": "13835128424026341376", + "x-ms-file-last-write-time": "2021-11-30T19:04:11.7399106Z", + "x-ms-file-parent-id": "0", + "x-ms-file-permission-key": "12075044870606081650*23892369358363523", + "x-ms-request-id": "11fc74b1-201a-0000-4b1d-e6e568000000", + "x-ms-server-encrypted": "true", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-15e9e942-2a14-a7b0-7d9b-b84894068227?restype=share", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-048d5130c2089949aece0ebd129994d3-52d388abc024f14d-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" + ], + "x-ms-client-request-id": "d07d84ef-61ba-14bd-f0ef-d7af10e4d689", + "x-ms-date": "Tue, 30 Nov 2021 19:04:10 GMT", + "x-ms-delete-snapshots": "include", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "Date": "Tue, 30 Nov 2021 19:04:11 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "d07d84ef-61ba-14bd-f0ef-d7af10e4d689", + "x-ms-request-id": "11fc74b2-201a-0000-4c1d-e6e568000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + } + ], + "Variables": { + "RandomSeed": "468364029", + "Storage_TestConfigDefault": "ProductionTenant\nfp8xscnapby3pev24a\nU2FuaXRpemVk\nhttps://fp8xscnapby3pev24a.blob.preprod.core.windows.net\nhttps://fp8xscnapby3pev24a.file.preprod.core.windows.net\nhttps://fp8xscnapby3pev24a.queue.core.windows.net\nhttps://fp8xscnapby3pev24a.table.core.windows.net\n\n\n\n\nhttps://fp8xscnapby3pev24a-secondary.blob.core.windows.net\nhttps://fp8xscnapby3pev24a-secondary.file.core.windows.net\nhttps://fp8xscnapby3pev24a-secondary.queue.core.windows.net\nhttps://fp8xscnapby3pev24a-secondary.table.core.windows.net\n\nSanitized\n\n\nCloud\nBlobEndpoint=https://fp8xscnapby3pev24a.blob.preprod.core.windows.net/;QueueEndpoint=https://fp8xscnapby3pev24a.queue.core.windows.net/;FileEndpoint=https://fp8xscnapby3pev24a.file.preprod.core.windows.net/;BlobSecondaryEndpoint=https://fp8xscnapby3pev24a-secondary.blob.core.windows.net/;QueueSecondaryEndpoint=https://fp8xscnapby3pev24a-secondary.queue.core.windows.net/;FileSecondaryEndpoint=https://fp8xscnapby3pev24a-secondary.file.core.windows.net/;AccountName=fp8xscnapby3pev24a;AccountKey=Kg==;\nseanscope1\n\n" + } +} \ No newline at end of file diff --git a/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_FilePermissionAndFilePermissionKeySet.json b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_FilePermissionAndFilePermissionKeySet.json new file mode 100644 index 000000000000..b52ad13d4ec7 --- /dev/null +++ b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_FilePermissionAndFilePermissionKeySet.json @@ -0,0 +1,106 @@ +{ + "Entries": [ + { + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-d5aca371-4441-ad4a-ca36-6fddca5339d6?restype=share", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-6dfdab6aedad9a47ba64375c8e5d8045-f7f95afa8c9af94f-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" + ], + "x-ms-client-request-id": "4c8b2216-7c39-c440-38f3-f51905b058d4", + "x-ms-date": "Tue, 30 Nov 2021 19:04:10 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Tue, 30 Nov 2021 19:04:11 GMT", + "ETag": "\u00220x8D9B4343217DA1A\u0022", + "Last-Modified": "Tue, 30 Nov 2021 19:04:12 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "4c8b2216-7c39-c440-38f3-f51905b058d4", + "x-ms-request-id": "11fc74b3-201a-0000-4d1d-e6e568000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-d5aca371-4441-ad4a-ca36-6fddca5339d6/test-dire%C2%A2t%20%C3%98%C2%AE%CF%92%253A-e59617b4-c870-e1d9-d612-b03d8f8c21d8?restype=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-11e58cce60a6be40aaf2bf1b1ba017f6-fb7439dc1d92e24e-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" + ], + "x-ms-client-request-id": "7409e0aa-095b-4e9d-49a9-7627cb0335ac", + "x-ms-date": "Tue, 30 Nov 2021 19:04:10 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Tue, 30 Nov 2021 19:04:11 GMT", + "ETag": "\u00220x8D9B43432271DA2\u0022", + "Last-Modified": "Tue, 30 Nov 2021 19:04:12 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "7409e0aa-095b-4e9d-49a9-7627cb0335ac", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-11-30T19:04:12.2359202Z", + "x-ms-file-creation-time": "2021-11-30T19:04:12.2359202Z", + "x-ms-file-id": "13835128424026341376", + "x-ms-file-last-write-time": "2021-11-30T19:04:12.2359202Z", + "x-ms-file-parent-id": "0", + "x-ms-file-permission-key": "10156757773834485186*23892369358363523", + "x-ms-request-id": "11fc74b5-201a-0000-4e1d-e6e568000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-d5aca371-4441-ad4a-ca36-6fddca5339d6?restype=share", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-590553fe4e855e4099186e381c0300da-c5518b8c33ab7647-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" + ], + "x-ms-client-request-id": "7eabc219-f1e0-fa89-d441-f9ecb77bf4ee", + "x-ms-date": "Tue, 30 Nov 2021 19:04:10 GMT", + "x-ms-delete-snapshots": "include", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "Date": "Tue, 30 Nov 2021 19:04:11 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "7eabc219-f1e0-fa89-d441-f9ecb77bf4ee", + "x-ms-request-id": "11fc74b6-201a-0000-4f1d-e6e568000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + } + ], + "Variables": { + "RandomSeed": "1448547441", + "Storage_TestConfigDefault": "ProductionTenant\nfp8xscnapby3pev24a\nU2FuaXRpemVk\nhttps://fp8xscnapby3pev24a.blob.preprod.core.windows.net\nhttps://fp8xscnapby3pev24a.file.preprod.core.windows.net\nhttps://fp8xscnapby3pev24a.queue.core.windows.net\nhttps://fp8xscnapby3pev24a.table.core.windows.net\n\n\n\n\nhttps://fp8xscnapby3pev24a-secondary.blob.core.windows.net\nhttps://fp8xscnapby3pev24a-secondary.file.core.windows.net\nhttps://fp8xscnapby3pev24a-secondary.queue.core.windows.net\nhttps://fp8xscnapby3pev24a-secondary.table.core.windows.net\n\nSanitized\n\n\nCloud\nBlobEndpoint=https://fp8xscnapby3pev24a.blob.preprod.core.windows.net/;QueueEndpoint=https://fp8xscnapby3pev24a.queue.core.windows.net/;FileEndpoint=https://fp8xscnapby3pev24a.file.preprod.core.windows.net/;BlobSecondaryEndpoint=https://fp8xscnapby3pev24a-secondary.blob.core.windows.net/;QueueSecondaryEndpoint=https://fp8xscnapby3pev24a-secondary.queue.core.windows.net/;FileSecondaryEndpoint=https://fp8xscnapby3pev24a-secondary.file.core.windows.net/;AccountName=fp8xscnapby3pev24a;AccountKey=Kg==;\nseanscope1\n\n" + } +} \ No newline at end of file diff --git a/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_FilePermissionAndFilePermissionKeySetAsync.json b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_FilePermissionAndFilePermissionKeySetAsync.json new file mode 100644 index 000000000000..26ffca381355 --- /dev/null +++ b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_FilePermissionAndFilePermissionKeySetAsync.json @@ -0,0 +1,106 @@ +{ + "Entries": [ + { + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-13ae773a-a971-9b96-fc47-15e560c06151?restype=share", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-32f79e6d4d7aa244acb1d31b024f0b13-5dfc9dd96e02904e-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" + ], + "x-ms-client-request-id": "b0573b31-d905-ba5d-9f43-91c090173b28", + "x-ms-date": "Tue, 30 Nov 2021 19:04:11 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Tue, 30 Nov 2021 19:04:13 GMT", + "ETag": "\u00220x8D9B4343312B8F8\u0022", + "Last-Modified": "Tue, 30 Nov 2021 19:04:13 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "b0573b31-d905-ba5d-9f43-91c090173b28", + "x-ms-request-id": "11fc74c8-201a-0000-5e1d-e6e568000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-13ae773a-a971-9b96-fc47-15e560c06151/test-dire%C2%A2t%20%C3%98%C2%AE%CF%92%253A-a04ae350-739c-2355-875a-3a6ecba7f1d7?restype=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-1d762b3e7f080b43952fcc824c99dea5-8fbfbcb251066148-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" + ], + "x-ms-client-request-id": "c59db5c8-4eda-bd5e-e533-28ab9fefeef7", + "x-ms-date": "Tue, 30 Nov 2021 19:04:11 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Tue, 30 Nov 2021 19:04:13 GMT", + "ETag": "\u00220x8D9B4343321D28E\u0022", + "Last-Modified": "Tue, 30 Nov 2021 19:04:13 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "c59db5c8-4eda-bd5e-e533-28ab9fefeef7", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-11-30T19:04:13.8789518Z", + "x-ms-file-creation-time": "2021-11-30T19:04:13.8789518Z", + "x-ms-file-id": "13835128424026341376", + "x-ms-file-last-write-time": "2021-11-30T19:04:13.8789518Z", + "x-ms-file-parent-id": "0", + "x-ms-file-permission-key": "10156757773834485186*23892369358363523", + "x-ms-request-id": "11fc74ca-201a-0000-5f1d-e6e568000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-13ae773a-a971-9b96-fc47-15e560c06151?restype=share", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-fbc678d6a76b044f88b564b4bcc1ca5b-9de12211072ff341-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" + ], + "x-ms-client-request-id": "cbc058a4-4cc6-b15e-f6fe-2ed4685499a2", + "x-ms-date": "Tue, 30 Nov 2021 19:04:11 GMT", + "x-ms-delete-snapshots": "include", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "Date": "Tue, 30 Nov 2021 19:04:13 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "cbc058a4-4cc6-b15e-f6fe-2ed4685499a2", + "x-ms-request-id": "11fc74cb-201a-0000-601d-e6e568000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + } + ], + "Variables": { + "RandomSeed": "367255487", + "Storage_TestConfigDefault": "ProductionTenant\nfp8xscnapby3pev24a\nU2FuaXRpemVk\nhttps://fp8xscnapby3pev24a.blob.preprod.core.windows.net\nhttps://fp8xscnapby3pev24a.file.preprod.core.windows.net\nhttps://fp8xscnapby3pev24a.queue.core.windows.net\nhttps://fp8xscnapby3pev24a.table.core.windows.net\n\n\n\n\nhttps://fp8xscnapby3pev24a-secondary.blob.core.windows.net\nhttps://fp8xscnapby3pev24a-secondary.file.core.windows.net\nhttps://fp8xscnapby3pev24a-secondary.queue.core.windows.net\nhttps://fp8xscnapby3pev24a-secondary.table.core.windows.net\n\nSanitized\n\n\nCloud\nBlobEndpoint=https://fp8xscnapby3pev24a.blob.preprod.core.windows.net/;QueueEndpoint=https://fp8xscnapby3pev24a.queue.core.windows.net/;FileEndpoint=https://fp8xscnapby3pev24a.file.preprod.core.windows.net/;BlobSecondaryEndpoint=https://fp8xscnapby3pev24a-secondary.blob.core.windows.net/;QueueSecondaryEndpoint=https://fp8xscnapby3pev24a-secondary.queue.core.windows.net/;FileSecondaryEndpoint=https://fp8xscnapby3pev24a-secondary.file.core.windows.net/;AccountName=fp8xscnapby3pev24a;AccountKey=Kg==;\nseanscope1\n\n" + } +} \ No newline at end of file diff --git a/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_FilePermissionAsync.json b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_FilePermissionAsync.json new file mode 100644 index 000000000000..a70d584b988a --- /dev/null +++ b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_FilePermissionAsync.json @@ -0,0 +1,181 @@ +{ + "Entries": [ + { + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-b955dfb8-7604-30fd-6dd9-de4586ab82d5?restype=share", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-f063d5e48528854d9bf183a197f26bdb-c0fd262548db6747-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" + ], + "x-ms-client-request-id": "15df5d54-7cf8-c420-ed1a-f0cecfc7dc1e", + "x-ms-date": "Tue, 30 Nov 2021 19:04:11 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Tue, 30 Nov 2021 19:04:12 GMT", + "ETag": "\u00220x8D9B43432CB4EAB\u0022", + "Last-Modified": "Tue, 30 Nov 2021 19:04:13 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "15df5d54-7cf8-c420-ed1a-f0cecfc7dc1e", + "x-ms-request-id": "11fc74c2-201a-0000-591d-e6e568000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-b955dfb8-7604-30fd-6dd9-de4586ab82d5/test-dire%C2%A2t%20%C3%98%C2%AE%CF%92%253A-ca79169b-8ed5-3296-204e-663d4c7a6798?restype=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-e346c5f837790946b848092848830e61-af22f3311a84524a-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" + ], + "x-ms-client-request-id": "b2e70cea-435b-c642-c7ac-f5aa15e37872", + "x-ms-date": "Tue, 30 Nov 2021 19:04:11 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Tue, 30 Nov 2021 19:04:12 GMT", + "ETag": "\u00220x8D9B43432DB7A67\u0022", + "Last-Modified": "Tue, 30 Nov 2021 19:04:13 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "b2e70cea-435b-c642-c7ac-f5aa15e37872", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-11-30T19:04:13.4179431Z", + "x-ms-file-creation-time": "2021-11-30T19:04:13.4179431Z", + "x-ms-file-id": "13835128424026341376", + "x-ms-file-last-write-time": "2021-11-30T19:04:13.4179431Z", + "x-ms-file-parent-id": "0", + "x-ms-file-permission-key": "10156757773834485186*23892369358363523", + "x-ms-request-id": "11fc74c4-201a-0000-5a1d-e6e568000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-b955dfb8-7604-30fd-6dd9-de4586ab82d5/test-directory-090358b2-b3d7-2e51-38cc-bb98ce7f9d30?restype=directory\u0026comp=rename", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-823da11cfd7e954b8cf405ae326ffa85-2fa111f3b2469d41-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" + ], + "x-ms-client-request-id": "3c644cc3-2eeb-37b3-bab9-7a8f87aaf747", + "x-ms-date": "Tue, 30 Nov 2021 19:04:11 GMT", + "x-ms-file-permission": "O:S-1-5-21-2127521184-1604012920-1887927527-21560751G:S-1-5-21-2127521184-1604012920-1887927527-513D:AI(A;;FA;;;SY)(A;;FA;;;BA)(A;;0x1200a9;;;S-1-5-21-397955417-626881126-188441444-3053964)", + "x-ms-file-rename-source": "https%3A%2F%2Ffp8xscnapby3pev24a.file.preprod.core.windows.net%2Ftest-share-b955dfb8-7604-30fd-6dd9-de4586ab82d5%2Ftest-dire%C2%A2t\u002B%C3%98%C2%AE%CF%92%253A-ca79169b-8ed5-3296-204e-663d4c7a6798=", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Date": "Tue, 30 Nov 2021 19:04:12 GMT", + "ETag": "\u00220x8D9B43432E98455\u0022", + "Last-Modified": "Tue, 30 Nov 2021 19:04:13 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "3c644cc3-2eeb-37b3-bab9-7a8f87aaf747", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-11-30T19:04:13.5099477Z", + "x-ms-file-creation-time": "2021-11-30T19:04:13.4179431Z", + "x-ms-file-id": "13835128424026341376", + "x-ms-file-last-write-time": "2021-11-30T19:04:13.4179431Z", + "x-ms-file-parent-id": "0", + "x-ms-file-permission-key": "12075044870606081650*23892369358363523", + "x-ms-request-id": "11fc74c5-201a-0000-5b1d-e6e568000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-b955dfb8-7604-30fd-6dd9-de4586ab82d5/test-directory-090358b2-b3d7-2e51-38cc-bb98ce7f9d30?restype=directory", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" + ], + "x-ms-client-request-id": "81d49034-611a-e844-271b-85d93aacffd9", + "x-ms-date": "Tue, 30 Nov 2021 19:04:11 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Date": "Tue, 30 Nov 2021 19:04:12 GMT", + "ETag": "\u00220x8D9B43432E98455\u0022", + "Last-Modified": "Tue, 30 Nov 2021 19:04:13 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "81d49034-611a-e844-271b-85d93aacffd9", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-11-30T19:04:13.5099477Z", + "x-ms-file-creation-time": "2021-11-30T19:04:13.4179431Z", + "x-ms-file-id": "13835128424026341376", + "x-ms-file-last-write-time": "2021-11-30T19:04:13.4179431Z", + "x-ms-file-parent-id": "0", + "x-ms-file-permission-key": "12075044870606081650*23892369358363523", + "x-ms-request-id": "11fc74c6-201a-0000-5c1d-e6e568000000", + "x-ms-server-encrypted": "true", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-b955dfb8-7604-30fd-6dd9-de4586ab82d5?restype=share", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-0e960eb6fad4ef4d9ff6583c55c1249b-a1e98d08609ed545-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" + ], + "x-ms-client-request-id": "f75b7402-75d5-ac2d-7fab-1275b305c26f", + "x-ms-date": "Tue, 30 Nov 2021 19:04:11 GMT", + "x-ms-delete-snapshots": "include", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "Date": "Tue, 30 Nov 2021 19:04:13 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "f75b7402-75d5-ac2d-7fab-1275b305c26f", + "x-ms-request-id": "11fc74c7-201a-0000-5d1d-e6e568000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + } + ], + "Variables": { + "RandomSeed": "1966205853", + "Storage_TestConfigDefault": "ProductionTenant\nfp8xscnapby3pev24a\nU2FuaXRpemVk\nhttps://fp8xscnapby3pev24a.blob.preprod.core.windows.net\nhttps://fp8xscnapby3pev24a.file.preprod.core.windows.net\nhttps://fp8xscnapby3pev24a.queue.core.windows.net\nhttps://fp8xscnapby3pev24a.table.core.windows.net\n\n\n\n\nhttps://fp8xscnapby3pev24a-secondary.blob.core.windows.net\nhttps://fp8xscnapby3pev24a-secondary.file.core.windows.net\nhttps://fp8xscnapby3pev24a-secondary.queue.core.windows.net\nhttps://fp8xscnapby3pev24a-secondary.table.core.windows.net\n\nSanitized\n\n\nCloud\nBlobEndpoint=https://fp8xscnapby3pev24a.blob.preprod.core.windows.net/;QueueEndpoint=https://fp8xscnapby3pev24a.queue.core.windows.net/;FileEndpoint=https://fp8xscnapby3pev24a.file.preprod.core.windows.net/;BlobSecondaryEndpoint=https://fp8xscnapby3pev24a-secondary.blob.core.windows.net/;QueueSecondaryEndpoint=https://fp8xscnapby3pev24a-secondary.queue.core.windows.net/;FileSecondaryEndpoint=https://fp8xscnapby3pev24a-secondary.file.core.windows.net/;AccountName=fp8xscnapby3pev24a;AccountKey=Kg==;\nseanscope1\n\n" + } +} \ No newline at end of file diff --git a/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_FilePermissionTooLarge.json b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_FilePermissionTooLarge.json new file mode 100644 index 000000000000..8b84aebe8c6b --- /dev/null +++ b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_FilePermissionTooLarge.json @@ -0,0 +1,106 @@ +{ + "Entries": [ + { + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-8988b6d0-2604-1507-a05c-9c252176dcad?restype=share", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-9cf92d2bc2956e408647a5c897d460cf-2f05c9057b3d2842-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" + ], + "x-ms-client-request-id": "b5f0756a-500f-6a6f-8f05-24556abe3b7b", + "x-ms-date": "Tue, 30 Nov 2021 19:04:10 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Tue, 30 Nov 2021 19:04:11 GMT", + "ETag": "\u00220x8D9B434324357AA\u0022", + "Last-Modified": "Tue, 30 Nov 2021 19:04:12 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "b5f0756a-500f-6a6f-8f05-24556abe3b7b", + "x-ms-request-id": "11fc74b7-201a-0000-501d-e6e568000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-8988b6d0-2604-1507-a05c-9c252176dcad/test-dire%C2%A2t%20%C3%98%C2%AE%CF%92%253A-c1005c18-35a4-2317-ff7b-efad67411d35?restype=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-edab3affba844640b884ba232a8c835f-617ae4063e9e2a4a-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" + ], + "x-ms-client-request-id": "9bad421a-1e6a-340b-5ecd-b69460c1024e", + "x-ms-date": "Tue, 30 Nov 2021 19:04:10 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Tue, 30 Nov 2021 19:04:11 GMT", + "ETag": "\u00220x8D9B4343252C1BA\u0022", + "Last-Modified": "Tue, 30 Nov 2021 19:04:12 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "9bad421a-1e6a-340b-5ecd-b69460c1024e", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-11-30T19:04:12.5219258Z", + "x-ms-file-creation-time": "2021-11-30T19:04:12.5219258Z", + "x-ms-file-id": "13835128424026341376", + "x-ms-file-last-write-time": "2021-11-30T19:04:12.5219258Z", + "x-ms-file-parent-id": "0", + "x-ms-file-permission-key": "10156757773834485186*23892369358363523", + "x-ms-request-id": "11fc74b9-201a-0000-511d-e6e568000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-8988b6d0-2604-1507-a05c-9c252176dcad?restype=share", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-718d187a15642b49b8f78bf293af041a-5d78c49f1aa8dd4b-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" + ], + "x-ms-client-request-id": "9a077efb-2588-8ad8-4cbb-de6de566ca35", + "x-ms-date": "Tue, 30 Nov 2021 19:04:10 GMT", + "x-ms-delete-snapshots": "include", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "Date": "Tue, 30 Nov 2021 19:04:12 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "9a077efb-2588-8ad8-4cbb-de6de566ca35", + "x-ms-request-id": "11fc74ba-201a-0000-521d-e6e568000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + } + ], + "Variables": { + "RandomSeed": "913968364", + "Storage_TestConfigDefault": "ProductionTenant\nfp8xscnapby3pev24a\nU2FuaXRpemVk\nhttps://fp8xscnapby3pev24a.blob.preprod.core.windows.net\nhttps://fp8xscnapby3pev24a.file.preprod.core.windows.net\nhttps://fp8xscnapby3pev24a.queue.core.windows.net\nhttps://fp8xscnapby3pev24a.table.core.windows.net\n\n\n\n\nhttps://fp8xscnapby3pev24a-secondary.blob.core.windows.net\nhttps://fp8xscnapby3pev24a-secondary.file.core.windows.net\nhttps://fp8xscnapby3pev24a-secondary.queue.core.windows.net\nhttps://fp8xscnapby3pev24a-secondary.table.core.windows.net\n\nSanitized\n\n\nCloud\nBlobEndpoint=https://fp8xscnapby3pev24a.blob.preprod.core.windows.net/;QueueEndpoint=https://fp8xscnapby3pev24a.queue.core.windows.net/;FileEndpoint=https://fp8xscnapby3pev24a.file.preprod.core.windows.net/;BlobSecondaryEndpoint=https://fp8xscnapby3pev24a-secondary.blob.core.windows.net/;QueueSecondaryEndpoint=https://fp8xscnapby3pev24a-secondary.queue.core.windows.net/;FileSecondaryEndpoint=https://fp8xscnapby3pev24a-secondary.file.core.windows.net/;AccountName=fp8xscnapby3pev24a;AccountKey=Kg==;\nseanscope1\n\n" + } +} \ No newline at end of file diff --git a/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_FilePermissionTooLargeAsync.json b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_FilePermissionTooLargeAsync.json new file mode 100644 index 000000000000..d5d83dda429a --- /dev/null +++ b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_FilePermissionTooLargeAsync.json @@ -0,0 +1,106 @@ +{ + "Entries": [ + { + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-4358f2ab-da2e-6ca2-57dd-5fa4a5e5ec7c?restype=share", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-78797edd773e45469604392298eeb20d-223497e004364048-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" + ], + "x-ms-client-request-id": "169ffafb-5f1c-d354-bfbf-f2732519e3a9", + "x-ms-date": "Tue, 30 Nov 2021 19:04:12 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Tue, 30 Nov 2021 19:04:13 GMT", + "ETag": "\u00220x8D9B434333C8921\u0022", + "Last-Modified": "Tue, 30 Nov 2021 19:04:14 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "169ffafb-5f1c-d354-bfbf-f2732519e3a9", + "x-ms-request-id": "11fc74cc-201a-0000-611d-e6e568000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-4358f2ab-da2e-6ca2-57dd-5fa4a5e5ec7c/test-dire%C2%A2t%20%C3%98%C2%AE%CF%92%253A-031b6694-5a4c-ce53-84c1-5238b21c6be0?restype=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-801a5f2dbb7a5344a80a4de5d66136de-0f2a698c44d35149-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" + ], + "x-ms-client-request-id": "9bf07e12-3f5b-a09f-a6d0-925a0d1b21a2", + "x-ms-date": "Tue, 30 Nov 2021 19:04:12 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Tue, 30 Nov 2021 19:04:13 GMT", + "ETag": "\u00220x8D9B434334BF00B\u0022", + "Last-Modified": "Tue, 30 Nov 2021 19:04:14 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "9bf07e12-3f5b-a09f-a6d0-925a0d1b21a2", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-11-30T19:04:14.1549579Z", + "x-ms-file-creation-time": "2021-11-30T19:04:14.1549579Z", + "x-ms-file-id": "13835128424026341376", + "x-ms-file-last-write-time": "2021-11-30T19:04:14.1549579Z", + "x-ms-file-parent-id": "0", + "x-ms-file-permission-key": "10156757773834485186*23892369358363523", + "x-ms-request-id": "11fc74ce-201a-0000-621d-e6e568000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-4358f2ab-da2e-6ca2-57dd-5fa4a5e5ec7c?restype=share", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-19369a7512800a458c2b771b010757c1-ad16c5732495b041-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" + ], + "x-ms-client-request-id": "d77ad9f3-c022-da66-1b31-95b0c667c322", + "x-ms-date": "Tue, 30 Nov 2021 19:04:12 GMT", + "x-ms-delete-snapshots": "include", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "Date": "Tue, 30 Nov 2021 19:04:13 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "d77ad9f3-c022-da66-1b31-95b0c667c322", + "x-ms-request-id": "11fc74cf-201a-0000-631d-e6e568000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + } + ], + "Variables": { + "RandomSeed": "1072872290", + "Storage_TestConfigDefault": "ProductionTenant\nfp8xscnapby3pev24a\nU2FuaXRpemVk\nhttps://fp8xscnapby3pev24a.blob.preprod.core.windows.net\nhttps://fp8xscnapby3pev24a.file.preprod.core.windows.net\nhttps://fp8xscnapby3pev24a.queue.core.windows.net\nhttps://fp8xscnapby3pev24a.table.core.windows.net\n\n\n\n\nhttps://fp8xscnapby3pev24a-secondary.blob.core.windows.net\nhttps://fp8xscnapby3pev24a-secondary.file.core.windows.net\nhttps://fp8xscnapby3pev24a-secondary.queue.core.windows.net\nhttps://fp8xscnapby3pev24a-secondary.table.core.windows.net\n\nSanitized\n\n\nCloud\nBlobEndpoint=https://fp8xscnapby3pev24a.blob.preprod.core.windows.net/;QueueEndpoint=https://fp8xscnapby3pev24a.queue.core.windows.net/;FileEndpoint=https://fp8xscnapby3pev24a.file.preprod.core.windows.net/;BlobSecondaryEndpoint=https://fp8xscnapby3pev24a-secondary.blob.core.windows.net/;QueueSecondaryEndpoint=https://fp8xscnapby3pev24a-secondary.queue.core.windows.net/;FileSecondaryEndpoint=https://fp8xscnapby3pev24a-secondary.file.core.windows.net/;AccountName=fp8xscnapby3pev24a;AccountKey=Kg==;\nseanscope1\n\n" + } +} \ No newline at end of file diff --git a/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_SmbPropertie.json b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_SmbPropertie.json new file mode 100644 index 000000000000..38c4655cc41f --- /dev/null +++ b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_SmbPropertie.json @@ -0,0 +1,216 @@ +{ + "Entries": [ + { + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-8befe8d0-2238-1575-8b57-9ee6770af324?restype=share", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-061aa9e5efc8c54895fe7b819bbcac9d-a80171ced54c9842-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" + ], + "x-ms-client-request-id": "7000aef2-9bd0-2417-0254-92a6de561957", + "x-ms-date": "Tue, 30 Nov 2021 19:04:10 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Tue, 30 Nov 2021 19:04:12 GMT", + "ETag": "\u00220x8D9B434326F9890\u0022", + "Last-Modified": "Tue, 30 Nov 2021 19:04:12 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "7000aef2-9bd0-2417-0254-92a6de561957", + "x-ms-request-id": "11fc74bb-201a-0000-531d-e6e568000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-8befe8d0-2238-1575-8b57-9ee6770af324/test-dire%C2%A2t%20%C3%98%C2%AE%CF%92%253A-2feeafcc-24fa-d777-60dd-7290f9cc9b75?restype=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-d4e6bfc48042ca4da119d3981389dd11-86e857021ccc514e-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" + ], + "x-ms-client-request-id": "cadcd18e-d627-cd9e-3628-10f329862a35", + "x-ms-date": "Tue, 30 Nov 2021 19:04:10 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Tue, 30 Nov 2021 19:04:12 GMT", + "ETag": "\u00220x8D9B434327E8CFB\u0022", + "Last-Modified": "Tue, 30 Nov 2021 19:04:12 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "cadcd18e-d627-cd9e-3628-10f329862a35", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-11-30T19:04:12.8089339Z", + "x-ms-file-creation-time": "2021-11-30T19:04:12.8089339Z", + "x-ms-file-id": "13835128424026341376", + "x-ms-file-last-write-time": "2021-11-30T19:04:12.8089339Z", + "x-ms-file-parent-id": "0", + "x-ms-file-permission-key": "10156757773834485186*23892369358363523", + "x-ms-request-id": "11fc74bd-201a-0000-541d-e6e568000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-8befe8d0-2238-1575-8b57-9ee6770af324?restype=share\u0026comp=filepermission", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "Content-Length": "206", + "Content-Type": "application/json", + "traceparent": "00-ef693136280f4346b43bfadf14a7c8d5-8835171084bd0441-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" + ], + "x-ms-client-request-id": "48a31d58-5a8b-3d61-8593-6ed23928fc1b", + "x-ms-date": "Tue, 30 Nov 2021 19:04:10 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": { + "permission": "O:S-1-5-21-2127521184-1604012920-1887927527-21560751G:S-1-5-21-2127521184-1604012920-1887927527-513D:AI(A;;FA;;;SY)(A;;FA;;;BA)(A;;0x1200a9;;;S-1-5-21-397955417-626881126-188441444-3053964)" + }, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Tue, 30 Nov 2021 19:04:12 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "48a31d58-5a8b-3d61-8593-6ed23928fc1b", + "x-ms-file-permission-key": "12075044870606081650*23892369358363523", + "x-ms-request-id": "11fc74be-201a-0000-551d-e6e568000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-8befe8d0-2238-1575-8b57-9ee6770af324/test-directory-d9551db9-5061-484c-5b55-9c76d01b717f?restype=directory\u0026comp=rename", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-100d1eb8f1d4f14fa39c797f2fdf1683-5ac4adee285ff04b-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" + ], + "x-ms-client-request-id": "b21d91e5-2977-4ef4-4cc5-a25b637b413d", + "x-ms-date": "Tue, 30 Nov 2021 19:04:11 GMT", + "x-ms-file-attributes": "ReadOnly|Directory", + "x-ms-file-creation-time": "2019-08-15T05:15:25.0600000Z", + "x-ms-file-last-write-time": "2019-08-26T05:15:25.0600000Z", + "x-ms-file-permission-key": "12075044870606081650*23892369358363523", + "x-ms-file-rename-source": "https%3A%2F%2Ffp8xscnapby3pev24a.file.preprod.core.windows.net%2Ftest-share-8befe8d0-2238-1575-8b57-9ee6770af324%2Ftest-dire%C2%A2t\u002B%C3%98%C2%AE%CF%92%253A-2feeafcc-24fa-d777-60dd-7290f9cc9b75=", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Date": "Tue, 30 Nov 2021 19:04:12 GMT", + "ETag": "\u00220x8D9B43432A268A8\u0022", + "Last-Modified": "Tue, 30 Nov 2021 19:04:13 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "b21d91e5-2977-4ef4-4cc5-a25b637b413d", + "x-ms-file-attributes": "ReadOnly | Directory", + "x-ms-file-change-time": "2021-11-30T19:04:13.0439336Z", + "x-ms-file-creation-time": "2019-08-15T05:15:25.0600000Z", + "x-ms-file-id": "13835128424026341376", + "x-ms-file-last-write-time": "2019-08-26T05:15:25.0600000Z", + "x-ms-file-parent-id": "0", + "x-ms-file-permission-key": "12075044870606081650*23892369358363523", + "x-ms-request-id": "11fc74bf-201a-0000-561d-e6e568000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-8befe8d0-2238-1575-8b57-9ee6770af324/test-directory-d9551db9-5061-484c-5b55-9c76d01b717f?restype=directory", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" + ], + "x-ms-client-request-id": "a8ec72be-4a0a-8da4-9cfc-2ebe5fea8454", + "x-ms-date": "Tue, 30 Nov 2021 19:04:11 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Date": "Tue, 30 Nov 2021 19:04:12 GMT", + "ETag": "\u00220x8D9B43432A268A8\u0022", + "Last-Modified": "Tue, 30 Nov 2021 19:04:13 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "a8ec72be-4a0a-8da4-9cfc-2ebe5fea8454", + "x-ms-file-attributes": "ReadOnly | Directory", + "x-ms-file-change-time": "2021-11-30T19:04:13.0439336Z", + "x-ms-file-creation-time": "2019-08-15T05:15:25.0600000Z", + "x-ms-file-id": "13835128424026341376", + "x-ms-file-last-write-time": "2019-08-26T05:15:25.0600000Z", + "x-ms-file-parent-id": "0", + "x-ms-file-permission-key": "12075044870606081650*23892369358363523", + "x-ms-request-id": "11fc74c0-201a-0000-571d-e6e568000000", + "x-ms-server-encrypted": "true", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-8befe8d0-2238-1575-8b57-9ee6770af324?restype=share", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-a2ddae76327d8d408b97792469f2b0c7-6fa7a1513e19f747-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" + ], + "x-ms-client-request-id": "f09d8746-988e-df33-d29e-4518c6c8f6ec", + "x-ms-date": "Tue, 30 Nov 2021 19:04:11 GMT", + "x-ms-delete-snapshots": "include", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "Date": "Tue, 30 Nov 2021 19:04:12 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "f09d8746-988e-df33-d29e-4518c6c8f6ec", + "x-ms-request-id": "11fc74c1-201a-0000-581d-e6e568000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + } + ], + "Variables": { + "RandomSeed": "418116656", + "Storage_TestConfigDefault": "ProductionTenant\nfp8xscnapby3pev24a\nU2FuaXRpemVk\nhttps://fp8xscnapby3pev24a.blob.preprod.core.windows.net\nhttps://fp8xscnapby3pev24a.file.preprod.core.windows.net\nhttps://fp8xscnapby3pev24a.queue.core.windows.net\nhttps://fp8xscnapby3pev24a.table.core.windows.net\n\n\n\n\nhttps://fp8xscnapby3pev24a-secondary.blob.core.windows.net\nhttps://fp8xscnapby3pev24a-secondary.file.core.windows.net\nhttps://fp8xscnapby3pev24a-secondary.queue.core.windows.net\nhttps://fp8xscnapby3pev24a-secondary.table.core.windows.net\n\nSanitized\n\n\nCloud\nBlobEndpoint=https://fp8xscnapby3pev24a.blob.preprod.core.windows.net/;QueueEndpoint=https://fp8xscnapby3pev24a.queue.core.windows.net/;FileEndpoint=https://fp8xscnapby3pev24a.file.preprod.core.windows.net/;BlobSecondaryEndpoint=https://fp8xscnapby3pev24a-secondary.blob.core.windows.net/;QueueSecondaryEndpoint=https://fp8xscnapby3pev24a-secondary.queue.core.windows.net/;FileSecondaryEndpoint=https://fp8xscnapby3pev24a-secondary.file.core.windows.net/;AccountName=fp8xscnapby3pev24a;AccountKey=Kg==;\nseanscope1\n\n" + } +} \ No newline at end of file diff --git a/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_SmbPropertieAsync.json b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_SmbPropertieAsync.json new file mode 100644 index 000000000000..8a4c9b1a9335 --- /dev/null +++ b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_SmbPropertieAsync.json @@ -0,0 +1,216 @@ +{ + "Entries": [ + { + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-8c98817e-b6ab-d4a8-a8be-d9ca4b168f76?restype=share", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-b7fde06bc4d49740a466487302b747a4-bb46733f7cb8d84f-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" + ], + "x-ms-client-request-id": "75a26580-5753-1a97-74c9-2405e10ed367", + "x-ms-date": "Tue, 30 Nov 2021 19:04:12 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Tue, 30 Nov 2021 19:04:13 GMT", + "ETag": "\u00220x8D9B4343365E394\u0022", + "Last-Modified": "Tue, 30 Nov 2021 19:04:14 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "75a26580-5753-1a97-74c9-2405e10ed367", + "x-ms-request-id": "11fc74d0-201a-0000-641d-e6e568000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-8c98817e-b6ab-d4a8-a8be-d9ca4b168f76/test-dire%C2%A2t%20%C3%98%C2%AE%CF%92%253A-aed6231a-9c62-5020-269b-f01b7e157df8?restype=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-d4be6931126c2541b77bf0c7f43873c5-c291153e67d06146-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" + ], + "x-ms-client-request-id": "3277d1bc-05da-e3a1-4552-4fb7667b9c5e", + "x-ms-date": "Tue, 30 Nov 2021 19:04:12 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Tue, 30 Nov 2021 19:04:13 GMT", + "ETag": "\u00220x8D9B4343374FBF5\u0022", + "Last-Modified": "Tue, 30 Nov 2021 19:04:14 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "3277d1bc-05da-e3a1-4552-4fb7667b9c5e", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-11-30T19:04:14.4239605Z", + "x-ms-file-creation-time": "2021-11-30T19:04:14.4239605Z", + "x-ms-file-id": "13835128424026341376", + "x-ms-file-last-write-time": "2021-11-30T19:04:14.4239605Z", + "x-ms-file-parent-id": "0", + "x-ms-file-permission-key": "10156757773834485186*23892369358363523", + "x-ms-request-id": "11fc74d2-201a-0000-651d-e6e568000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-8c98817e-b6ab-d4a8-a8be-d9ca4b168f76?restype=share\u0026comp=filepermission", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "Content-Length": "206", + "Content-Type": "application/json", + "traceparent": "00-381db5fe75e175419b8bb393b309753d-5096539ce18e7e4a-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" + ], + "x-ms-client-request-id": "de5beb67-0f59-cec8-de76-324df54291cc", + "x-ms-date": "Tue, 30 Nov 2021 19:04:12 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": { + "permission": "O:S-1-5-21-2127521184-1604012920-1887927527-21560751G:S-1-5-21-2127521184-1604012920-1887927527-513D:AI(A;;FA;;;SY)(A;;FA;;;BA)(A;;0x1200a9;;;S-1-5-21-397955417-626881126-188441444-3053964)" + }, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Tue, 30 Nov 2021 19:04:13 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "de5beb67-0f59-cec8-de76-324df54291cc", + "x-ms-file-permission-key": "12075044870606081650*23892369358363523", + "x-ms-request-id": "11fc74d3-201a-0000-661d-e6e568000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-8c98817e-b6ab-d4a8-a8be-d9ca4b168f76/test-directory-0bfb2b4c-edc4-00f3-008c-105f517845d1?restype=directory\u0026comp=rename", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-9921a1d6c393084d8d55470f6f962733-ee952e2e2b67554b-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" + ], + "x-ms-client-request-id": "66f7eda9-671c-7078-9a91-ce2618d00ff1", + "x-ms-date": "Tue, 30 Nov 2021 19:04:12 GMT", + "x-ms-file-attributes": "ReadOnly|Directory", + "x-ms-file-creation-time": "2019-08-15T05:15:25.0600000Z", + "x-ms-file-last-write-time": "2019-08-26T05:15:25.0600000Z", + "x-ms-file-permission-key": "12075044870606081650*23892369358363523", + "x-ms-file-rename-source": "https%3A%2F%2Ffp8xscnapby3pev24a.file.preprod.core.windows.net%2Ftest-share-8c98817e-b6ab-d4a8-a8be-d9ca4b168f76%2Ftest-dire%C2%A2t\u002B%C3%98%C2%AE%CF%92%253A-aed6231a-9c62-5020-269b-f01b7e157df8=", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Date": "Tue, 30 Nov 2021 19:04:13 GMT", + "ETag": "\u00220x8D9B434338F6220\u0022", + "Last-Modified": "Tue, 30 Nov 2021 19:04:14 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "66f7eda9-671c-7078-9a91-ce2618d00ff1", + "x-ms-file-attributes": "ReadOnly | Directory", + "x-ms-file-change-time": "2021-11-30T19:04:14.5969696Z", + "x-ms-file-creation-time": "2019-08-15T05:15:25.0600000Z", + "x-ms-file-id": "13835128424026341376", + "x-ms-file-last-write-time": "2019-08-26T05:15:25.0600000Z", + "x-ms-file-parent-id": "0", + "x-ms-file-permission-key": "12075044870606081650*23892369358363523", + "x-ms-request-id": "11fc74d4-201a-0000-671d-e6e568000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-8c98817e-b6ab-d4a8-a8be-d9ca4b168f76/test-directory-0bfb2b4c-edc4-00f3-008c-105f517845d1?restype=directory", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" + ], + "x-ms-client-request-id": "07a49d40-2b4a-a4af-05c7-678b2099e93c", + "x-ms-date": "Tue, 30 Nov 2021 19:04:12 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Date": "Tue, 30 Nov 2021 19:04:13 GMT", + "ETag": "\u00220x8D9B434338F6220\u0022", + "Last-Modified": "Tue, 30 Nov 2021 19:04:14 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "07a49d40-2b4a-a4af-05c7-678b2099e93c", + "x-ms-file-attributes": "ReadOnly | Directory", + "x-ms-file-change-time": "2021-11-30T19:04:14.5969696Z", + "x-ms-file-creation-time": "2019-08-15T05:15:25.0600000Z", + "x-ms-file-id": "13835128424026341376", + "x-ms-file-last-write-time": "2019-08-26T05:15:25.0600000Z", + "x-ms-file-parent-id": "0", + "x-ms-file-permission-key": "12075044870606081650*23892369358363523", + "x-ms-request-id": "11fc74d5-201a-0000-681d-e6e568000000", + "x-ms-server-encrypted": "true", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-8c98817e-b6ab-d4a8-a8be-d9ca4b168f76?restype=share", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-c4dfa184a620464b9398fd67321fbcef-cfe275255830294d-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" + ], + "x-ms-client-request-id": "7ae6c010-082c-a8a6-2371-476c787a5691", + "x-ms-date": "Tue, 30 Nov 2021 19:04:12 GMT", + "x-ms-delete-snapshots": "include", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "Date": "Tue, 30 Nov 2021 19:04:14 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "7ae6c010-082c-a8a6-2371-476c787a5691", + "x-ms-request-id": "11fc74d6-201a-0000-691d-e6e568000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + } + ], + "Variables": { + "RandomSeed": "1313295814", + "Storage_TestConfigDefault": "ProductionTenant\nfp8xscnapby3pev24a\nU2FuaXRpemVk\nhttps://fp8xscnapby3pev24a.blob.preprod.core.windows.net\nhttps://fp8xscnapby3pev24a.file.preprod.core.windows.net\nhttps://fp8xscnapby3pev24a.queue.core.windows.net\nhttps://fp8xscnapby3pev24a.table.core.windows.net\n\n\n\n\nhttps://fp8xscnapby3pev24a-secondary.blob.core.windows.net\nhttps://fp8xscnapby3pev24a-secondary.file.core.windows.net\nhttps://fp8xscnapby3pev24a-secondary.queue.core.windows.net\nhttps://fp8xscnapby3pev24a-secondary.table.core.windows.net\n\nSanitized\n\n\nCloud\nBlobEndpoint=https://fp8xscnapby3pev24a.blob.preprod.core.windows.net/;QueueEndpoint=https://fp8xscnapby3pev24a.queue.core.windows.net/;FileEndpoint=https://fp8xscnapby3pev24a.file.preprod.core.windows.net/;BlobSecondaryEndpoint=https://fp8xscnapby3pev24a-secondary.blob.core.windows.net/;QueueSecondaryEndpoint=https://fp8xscnapby3pev24a-secondary.queue.core.windows.net/;FileSecondaryEndpoint=https://fp8xscnapby3pev24a-secondary.file.core.windows.net/;AccountName=fp8xscnapby3pev24a;AccountKey=Kg==;\nseanscope1\n\n" + } +} \ No newline at end of file diff --git a/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_FilePermission.json b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_FilePermission.json new file mode 100644 index 000000000000..e4cb4d2fde0c --- /dev/null +++ b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_FilePermission.json @@ -0,0 +1,226 @@ +{ + "Entries": [ + { + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-a90ad2ff-62ed-2982-8e9e-c0bb9c259f50?restype=share", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-d9c71066914a794fa866e37bf44ce051-9df67f2f31ccf74b-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" + ], + "x-ms-client-request-id": "29405d79-1efe-8408-6987-66558bee01e2", + "x-ms-date": "Tue, 30 Nov 2021 19:04:12 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Tue, 30 Nov 2021 19:04:14 GMT", + "ETag": "\u00220x8D9B43433B64EC0\u0022", + "Last-Modified": "Tue, 30 Nov 2021 19:04:14 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "29405d79-1efe-8408-6987-66558bee01e2", + "x-ms-request-id": "11fc74d7-201a-0000-6a1d-e6e568000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-a90ad2ff-62ed-2982-8e9e-c0bb9c259f50/test-directory-1a92c2b1-5549-5639-c4d5-5baa4d7f1197?restype=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-ad097dcf441535498c1c46b3978e463f-7f6ee09b96c1d645-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" + ], + "x-ms-client-request-id": "55513241-4c65-23fa-24ea-6428c35d36e9", + "x-ms-date": "Tue, 30 Nov 2021 19:04:12 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Tue, 30 Nov 2021 19:04:14 GMT", + "ETag": "\u00220x8D9B43433C56660\u0022", + "Last-Modified": "Tue, 30 Nov 2021 19:04:14 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "55513241-4c65-23fa-24ea-6428c35d36e9", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-11-30T19:04:14.9509728Z", + "x-ms-file-creation-time": "2021-11-30T19:04:14.9509728Z", + "x-ms-file-id": "13835128424026341376", + "x-ms-file-last-write-time": "2021-11-30T19:04:14.9509728Z", + "x-ms-file-parent-id": "0", + "x-ms-file-permission-key": "10156757773834485186*23892369358363523", + "x-ms-request-id": "11fc74d9-201a-0000-6b1d-e6e568000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-a90ad2ff-62ed-2982-8e9e-c0bb9c259f50/test-directory-1a92c2b1-5549-5639-c4d5-5baa4d7f1197/test-file-0e1ece76-c2ac-3afd-7166-1cf28976140d", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-34b3df1c166a9e4fa790768e4ba4ad42-83fa78541f8e0646-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" + ], + "x-ms-client-request-id": "734ce220-9b99-7eb4-3417-e4fe30089aae", + "x-ms-content-length": "1024", + "x-ms-date": "Tue, 30 Nov 2021 19:04:13 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-type": "file", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Tue, 30 Nov 2021 19:04:14 GMT", + "ETag": "\u00220x8D9B43433D9D8D2\u0022", + "Last-Modified": "Tue, 30 Nov 2021 19:04:15 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "734ce220-9b99-7eb4-3417-e4fe30089aae", + "x-ms-file-attributes": "Archive", + "x-ms-file-change-time": "2021-11-30T19:04:15.0849746Z", + "x-ms-file-creation-time": "2021-11-30T19:04:15.0849746Z", + "x-ms-file-id": "11529285414812647424", + "x-ms-file-last-write-time": "2021-11-30T19:04:15.0849746Z", + "x-ms-file-parent-id": "13835128424026341376", + "x-ms-file-permission-key": "16312887433045634277*23892369358363523", + "x-ms-request-id": "11fc74da-201a-0000-6c1d-e6e568000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-a90ad2ff-62ed-2982-8e9e-c0bb9c259f50/test-directory-1a92c2b1-5549-5639-c4d5-5baa4d7f1197/test-file-c9fc57d5-1bf3-b9bb-9c33-8c8ea8032748?comp=rename", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-928a7de8e4e7ef43ba8bffbc51036d0d-035deec553df9743-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" + ], + "x-ms-client-request-id": "bb246b83-9f2b-04ad-2793-d7650f25d531", + "x-ms-date": "Tue, 30 Nov 2021 19:04:13 GMT", + "x-ms-file-permission": "O:S-1-5-21-2127521184-1604012920-1887927527-21560751G:S-1-5-21-2127521184-1604012920-1887927527-513D:AI(A;;FA;;;SY)(A;;FA;;;BA)(A;;0x1200a9;;;S-1-5-21-397955417-626881126-188441444-3053964)", + "x-ms-file-rename-source": "https%3A%2F%2Ffp8xscnapby3pev24a.file.preprod.core.windows.net%2Ftest-share-a90ad2ff-62ed-2982-8e9e-c0bb9c259f50%2Ftest-directory-1a92c2b1-5549-5639-c4d5-5baa4d7f1197%2Ftest-file-0e1ece76-c2ac-3afd-7166-1cf28976140d=", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Date": "Tue, 30 Nov 2021 19:04:14 GMT", + "ETag": "\u00220x8D9B43433E7E29B\u0022", + "Last-Modified": "Tue, 30 Nov 2021 19:04:15 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "bb246b83-9f2b-04ad-2793-d7650f25d531", + "x-ms-file-attributes": "Archive", + "x-ms-file-change-time": "2021-11-30T19:04:15.1769755Z", + "x-ms-file-creation-time": "2021-11-30T19:04:15.0849746Z", + "x-ms-file-id": "11529285414812647424", + "x-ms-file-last-write-time": "2021-11-30T19:04:15.0849746Z", + "x-ms-file-parent-id": "13835128424026341376", + "x-ms-file-permission-key": "12075044870606081650*23892369358363523", + "x-ms-request-id": "11fc74db-201a-0000-6d1d-e6e568000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-a90ad2ff-62ed-2982-8e9e-c0bb9c259f50/test-directory-1a92c2b1-5549-5639-c4d5-5baa4d7f1197/test-file-c9fc57d5-1bf3-b9bb-9c33-8c8ea8032748", + "RequestMethod": "HEAD", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" + ], + "x-ms-client-request-id": "3d0a1279-6bde-5e1c-cdcd-7f96c80d8120", + "x-ms-date": "Tue, 30 Nov 2021 19:04:13 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Length": "1024", + "Content-Type": "application/octet-stream", + "Date": "Tue, 30 Nov 2021 19:04:14 GMT", + "ETag": "\u00220x8D9B43433E7E29B\u0022", + "Last-Modified": "Tue, 30 Nov 2021 19:04:15 GMT", + "x-ms-client-request-id": "3d0a1279-6bde-5e1c-cdcd-7f96c80d8120", + "x-ms-file-attributes": "Archive", + "x-ms-file-change-time": "2021-11-30T19:04:15.1769755Z", + "x-ms-file-creation-time": "2021-11-30T19:04:15.0849746Z", + "x-ms-file-id": "11529285414812647424", + "x-ms-file-last-write-time": "2021-11-30T19:04:15.0849746Z", + "x-ms-file-parent-id": "13835128424026341376", + "x-ms-file-permission-key": "12075044870606081650*23892369358363523", + "x-ms-request-id": "11fc74dc-201a-0000-6e1d-e6e568000000", + "x-ms-server-encrypted": "true", + "x-ms-type": "File", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-a90ad2ff-62ed-2982-8e9e-c0bb9c259f50?restype=share", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-d50a85f9b85e814d82093ca4f685c06b-ff5485eb09298640-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" + ], + "x-ms-client-request-id": "fceb6fb1-981b-8452-7fa1-e76873ed6cd5", + "x-ms-date": "Tue, 30 Nov 2021 19:04:13 GMT", + "x-ms-delete-snapshots": "include", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "Date": "Tue, 30 Nov 2021 19:04:14 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "fceb6fb1-981b-8452-7fa1-e76873ed6cd5", + "x-ms-request-id": "11fc74de-201a-0000-6f1d-e6e568000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + } + ], + "Variables": { + "RandomSeed": "806726518", + "Storage_TestConfigDefault": "ProductionTenant\nfp8xscnapby3pev24a\nU2FuaXRpemVk\nhttps://fp8xscnapby3pev24a.blob.preprod.core.windows.net\nhttps://fp8xscnapby3pev24a.file.preprod.core.windows.net\nhttps://fp8xscnapby3pev24a.queue.core.windows.net\nhttps://fp8xscnapby3pev24a.table.core.windows.net\n\n\n\n\nhttps://fp8xscnapby3pev24a-secondary.blob.core.windows.net\nhttps://fp8xscnapby3pev24a-secondary.file.core.windows.net\nhttps://fp8xscnapby3pev24a-secondary.queue.core.windows.net\nhttps://fp8xscnapby3pev24a-secondary.table.core.windows.net\n\nSanitized\n\n\nCloud\nBlobEndpoint=https://fp8xscnapby3pev24a.blob.preprod.core.windows.net/;QueueEndpoint=https://fp8xscnapby3pev24a.queue.core.windows.net/;FileEndpoint=https://fp8xscnapby3pev24a.file.preprod.core.windows.net/;BlobSecondaryEndpoint=https://fp8xscnapby3pev24a-secondary.blob.core.windows.net/;QueueSecondaryEndpoint=https://fp8xscnapby3pev24a-secondary.queue.core.windows.net/;FileSecondaryEndpoint=https://fp8xscnapby3pev24a-secondary.file.core.windows.net/;AccountName=fp8xscnapby3pev24a;AccountKey=Kg==;\nseanscope1\n\n" + } +} \ No newline at end of file diff --git a/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_FilePermissionAndFilePermissionKeySet.json b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_FilePermissionAndFilePermissionKeySet.json new file mode 100644 index 000000000000..2c9d9e402308 --- /dev/null +++ b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_FilePermissionAndFilePermissionKeySet.json @@ -0,0 +1,149 @@ +{ + "Entries": [ + { + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-d647a6c9-bbd9-84c1-2924-6aa613cc7580?restype=share", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-1d4889bbf6ee2d4788fd6e043bed47d4-e30d6d6584285843-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" + ], + "x-ms-client-request-id": "8dc56902-c8b6-47dd-1087-8317ccdc2059", + "x-ms-date": "Tue, 30 Nov 2021 19:04:13 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Tue, 30 Nov 2021 19:04:14 GMT", + "ETag": "\u00220x8D9B434340FE1EE\u0022", + "Last-Modified": "Tue, 30 Nov 2021 19:04:15 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "8dc56902-c8b6-47dd-1087-8317ccdc2059", + "x-ms-request-id": "11fc74df-201a-0000-701d-e6e568000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-d647a6c9-bbd9-84c1-2924-6aa613cc7580/test-directory-189a6dc8-1e19-59c6-fec8-0d0a12571b6a?restype=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-2f20b96c1f20f04d88c78fdee7131112-44f6b60dbc0a8544-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" + ], + "x-ms-client-request-id": "faa04fae-3924-e35e-a36b-8eedbbd234b8", + "x-ms-date": "Tue, 30 Nov 2021 19:04:13 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Tue, 30 Nov 2021 19:04:14 GMT", + "ETag": "\u00220x8D9B434341E834C\u0022", + "Last-Modified": "Tue, 30 Nov 2021 19:04:15 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "faa04fae-3924-e35e-a36b-8eedbbd234b8", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-11-30T19:04:15.5349836Z", + "x-ms-file-creation-time": "2021-11-30T19:04:15.5349836Z", + "x-ms-file-id": "13835128424026341376", + "x-ms-file-last-write-time": "2021-11-30T19:04:15.5349836Z", + "x-ms-file-parent-id": "0", + "x-ms-file-permission-key": "10156757773834485186*23892369358363523", + "x-ms-request-id": "11fc74e1-201a-0000-711d-e6e568000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-d647a6c9-bbd9-84c1-2924-6aa613cc7580/test-directory-189a6dc8-1e19-59c6-fec8-0d0a12571b6a/test-file-d945196c-7738-e152-a3b1-8061cb666e6e", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-0d2a0f01bf3dc349ad6319aa54460f8c-ab81decb1b3e2042-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" + ], + "x-ms-client-request-id": "d2f39b83-d94a-36b5-fdbf-5772b8fd183c", + "x-ms-content-length": "1024", + "x-ms-date": "Tue, 30 Nov 2021 19:04:13 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-type": "file", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Tue, 30 Nov 2021 19:04:14 GMT", + "ETag": "\u00220x8D9B434342BF12C\u0022", + "Last-Modified": "Tue, 30 Nov 2021 19:04:15 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "d2f39b83-d94a-36b5-fdbf-5772b8fd183c", + "x-ms-file-attributes": "Archive", + "x-ms-file-change-time": "2021-11-30T19:04:15.6229932Z", + "x-ms-file-creation-time": "2021-11-30T19:04:15.6229932Z", + "x-ms-file-id": "11529285414812647424", + "x-ms-file-last-write-time": "2021-11-30T19:04:15.6229932Z", + "x-ms-file-parent-id": "13835128424026341376", + "x-ms-file-permission-key": "16312887433045634277*23892369358363523", + "x-ms-request-id": "11fc74e2-201a-0000-721d-e6e568000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-d647a6c9-bbd9-84c1-2924-6aa613cc7580?restype=share", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-da467fb83f93d84289bf295f6c8664cc-61818b9394d0f04b-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" + ], + "x-ms-client-request-id": "389ecaa7-9104-124e-9aa6-fe9f923cc647", + "x-ms-date": "Tue, 30 Nov 2021 19:04:13 GMT", + "x-ms-delete-snapshots": "include", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "Date": "Tue, 30 Nov 2021 19:04:14 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "389ecaa7-9104-124e-9aa6-fe9f923cc647", + "x-ms-request-id": "11fc74e3-201a-0000-731d-e6e568000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + } + ], + "Variables": { + "RandomSeed": "974886516", + "Storage_TestConfigDefault": "ProductionTenant\nfp8xscnapby3pev24a\nU2FuaXRpemVk\nhttps://fp8xscnapby3pev24a.blob.preprod.core.windows.net\nhttps://fp8xscnapby3pev24a.file.preprod.core.windows.net\nhttps://fp8xscnapby3pev24a.queue.core.windows.net\nhttps://fp8xscnapby3pev24a.table.core.windows.net\n\n\n\n\nhttps://fp8xscnapby3pev24a-secondary.blob.core.windows.net\nhttps://fp8xscnapby3pev24a-secondary.file.core.windows.net\nhttps://fp8xscnapby3pev24a-secondary.queue.core.windows.net\nhttps://fp8xscnapby3pev24a-secondary.table.core.windows.net\n\nSanitized\n\n\nCloud\nBlobEndpoint=https://fp8xscnapby3pev24a.blob.preprod.core.windows.net/;QueueEndpoint=https://fp8xscnapby3pev24a.queue.core.windows.net/;FileEndpoint=https://fp8xscnapby3pev24a.file.preprod.core.windows.net/;BlobSecondaryEndpoint=https://fp8xscnapby3pev24a-secondary.blob.core.windows.net/;QueueSecondaryEndpoint=https://fp8xscnapby3pev24a-secondary.queue.core.windows.net/;FileSecondaryEndpoint=https://fp8xscnapby3pev24a-secondary.file.core.windows.net/;AccountName=fp8xscnapby3pev24a;AccountKey=Kg==;\nseanscope1\n\n" + } +} \ No newline at end of file diff --git a/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_FilePermissionAndFilePermissionKeySetAsync.json b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_FilePermissionAndFilePermissionKeySetAsync.json new file mode 100644 index 000000000000..5740f323e751 --- /dev/null +++ b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_FilePermissionAndFilePermissionKeySetAsync.json @@ -0,0 +1,149 @@ +{ + "Entries": [ + { + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-9d3a1ee0-7efd-746d-7093-79c24bc830ef?restype=share", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-eb7125154e35384b9fbeb5b8f651cf25-db60aaa196590c44-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" + ], + "x-ms-client-request-id": "2d48fbc2-aa44-7aad-ec97-b4a00214c92c", + "x-ms-date": "Tue, 30 Nov 2021 19:04:15 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Tue, 30 Nov 2021 19:04:16 GMT", + "ETag": "\u00220x8D9B434353023D9\u0022", + "Last-Modified": "Tue, 30 Nov 2021 19:04:17 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "2d48fbc2-aa44-7aad-ec97-b4a00214c92c", + "x-ms-request-id": "11fc74f8-201a-0000-051d-e6e568000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-9d3a1ee0-7efd-746d-7093-79c24bc830ef/test-directory-152bd05a-c563-9923-fec4-85c4c66ede53?restype=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-093d29ec3b7c2c4c982c911169481bc0-15b645bde8b32c41-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" + ], + "x-ms-client-request-id": "c4a38b6f-37f2-fd41-d8af-2f8024e8b37d", + "x-ms-date": "Tue, 30 Nov 2021 19:04:15 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Tue, 30 Nov 2021 19:04:16 GMT", + "ETag": "\u00220x8D9B434353F101F\u0022", + "Last-Modified": "Tue, 30 Nov 2021 19:04:17 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "c4a38b6f-37f2-fd41-d8af-2f8024e8b37d", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-11-30T19:04:17.4260255Z", + "x-ms-file-creation-time": "2021-11-30T19:04:17.4260255Z", + "x-ms-file-id": "13835128424026341376", + "x-ms-file-last-write-time": "2021-11-30T19:04:17.4260255Z", + "x-ms-file-parent-id": "0", + "x-ms-file-permission-key": "10156757773834485186*23892369358363523", + "x-ms-request-id": "11fc74fa-201a-0000-061d-e6e568000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-9d3a1ee0-7efd-746d-7093-79c24bc830ef/test-directory-152bd05a-c563-9923-fec4-85c4c66ede53/test-file-2e5a61b8-7914-58ad-258b-d21667f0057e", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-efaee67eaf9668458977b1e258544d02-49427914f691554e-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" + ], + "x-ms-client-request-id": "3279e099-4325-f5ef-de4b-9f66642a96e7", + "x-ms-content-length": "1024", + "x-ms-date": "Tue, 30 Nov 2021 19:04:15 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-type": "file", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Tue, 30 Nov 2021 19:04:16 GMT", + "ETag": "\u00220x8D9B434354CCBD4\u0022", + "Last-Modified": "Tue, 30 Nov 2021 19:04:17 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "3279e099-4325-f5ef-de4b-9f66642a96e7", + "x-ms-file-attributes": "Archive", + "x-ms-file-change-time": "2021-11-30T19:04:17.5160276Z", + "x-ms-file-creation-time": "2021-11-30T19:04:17.5160276Z", + "x-ms-file-id": "11529285414812647424", + "x-ms-file-last-write-time": "2021-11-30T19:04:17.5160276Z", + "x-ms-file-parent-id": "13835128424026341376", + "x-ms-file-permission-key": "16312887433045634277*23892369358363523", + "x-ms-request-id": "11fc74fb-201a-0000-071d-e6e568000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-9d3a1ee0-7efd-746d-7093-79c24bc830ef?restype=share", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-dbb29b98ae58154c8fe27a019700be32-8313a187c7bb2245-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" + ], + "x-ms-client-request-id": "21258f6b-d8fc-20c6-2dda-32daa8dcf200", + "x-ms-date": "Tue, 30 Nov 2021 19:04:15 GMT", + "x-ms-delete-snapshots": "include", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "Date": "Tue, 30 Nov 2021 19:04:16 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "21258f6b-d8fc-20c6-2dda-32daa8dcf200", + "x-ms-request-id": "11fc74fc-201a-0000-081d-e6e568000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + } + ], + "Variables": { + "RandomSeed": "322603091", + "Storage_TestConfigDefault": "ProductionTenant\nfp8xscnapby3pev24a\nU2FuaXRpemVk\nhttps://fp8xscnapby3pev24a.blob.preprod.core.windows.net\nhttps://fp8xscnapby3pev24a.file.preprod.core.windows.net\nhttps://fp8xscnapby3pev24a.queue.core.windows.net\nhttps://fp8xscnapby3pev24a.table.core.windows.net\n\n\n\n\nhttps://fp8xscnapby3pev24a-secondary.blob.core.windows.net\nhttps://fp8xscnapby3pev24a-secondary.file.core.windows.net\nhttps://fp8xscnapby3pev24a-secondary.queue.core.windows.net\nhttps://fp8xscnapby3pev24a-secondary.table.core.windows.net\n\nSanitized\n\n\nCloud\nBlobEndpoint=https://fp8xscnapby3pev24a.blob.preprod.core.windows.net/;QueueEndpoint=https://fp8xscnapby3pev24a.queue.core.windows.net/;FileEndpoint=https://fp8xscnapby3pev24a.file.preprod.core.windows.net/;BlobSecondaryEndpoint=https://fp8xscnapby3pev24a-secondary.blob.core.windows.net/;QueueSecondaryEndpoint=https://fp8xscnapby3pev24a-secondary.queue.core.windows.net/;FileSecondaryEndpoint=https://fp8xscnapby3pev24a-secondary.file.core.windows.net/;AccountName=fp8xscnapby3pev24a;AccountKey=Kg==;\nseanscope1\n\n" + } +} \ No newline at end of file diff --git a/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_FilePermissionAsync.json b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_FilePermissionAsync.json new file mode 100644 index 000000000000..3b3ab20fdbff --- /dev/null +++ b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_FilePermissionAsync.json @@ -0,0 +1,226 @@ +{ + "Entries": [ + { + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-107ebbd4-aa96-3d04-0a04-3909a31cced0?restype=share", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-0f4c33ca3baa0343be93f2ad594d0b6a-e4a84669eab7814f-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" + ], + "x-ms-client-request-id": "4c76f495-0d62-c568-6b7d-c5a374364170", + "x-ms-date": "Tue, 30 Nov 2021 19:04:14 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Tue, 30 Nov 2021 19:04:15 GMT", + "ETag": "\u00220x8D9B43434DD6E77\u0022", + "Last-Modified": "Tue, 30 Nov 2021 19:04:16 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "4c76f495-0d62-c568-6b7d-c5a374364170", + "x-ms-request-id": "11fc74f1-201a-0000-7f1d-e6e568000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-107ebbd4-aa96-3d04-0a04-3909a31cced0/test-directory-f9178915-c01e-ea3b-6c08-a9def52bae80?restype=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-06a339a6d1592f46acbfd90ea0179139-36f2a0dbdc825b43-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" + ], + "x-ms-client-request-id": "05c34576-4372-d4c7-b88b-e059648ad03f", + "x-ms-date": "Tue, 30 Nov 2021 19:04:14 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Tue, 30 Nov 2021 19:04:16 GMT", + "ETag": "\u00220x8D9B43434EDBB59\u0022", + "Last-Modified": "Tue, 30 Nov 2021 19:04:16 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "05c34576-4372-d4c7-b88b-e059648ad03f", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-11-30T19:04:16.8930137Z", + "x-ms-file-creation-time": "2021-11-30T19:04:16.8930137Z", + "x-ms-file-id": "13835128424026341376", + "x-ms-file-last-write-time": "2021-11-30T19:04:16.8930137Z", + "x-ms-file-parent-id": "0", + "x-ms-file-permission-key": "10156757773834485186*23892369358363523", + "x-ms-request-id": "11fc74f3-201a-0000-801d-e6e568000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-107ebbd4-aa96-3d04-0a04-3909a31cced0/test-directory-f9178915-c01e-ea3b-6c08-a9def52bae80/test-file-20db45ce-92c2-93c9-1ae6-e6b42f18c7c0", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-1e1a3e499008c049890a5d0520387e87-767920625f4af947-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" + ], + "x-ms-client-request-id": "de55519a-e1d0-e46e-7b30-eb8c5c13a5a0", + "x-ms-content-length": "1024", + "x-ms-date": "Tue, 30 Nov 2021 19:04:14 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-type": "file", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Tue, 30 Nov 2021 19:04:16 GMT", + "ETag": "\u00220x8D9B43434FB4FF6\u0022", + "Last-Modified": "Tue, 30 Nov 2021 19:04:16 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "de55519a-e1d0-e46e-7b30-eb8c5c13a5a0", + "x-ms-file-attributes": "Archive", + "x-ms-file-change-time": "2021-11-30T19:04:16.9820150Z", + "x-ms-file-creation-time": "2021-11-30T19:04:16.9820150Z", + "x-ms-file-id": "11529285414812647424", + "x-ms-file-last-write-time": "2021-11-30T19:04:16.9820150Z", + "x-ms-file-parent-id": "13835128424026341376", + "x-ms-file-permission-key": "16312887433045634277*23892369358363523", + "x-ms-request-id": "11fc74f4-201a-0000-011d-e6e568000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-107ebbd4-aa96-3d04-0a04-3909a31cced0/test-directory-f9178915-c01e-ea3b-6c08-a9def52bae80/test-file-ec531fc4-2023-25d8-3855-94239baef105?comp=rename", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-c6045f497da68640b9975d10a681968c-e6b103bd656fa144-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" + ], + "x-ms-client-request-id": "825755fa-dfc1-7964-7830-a67a4c4a48cd", + "x-ms-date": "Tue, 30 Nov 2021 19:04:15 GMT", + "x-ms-file-permission": "O:S-1-5-21-2127521184-1604012920-1887927527-21560751G:S-1-5-21-2127521184-1604012920-1887927527-513D:AI(A;;FA;;;SY)(A;;FA;;;BA)(A;;0x1200a9;;;S-1-5-21-397955417-626881126-188441444-3053964)", + "x-ms-file-rename-source": "https%3A%2F%2Ffp8xscnapby3pev24a.file.preprod.core.windows.net%2Ftest-share-107ebbd4-aa96-3d04-0a04-3909a31cced0%2Ftest-directory-f9178915-c01e-ea3b-6c08-a9def52bae80%2Ftest-file-20db45ce-92c2-93c9-1ae6-e6b42f18c7c0=", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Date": "Tue, 30 Nov 2021 19:04:16 GMT", + "ETag": "\u00220x8D9B434350A444F\u0022", + "Last-Modified": "Tue, 30 Nov 2021 19:04:17 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "825755fa-dfc1-7964-7830-a67a4c4a48cd", + "x-ms-file-attributes": "Archive", + "x-ms-file-change-time": "2021-11-30T19:04:17.0800207Z", + "x-ms-file-creation-time": "2021-11-30T19:04:16.9820150Z", + "x-ms-file-id": "11529285414812647424", + "x-ms-file-last-write-time": "2021-11-30T19:04:16.9820150Z", + "x-ms-file-parent-id": "13835128424026341376", + "x-ms-file-permission-key": "12075044870606081650*23892369358363523", + "x-ms-request-id": "11fc74f5-201a-0000-021d-e6e568000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-107ebbd4-aa96-3d04-0a04-3909a31cced0/test-directory-f9178915-c01e-ea3b-6c08-a9def52bae80/test-file-ec531fc4-2023-25d8-3855-94239baef105", + "RequestMethod": "HEAD", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" + ], + "x-ms-client-request-id": "45291c2d-6f57-3b43-fa9f-65924276d8bf", + "x-ms-date": "Tue, 30 Nov 2021 19:04:15 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Length": "1024", + "Content-Type": "application/octet-stream", + "Date": "Tue, 30 Nov 2021 19:04:16 GMT", + "ETag": "\u00220x8D9B434350A444F\u0022", + "Last-Modified": "Tue, 30 Nov 2021 19:04:17 GMT", + "x-ms-client-request-id": "45291c2d-6f57-3b43-fa9f-65924276d8bf", + "x-ms-file-attributes": "Archive", + "x-ms-file-change-time": "2021-11-30T19:04:17.0800207Z", + "x-ms-file-creation-time": "2021-11-30T19:04:16.9820150Z", + "x-ms-file-id": "11529285414812647424", + "x-ms-file-last-write-time": "2021-11-30T19:04:16.9820150Z", + "x-ms-file-parent-id": "13835128424026341376", + "x-ms-file-permission-key": "12075044870606081650*23892369358363523", + "x-ms-request-id": "11fc74f6-201a-0000-031d-e6e568000000", + "x-ms-server-encrypted": "true", + "x-ms-type": "File", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-107ebbd4-aa96-3d04-0a04-3909a31cced0?restype=share", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-4d925486a32e054092e00c615d5b3145-040615a52ba7e54b-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" + ], + "x-ms-client-request-id": "304defc8-0221-cf76-a236-0359604a98b8", + "x-ms-date": "Tue, 30 Nov 2021 19:04:15 GMT", + "x-ms-delete-snapshots": "include", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "Date": "Tue, 30 Nov 2021 19:04:16 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "304defc8-0221-cf76-a236-0359604a98b8", + "x-ms-request-id": "11fc74f7-201a-0000-041d-e6e568000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + } + ], + "Variables": { + "RandomSeed": "1681855706", + "Storage_TestConfigDefault": "ProductionTenant\nfp8xscnapby3pev24a\nU2FuaXRpemVk\nhttps://fp8xscnapby3pev24a.blob.preprod.core.windows.net\nhttps://fp8xscnapby3pev24a.file.preprod.core.windows.net\nhttps://fp8xscnapby3pev24a.queue.core.windows.net\nhttps://fp8xscnapby3pev24a.table.core.windows.net\n\n\n\n\nhttps://fp8xscnapby3pev24a-secondary.blob.core.windows.net\nhttps://fp8xscnapby3pev24a-secondary.file.core.windows.net\nhttps://fp8xscnapby3pev24a-secondary.queue.core.windows.net\nhttps://fp8xscnapby3pev24a-secondary.table.core.windows.net\n\nSanitized\n\n\nCloud\nBlobEndpoint=https://fp8xscnapby3pev24a.blob.preprod.core.windows.net/;QueueEndpoint=https://fp8xscnapby3pev24a.queue.core.windows.net/;FileEndpoint=https://fp8xscnapby3pev24a.file.preprod.core.windows.net/;BlobSecondaryEndpoint=https://fp8xscnapby3pev24a-secondary.blob.core.windows.net/;QueueSecondaryEndpoint=https://fp8xscnapby3pev24a-secondary.queue.core.windows.net/;FileSecondaryEndpoint=https://fp8xscnapby3pev24a-secondary.file.core.windows.net/;AccountName=fp8xscnapby3pev24a;AccountKey=Kg==;\nseanscope1\n\n" + } +} \ No newline at end of file diff --git a/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_FilePermissionTooLarge.json b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_FilePermissionTooLarge.json new file mode 100644 index 000000000000..6a73d32ae938 --- /dev/null +++ b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_FilePermissionTooLarge.json @@ -0,0 +1,149 @@ +{ + "Entries": [ + { + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-da869ea0-142c-48a7-ccc8-6b72a7fb1e68?restype=share", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-ca950352da5fac4daedeb6c660f042a4-107c770eb0ba2945-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" + ], + "x-ms-client-request-id": "e0b30877-5268-0605-1e98-a32fb4062dfe", + "x-ms-date": "Tue, 30 Nov 2021 19:04:13 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Tue, 30 Nov 2021 19:04:15 GMT", + "ETag": "\u00220x8D9B4343448580D\u0022", + "Last-Modified": "Tue, 30 Nov 2021 19:04:15 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "e0b30877-5268-0605-1e98-a32fb4062dfe", + "x-ms-request-id": "11fc74e4-201a-0000-741d-e6e568000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-da869ea0-142c-48a7-ccc8-6b72a7fb1e68/test-directory-20a02846-e881-57ee-f329-bc3cbf9da4d6?restype=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-d0e9ff2fbbfb324aa652dd8df4b91ce9-af8917228e543240-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" + ], + "x-ms-client-request-id": "7cc356c2-9255-8fd3-195c-ec3e96c84680", + "x-ms-date": "Tue, 30 Nov 2021 19:04:13 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Tue, 30 Nov 2021 19:04:15 GMT", + "ETag": "\u00220x8D9B43434576DFD\u0022", + "Last-Modified": "Tue, 30 Nov 2021 19:04:15 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "7cc356c2-9255-8fd3-195c-ec3e96c84680", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-11-30T19:04:15.9079933Z", + "x-ms-file-creation-time": "2021-11-30T19:04:15.9079933Z", + "x-ms-file-id": "13835128424026341376", + "x-ms-file-last-write-time": "2021-11-30T19:04:15.9079933Z", + "x-ms-file-parent-id": "0", + "x-ms-file-permission-key": "10156757773834485186*23892369358363523", + "x-ms-request-id": "11fc74e6-201a-0000-751d-e6e568000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-da869ea0-142c-48a7-ccc8-6b72a7fb1e68/test-directory-20a02846-e881-57ee-f329-bc3cbf9da4d6/test-file-9e1accf4-8e0a-08b5-277d-cdf4663eb078", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-b8322012639d9c44b22a7aeac037eff9-0ee249b99e9a9945-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" + ], + "x-ms-client-request-id": "dabc0046-0960-340d-a0bb-54d8c5de28db", + "x-ms-content-length": "1024", + "x-ms-date": "Tue, 30 Nov 2021 19:04:13 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-type": "file", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Tue, 30 Nov 2021 19:04:15 GMT", + "ETag": "\u00220x8D9B4343464DBC1\u0022", + "Last-Modified": "Tue, 30 Nov 2021 19:04:15 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "dabc0046-0960-340d-a0bb-54d8c5de28db", + "x-ms-file-attributes": "Archive", + "x-ms-file-change-time": "2021-11-30T19:04:15.9960001Z", + "x-ms-file-creation-time": "2021-11-30T19:04:15.9960001Z", + "x-ms-file-id": "11529285414812647424", + "x-ms-file-last-write-time": "2021-11-30T19:04:15.9960001Z", + "x-ms-file-parent-id": "13835128424026341376", + "x-ms-file-permission-key": "16312887433045634277*23892369358363523", + "x-ms-request-id": "11fc74e7-201a-0000-761d-e6e568000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-da869ea0-142c-48a7-ccc8-6b72a7fb1e68?restype=share", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-4d74607623646e408e3160258e23920b-31b72eb7f952e04b-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" + ], + "x-ms-client-request-id": "dd40ab43-9a06-693c-59ef-8ec9af6e2cd6", + "x-ms-date": "Tue, 30 Nov 2021 19:04:14 GMT", + "x-ms-delete-snapshots": "include", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "Date": "Tue, 30 Nov 2021 19:04:15 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "dd40ab43-9a06-693c-59ef-8ec9af6e2cd6", + "x-ms-request-id": "11fc74e8-201a-0000-771d-e6e568000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + } + ], + "Variables": { + "RandomSeed": "1554517113", + "Storage_TestConfigDefault": "ProductionTenant\nfp8xscnapby3pev24a\nU2FuaXRpemVk\nhttps://fp8xscnapby3pev24a.blob.preprod.core.windows.net\nhttps://fp8xscnapby3pev24a.file.preprod.core.windows.net\nhttps://fp8xscnapby3pev24a.queue.core.windows.net\nhttps://fp8xscnapby3pev24a.table.core.windows.net\n\n\n\n\nhttps://fp8xscnapby3pev24a-secondary.blob.core.windows.net\nhttps://fp8xscnapby3pev24a-secondary.file.core.windows.net\nhttps://fp8xscnapby3pev24a-secondary.queue.core.windows.net\nhttps://fp8xscnapby3pev24a-secondary.table.core.windows.net\n\nSanitized\n\n\nCloud\nBlobEndpoint=https://fp8xscnapby3pev24a.blob.preprod.core.windows.net/;QueueEndpoint=https://fp8xscnapby3pev24a.queue.core.windows.net/;FileEndpoint=https://fp8xscnapby3pev24a.file.preprod.core.windows.net/;BlobSecondaryEndpoint=https://fp8xscnapby3pev24a-secondary.blob.core.windows.net/;QueueSecondaryEndpoint=https://fp8xscnapby3pev24a-secondary.queue.core.windows.net/;FileSecondaryEndpoint=https://fp8xscnapby3pev24a-secondary.file.core.windows.net/;AccountName=fp8xscnapby3pev24a;AccountKey=Kg==;\nseanscope1\n\n" + } +} \ No newline at end of file diff --git a/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_FilePermissionTooLargeAsync.json b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_FilePermissionTooLargeAsync.json new file mode 100644 index 000000000000..49248a22a9df --- /dev/null +++ b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_FilePermissionTooLargeAsync.json @@ -0,0 +1,149 @@ +{ + "Entries": [ + { + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-a7913ff9-53c2-7433-4412-449fa03b1044?restype=share", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-684339295ef4a143ab4a3afc18fc04e6-cc7084e7410c7543-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" + ], + "x-ms-client-request-id": "f291ba42-f66b-d23c-b8f1-0ebd7278c8a0", + "x-ms-date": "Tue, 30 Nov 2021 19:04:15 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Tue, 30 Nov 2021 19:04:16 GMT", + "ETag": "\u00220x8D9B43435673A2F\u0022", + "Last-Modified": "Tue, 30 Nov 2021 19:04:17 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "f291ba42-f66b-d23c-b8f1-0ebd7278c8a0", + "x-ms-request-id": "11fc74fd-201a-0000-091d-e6e568000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-a7913ff9-53c2-7433-4412-449fa03b1044/test-directory-e05e1768-64db-6fe1-9cfa-5977cac34896?restype=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-4398360d66c72a4abbc61d600bbc1090-9e46407229874b49-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" + ], + "x-ms-client-request-id": "1407e882-6f4e-dd74-d922-56719cc408f4", + "x-ms-date": "Tue, 30 Nov 2021 19:04:15 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Tue, 30 Nov 2021 19:04:16 GMT", + "ETag": "\u00220x8D9B4343575FF4B\u0022", + "Last-Modified": "Tue, 30 Nov 2021 19:04:17 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "1407e882-6f4e-dd74-d922-56719cc408f4", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-11-30T19:04:17.7860427Z", + "x-ms-file-creation-time": "2021-11-30T19:04:17.7860427Z", + "x-ms-file-id": "13835128424026341376", + "x-ms-file-last-write-time": "2021-11-30T19:04:17.7860427Z", + "x-ms-file-parent-id": "0", + "x-ms-file-permission-key": "10156757773834485186*23892369358363523", + "x-ms-request-id": "11fc74ff-201a-0000-0a1d-e6e568000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-a7913ff9-53c2-7433-4412-449fa03b1044/test-directory-e05e1768-64db-6fe1-9cfa-5977cac34896/test-file-7efa77a9-e21b-4af6-3eff-60b91770f2b6", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-6071f3f5b1dda04d9cb4f269fbe7ac53-9c075a0a4328c54f-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" + ], + "x-ms-client-request-id": "04c85819-a6eb-a0b9-f2bd-d64e0ebbc669", + "x-ms-content-length": "1024", + "x-ms-date": "Tue, 30 Nov 2021 19:04:15 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-type": "file", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Tue, 30 Nov 2021 19:04:17 GMT", + "ETag": "\u00220x8D9B4343583456D\u0022", + "Last-Modified": "Tue, 30 Nov 2021 19:04:17 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "04c85819-a6eb-a0b9-f2bd-d64e0ebbc669", + "x-ms-file-attributes": "Archive", + "x-ms-file-change-time": "2021-11-30T19:04:17.8730349Z", + "x-ms-file-creation-time": "2021-11-30T19:04:17.8730349Z", + "x-ms-file-id": "11529285414812647424", + "x-ms-file-last-write-time": "2021-11-30T19:04:17.8730349Z", + "x-ms-file-parent-id": "13835128424026341376", + "x-ms-file-permission-key": "16312887433045634277*23892369358363523", + "x-ms-request-id": "11fc7500-201a-0000-0b1d-e6e568000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-a7913ff9-53c2-7433-4412-449fa03b1044?restype=share", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-0d5a4fc39ae2344dbc0133bec0e34bf2-285ab97fd7a72f40-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" + ], + "x-ms-client-request-id": "2857a3b9-abcc-f3ec-2052-d545a61ecb83", + "x-ms-date": "Tue, 30 Nov 2021 19:04:15 GMT", + "x-ms-delete-snapshots": "include", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "Date": "Tue, 30 Nov 2021 19:04:17 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "2857a3b9-abcc-f3ec-2052-d545a61ecb83", + "x-ms-request-id": "11fc7501-201a-0000-0c1d-e6e568000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + } + ], + "Variables": { + "RandomSeed": "520832021", + "Storage_TestConfigDefault": "ProductionTenant\nfp8xscnapby3pev24a\nU2FuaXRpemVk\nhttps://fp8xscnapby3pev24a.blob.preprod.core.windows.net\nhttps://fp8xscnapby3pev24a.file.preprod.core.windows.net\nhttps://fp8xscnapby3pev24a.queue.core.windows.net\nhttps://fp8xscnapby3pev24a.table.core.windows.net\n\n\n\n\nhttps://fp8xscnapby3pev24a-secondary.blob.core.windows.net\nhttps://fp8xscnapby3pev24a-secondary.file.core.windows.net\nhttps://fp8xscnapby3pev24a-secondary.queue.core.windows.net\nhttps://fp8xscnapby3pev24a-secondary.table.core.windows.net\n\nSanitized\n\n\nCloud\nBlobEndpoint=https://fp8xscnapby3pev24a.blob.preprod.core.windows.net/;QueueEndpoint=https://fp8xscnapby3pev24a.queue.core.windows.net/;FileEndpoint=https://fp8xscnapby3pev24a.file.preprod.core.windows.net/;BlobSecondaryEndpoint=https://fp8xscnapby3pev24a-secondary.blob.core.windows.net/;QueueSecondaryEndpoint=https://fp8xscnapby3pev24a-secondary.queue.core.windows.net/;FileSecondaryEndpoint=https://fp8xscnapby3pev24a-secondary.file.core.windows.net/;AccountName=fp8xscnapby3pev24a;AccountKey=Kg==;\nseanscope1\n\n" + } +} \ No newline at end of file diff --git a/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_SmbProperties.json b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_SmbProperties.json new file mode 100644 index 000000000000..8bd677f51645 --- /dev/null +++ b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_SmbProperties.json @@ -0,0 +1,261 @@ +{ + "Entries": [ + { + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-02c52e7a-b045-24cf-7d75-f79e58ce27da?restype=share", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-2df5035f5ffd2b4c85d41cda174b5b23-3f6397dd0008f546-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" + ], + "x-ms-client-request-id": "9e53cf69-0433-cc8a-1bf8-ed27128caabd", + "x-ms-date": "Tue, 30 Nov 2021 19:04:14 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Tue, 30 Nov 2021 19:04:15 GMT", + "ETag": "\u00220x8D9B43434800B2F\u0022", + "Last-Modified": "Tue, 30 Nov 2021 19:04:16 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "9e53cf69-0433-cc8a-1bf8-ed27128caabd", + "x-ms-request-id": "11fc74e9-201a-0000-781d-e6e568000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-02c52e7a-b045-24cf-7d75-f79e58ce27da/test-directory-4bc90310-135f-6d83-a038-3dd7afdba3db?restype=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-2c43b34425fc184dbc1c41986633a6de-a1b7463fe4d4e94e-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" + ], + "x-ms-client-request-id": "7ee344c3-18d8-554e-4ce6-fdfac7b31d3f", + "x-ms-date": "Tue, 30 Nov 2021 19:04:14 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Tue, 30 Nov 2021 19:04:15 GMT", + "ETag": "\u00220x8D9B434348FBC48\u0022", + "Last-Modified": "Tue, 30 Nov 2021 19:04:16 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "7ee344c3-18d8-554e-4ce6-fdfac7b31d3f", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-11-30T19:04:16.2769992Z", + "x-ms-file-creation-time": "2021-11-30T19:04:16.2769992Z", + "x-ms-file-id": "13835128424026341376", + "x-ms-file-last-write-time": "2021-11-30T19:04:16.2769992Z", + "x-ms-file-parent-id": "0", + "x-ms-file-permission-key": "10156757773834485186*23892369358363523", + "x-ms-request-id": "11fc74eb-201a-0000-791d-e6e568000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-02c52e7a-b045-24cf-7d75-f79e58ce27da/test-directory-4bc90310-135f-6d83-a038-3dd7afdba3db/test-file-c9151155-2157-8641-5c2d-490dda774c3b", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-33f44fd27f211c45992ee3eacee3e6d6-21b5c41ab26c3b42-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" + ], + "x-ms-client-request-id": "0eb6f934-b14f-a2e0-025d-22aace407bd4", + "x-ms-content-length": "1024", + "x-ms-date": "Tue, 30 Nov 2021 19:04:14 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-type": "file", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Tue, 30 Nov 2021 19:04:15 GMT", + "ETag": "\u00220x8D9B434349D50E3\u0022", + "Last-Modified": "Tue, 30 Nov 2021 19:04:16 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "0eb6f934-b14f-a2e0-025d-22aace407bd4", + "x-ms-file-attributes": "Archive", + "x-ms-file-change-time": "2021-11-30T19:04:16.3660003Z", + "x-ms-file-creation-time": "2021-11-30T19:04:16.3660003Z", + "x-ms-file-id": "11529285414812647424", + "x-ms-file-last-write-time": "2021-11-30T19:04:16.3660003Z", + "x-ms-file-parent-id": "13835128424026341376", + "x-ms-file-permission-key": "16312887433045634277*23892369358363523", + "x-ms-request-id": "11fc74ec-201a-0000-7a1d-e6e568000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-02c52e7a-b045-24cf-7d75-f79e58ce27da?restype=share\u0026comp=filepermission", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "Content-Length": "206", + "Content-Type": "application/json", + "traceparent": "00-566822be472c4843ae51d4739873e392-2fa638d21f64a64c-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" + ], + "x-ms-client-request-id": "c8fb6863-136e-82ae-b185-0032e267bd56", + "x-ms-date": "Tue, 30 Nov 2021 19:04:14 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": { + "permission": "O:S-1-5-21-2127521184-1604012920-1887927527-21560751G:S-1-5-21-2127521184-1604012920-1887927527-513D:AI(A;;FA;;;SY)(A;;FA;;;BA)(A;;0x1200a9;;;S-1-5-21-397955417-626881126-188441444-3053964)" + }, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Tue, 30 Nov 2021 19:04:15 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "c8fb6863-136e-82ae-b185-0032e267bd56", + "x-ms-file-permission-key": "12075044870606081650*23892369358363523", + "x-ms-request-id": "11fc74ed-201a-0000-7b1d-e6e568000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-02c52e7a-b045-24cf-7d75-f79e58ce27da/test-directory-4bc90310-135f-6d83-a038-3dd7afdba3db/test-file-c13dc299-b29f-3048-0e1c-ce78e4acfbb0?comp=rename", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-60f811021d2e4d44a91321c9ce58e4f7-e12040a76eacc148-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" + ], + "x-ms-client-request-id": "7c1415f2-32b0-4441-4d57-303b3db828bd", + "x-ms-date": "Tue, 30 Nov 2021 19:04:14 GMT", + "x-ms-file-attributes": "ReadOnly|Archive", + "x-ms-file-creation-time": "2019-08-15T05:15:25.0600000Z", + "x-ms-file-last-write-time": "2019-08-26T05:15:25.0600000Z", + "x-ms-file-permission-key": "12075044870606081650*23892369358363523", + "x-ms-file-rename-source": "https%3A%2F%2Ffp8xscnapby3pev24a.file.preprod.core.windows.net%2Ftest-share-02c52e7a-b045-24cf-7d75-f79e58ce27da%2Ftest-directory-4bc90310-135f-6d83-a038-3dd7afdba3db%2Ftest-file-c9151155-2157-8641-5c2d-490dda774c3b=", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Date": "Tue, 30 Nov 2021 19:04:15 GMT", + "ETag": "\u00220x8D9B43434B71AB6\u0022", + "Last-Modified": "Tue, 30 Nov 2021 19:04:16 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "7c1415f2-32b0-4441-4d57-303b3db828bd", + "x-ms-file-attributes": "ReadOnly | Archive", + "x-ms-file-change-time": "2021-11-30T19:04:16.5350070Z", + "x-ms-file-creation-time": "2019-08-15T05:15:25.0600000Z", + "x-ms-file-id": "11529285414812647424", + "x-ms-file-last-write-time": "2019-08-26T05:15:25.0600000Z", + "x-ms-file-parent-id": "13835128424026341376", + "x-ms-file-permission-key": "12075044870606081650*23892369358363523", + "x-ms-request-id": "11fc74ee-201a-0000-7c1d-e6e568000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-02c52e7a-b045-24cf-7d75-f79e58ce27da/test-directory-4bc90310-135f-6d83-a038-3dd7afdba3db/test-file-c13dc299-b29f-3048-0e1c-ce78e4acfbb0", + "RequestMethod": "HEAD", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" + ], + "x-ms-client-request-id": "cd404a57-4153-2fa5-300d-840f6ad81e1e", + "x-ms-date": "Tue, 30 Nov 2021 19:04:14 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Length": "1024", + "Content-Type": "application/octet-stream", + "Date": "Tue, 30 Nov 2021 19:04:15 GMT", + "ETag": "\u00220x8D9B43434B71AB6\u0022", + "Last-Modified": "Tue, 30 Nov 2021 19:04:16 GMT", + "x-ms-client-request-id": "cd404a57-4153-2fa5-300d-840f6ad81e1e", + "x-ms-file-attributes": "ReadOnly | Archive", + "x-ms-file-change-time": "2021-11-30T19:04:16.5350070Z", + "x-ms-file-creation-time": "2019-08-15T05:15:25.0600000Z", + "x-ms-file-id": "11529285414812647424", + "x-ms-file-last-write-time": "2019-08-26T05:15:25.0600000Z", + "x-ms-file-parent-id": "13835128424026341376", + "x-ms-file-permission-key": "12075044870606081650*23892369358363523", + "x-ms-request-id": "11fc74ef-201a-0000-7d1d-e6e568000000", + "x-ms-server-encrypted": "true", + "x-ms-type": "File", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-02c52e7a-b045-24cf-7d75-f79e58ce27da?restype=share", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-24345bcf2c29164e8a5fa0597543c0cc-b27365e2605b9a45-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" + ], + "x-ms-client-request-id": "f2e32c1f-5a78-7269-6c09-60f8d2425f7c", + "x-ms-date": "Tue, 30 Nov 2021 19:04:14 GMT", + "x-ms-delete-snapshots": "include", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "Date": "Tue, 30 Nov 2021 19:04:15 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "f2e32c1f-5a78-7269-6c09-60f8d2425f7c", + "x-ms-request-id": "11fc74f0-201a-0000-7e1d-e6e568000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + } + ], + "Variables": { + "RandomSeed": "742570455", + "Storage_TestConfigDefault": "ProductionTenant\nfp8xscnapby3pev24a\nU2FuaXRpemVk\nhttps://fp8xscnapby3pev24a.blob.preprod.core.windows.net\nhttps://fp8xscnapby3pev24a.file.preprod.core.windows.net\nhttps://fp8xscnapby3pev24a.queue.core.windows.net\nhttps://fp8xscnapby3pev24a.table.core.windows.net\n\n\n\n\nhttps://fp8xscnapby3pev24a-secondary.blob.core.windows.net\nhttps://fp8xscnapby3pev24a-secondary.file.core.windows.net\nhttps://fp8xscnapby3pev24a-secondary.queue.core.windows.net\nhttps://fp8xscnapby3pev24a-secondary.table.core.windows.net\n\nSanitized\n\n\nCloud\nBlobEndpoint=https://fp8xscnapby3pev24a.blob.preprod.core.windows.net/;QueueEndpoint=https://fp8xscnapby3pev24a.queue.core.windows.net/;FileEndpoint=https://fp8xscnapby3pev24a.file.preprod.core.windows.net/;BlobSecondaryEndpoint=https://fp8xscnapby3pev24a-secondary.blob.core.windows.net/;QueueSecondaryEndpoint=https://fp8xscnapby3pev24a-secondary.queue.core.windows.net/;FileSecondaryEndpoint=https://fp8xscnapby3pev24a-secondary.file.core.windows.net/;AccountName=fp8xscnapby3pev24a;AccountKey=Kg==;\nseanscope1\n\n" + } +} \ No newline at end of file diff --git a/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_SmbPropertiesAsync.json b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_SmbPropertiesAsync.json new file mode 100644 index 000000000000..0df3b65080be --- /dev/null +++ b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_SmbPropertiesAsync.json @@ -0,0 +1,261 @@ +{ + "Entries": [ + { + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-cadc4e37-799a-020a-4340-c3875a302a5a?restype=share", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-0515e6cd23f19b4d95a0913ab6b34656-95f8160bd4125240-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" + ], + "x-ms-client-request-id": "e9e9da1d-cca0-8c91-f4bf-263e13be5011", + "x-ms-date": "Tue, 30 Nov 2021 19:04:16 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Tue, 30 Nov 2021 19:04:17 GMT", + "ETag": "\u00220x8D9B434359DB4BD\u0022", + "Last-Modified": "Tue, 30 Nov 2021 19:04:18 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "e9e9da1d-cca0-8c91-f4bf-263e13be5011", + "x-ms-request-id": "11fc7502-201a-0000-0d1d-e6e568000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-cadc4e37-799a-020a-4340-c3875a302a5a/test-directory-0ef59be9-4553-a8a4-2a32-3be1f40c8b3f?restype=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-a088e6bd1c89c94ab85664ba016d5491-54a18d59408cec43-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" + ], + "x-ms-client-request-id": "db147468-ee0f-d71d-3540-bf6e90af97e8", + "x-ms-date": "Tue, 30 Nov 2021 19:04:16 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Tue, 30 Nov 2021 19:04:17 GMT", + "ETag": "\u00220x8D9B43435AD6332\u0022", + "Last-Modified": "Tue, 30 Nov 2021 19:04:18 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "db147468-ee0f-d71d-3540-bf6e90af97e8", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-11-30T19:04:18.1490482Z", + "x-ms-file-creation-time": "2021-11-30T19:04:18.1490482Z", + "x-ms-file-id": "13835128424026341376", + "x-ms-file-last-write-time": "2021-11-30T19:04:18.1490482Z", + "x-ms-file-parent-id": "0", + "x-ms-file-permission-key": "10156757773834485186*23892369358363523", + "x-ms-request-id": "11fc7504-201a-0000-0e1d-e6e568000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-cadc4e37-799a-020a-4340-c3875a302a5a/test-directory-0ef59be9-4553-a8a4-2a32-3be1f40c8b3f/test-file-c1fae733-d055-a8ca-e2fa-8aff15c74045", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-ef69ef08f15521429b391f66296adf9b-eb2125c96d53954f-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" + ], + "x-ms-client-request-id": "80a948bc-d4ea-987b-a96b-f914631ec26d", + "x-ms-content-length": "1024", + "x-ms-date": "Tue, 30 Nov 2021 19:04:16 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-type": "file", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Tue, 30 Nov 2021 19:04:17 GMT", + "ETag": "\u00220x8D9B43435BB45A3\u0022", + "Last-Modified": "Tue, 30 Nov 2021 19:04:18 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "80a948bc-d4ea-987b-a96b-f914631ec26d", + "x-ms-file-attributes": "Archive", + "x-ms-file-change-time": "2021-11-30T19:04:18.2400419Z", + "x-ms-file-creation-time": "2021-11-30T19:04:18.2400419Z", + "x-ms-file-id": "11529285414812647424", + "x-ms-file-last-write-time": "2021-11-30T19:04:18.2400419Z", + "x-ms-file-parent-id": "13835128424026341376", + "x-ms-file-permission-key": "16312887433045634277*23892369358363523", + "x-ms-request-id": "11fc7505-201a-0000-0f1d-e6e568000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-cadc4e37-799a-020a-4340-c3875a302a5a?restype=share\u0026comp=filepermission", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "Content-Length": "206", + "Content-Type": "application/json", + "traceparent": "00-e5cb4ea9620a5a45a24af1b92338b016-6d1276494f585647-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" + ], + "x-ms-client-request-id": "0705dcce-4479-a59e-5726-c94447b812e5", + "x-ms-date": "Tue, 30 Nov 2021 19:04:16 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": { + "permission": "O:S-1-5-21-2127521184-1604012920-1887927527-21560751G:S-1-5-21-2127521184-1604012920-1887927527-513D:AI(A;;FA;;;SY)(A;;FA;;;BA)(A;;0x1200a9;;;S-1-5-21-397955417-626881126-188441444-3053964)" + }, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Tue, 30 Nov 2021 19:04:17 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "0705dcce-4479-a59e-5726-c94447b812e5", + "x-ms-file-permission-key": "12075044870606081650*23892369358363523", + "x-ms-request-id": "11fc7506-201a-0000-101d-e6e568000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-cadc4e37-799a-020a-4340-c3875a302a5a/test-directory-0ef59be9-4553-a8a4-2a32-3be1f40c8b3f/test-file-26d179ff-1635-83f0-b7a5-8dc385c42797?comp=rename", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-25bab1950577934a920fb405709b26d0-a4c0b8d765780246-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" + ], + "x-ms-client-request-id": "a9f477b4-1fbe-4b1e-189c-74f8f6168036", + "x-ms-date": "Tue, 30 Nov 2021 19:04:16 GMT", + "x-ms-file-attributes": "ReadOnly|Archive", + "x-ms-file-creation-time": "2019-08-15T05:15:25.0600000Z", + "x-ms-file-last-write-time": "2019-08-26T05:15:25.0600000Z", + "x-ms-file-permission-key": "12075044870606081650*23892369358363523", + "x-ms-file-rename-source": "https%3A%2F%2Ffp8xscnapby3pev24a.file.preprod.core.windows.net%2Ftest-share-cadc4e37-799a-020a-4340-c3875a302a5a%2Ftest-directory-0ef59be9-4553-a8a4-2a32-3be1f40c8b3f%2Ftest-file-c1fae733-d055-a8ca-e2fa-8aff15c74045=", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Date": "Tue, 30 Nov 2021 19:04:17 GMT", + "ETag": "\u00220x8D9B43435D50F5E\u0022", + "Last-Modified": "Tue, 30 Nov 2021 19:04:18 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "a9f477b4-1fbe-4b1e-189c-74f8f6168036", + "x-ms-file-attributes": "ReadOnly | Archive", + "x-ms-file-change-time": "2021-11-30T19:04:18.4090462Z", + "x-ms-file-creation-time": "2019-08-15T05:15:25.0600000Z", + "x-ms-file-id": "11529285414812647424", + "x-ms-file-last-write-time": "2019-08-26T05:15:25.0600000Z", + "x-ms-file-parent-id": "13835128424026341376", + "x-ms-file-permission-key": "12075044870606081650*23892369358363523", + "x-ms-request-id": "11fc7507-201a-0000-111d-e6e568000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-cadc4e37-799a-020a-4340-c3875a302a5a/test-directory-0ef59be9-4553-a8a4-2a32-3be1f40c8b3f/test-file-26d179ff-1635-83f0-b7a5-8dc385c42797", + "RequestMethod": "HEAD", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" + ], + "x-ms-client-request-id": "cf902d59-69c3-2427-4339-943f81574908", + "x-ms-date": "Tue, 30 Nov 2021 19:04:16 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Length": "1024", + "Content-Type": "application/octet-stream", + "Date": "Tue, 30 Nov 2021 19:04:17 GMT", + "ETag": "\u00220x8D9B43435D50F5E\u0022", + "Last-Modified": "Tue, 30 Nov 2021 19:04:18 GMT", + "x-ms-client-request-id": "cf902d59-69c3-2427-4339-943f81574908", + "x-ms-file-attributes": "ReadOnly | Archive", + "x-ms-file-change-time": "2021-11-30T19:04:18.4090462Z", + "x-ms-file-creation-time": "2019-08-15T05:15:25.0600000Z", + "x-ms-file-id": "11529285414812647424", + "x-ms-file-last-write-time": "2019-08-26T05:15:25.0600000Z", + "x-ms-file-parent-id": "13835128424026341376", + "x-ms-file-permission-key": "12075044870606081650*23892369358363523", + "x-ms-request-id": "11fc7508-201a-0000-121d-e6e568000000", + "x-ms-server-encrypted": "true", + "x-ms-type": "File", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-cadc4e37-799a-020a-4340-c3875a302a5a?restype=share", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-27f82cd3bb7ad14d8ca720ae803406cc-e6e5570b31175a43-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" + ], + "x-ms-client-request-id": "c99e8036-b185-6572-c923-105caffa5835", + "x-ms-date": "Tue, 30 Nov 2021 19:04:16 GMT", + "x-ms-delete-snapshots": "include", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "Date": "Tue, 30 Nov 2021 19:04:17 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "c99e8036-b185-6572-c923-105caffa5835", + "x-ms-request-id": "11fc7509-201a-0000-131d-e6e568000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + } + ], + "Variables": { + "RandomSeed": "1165644529", + "Storage_TestConfigDefault": "ProductionTenant\nfp8xscnapby3pev24a\nU2FuaXRpemVk\nhttps://fp8xscnapby3pev24a.blob.preprod.core.windows.net\nhttps://fp8xscnapby3pev24a.file.preprod.core.windows.net\nhttps://fp8xscnapby3pev24a.queue.core.windows.net\nhttps://fp8xscnapby3pev24a.table.core.windows.net\n\n\n\n\nhttps://fp8xscnapby3pev24a-secondary.blob.core.windows.net\nhttps://fp8xscnapby3pev24a-secondary.file.core.windows.net\nhttps://fp8xscnapby3pev24a-secondary.queue.core.windows.net\nhttps://fp8xscnapby3pev24a-secondary.table.core.windows.net\n\nSanitized\n\n\nCloud\nBlobEndpoint=https://fp8xscnapby3pev24a.blob.preprod.core.windows.net/;QueueEndpoint=https://fp8xscnapby3pev24a.queue.core.windows.net/;FileEndpoint=https://fp8xscnapby3pev24a.file.preprod.core.windows.net/;BlobSecondaryEndpoint=https://fp8xscnapby3pev24a-secondary.blob.core.windows.net/;QueueSecondaryEndpoint=https://fp8xscnapby3pev24a-secondary.queue.core.windows.net/;FileSecondaryEndpoint=https://fp8xscnapby3pev24a-secondary.file.core.windows.net/;AccountName=fp8xscnapby3pev24a;AccountKey=Kg==;\nseanscope1\n\n" + } +} \ No newline at end of file From e517c664efa98f49de86b7492beb4ed0f966b7f8 Mon Sep 17 00:00:00 2001 From: Sean McCullough Date: Tue, 30 Nov 2021 13:31:52 -0600 Subject: [PATCH 20/21] update --- .../src/Generated/DirectoryRestClient.cs | 2 +- .../src/Generated/FileRestClient.cs | 2 +- .../src/autorest.md | 2 +- .../tests/DirectoryClientTests.cs | 3 +- .../tests/FileClientTests.cs | 1 - .../RenameAsync_IgnoreReadOnly(False).json | 140 ++++----- ...enameAsync_IgnoreReadOnly(False)Async.json | 140 ++++----- .../RenameAsync_IgnoreReadOnly(True).json | 267 +++++++++++++++++ ...RenameAsync_IgnoreReadOnly(True)Async.json | 267 +++++++++++++++++ .../RenameAsync_IgnoreReadOnly(False).json | 140 ++++----- ...enameAsync_IgnoreReadOnly(False)Async.json | 140 ++++----- .../RenameAsync_IgnoreReadOnly(True).json | 270 ++++++++++++++++++ ...RenameAsync_IgnoreReadOnly(True)Async.json | 270 ++++++++++++++++++ 13 files changed, 1358 insertions(+), 286 deletions(-) create mode 100644 sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_IgnoreReadOnly(True).json create mode 100644 sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_IgnoreReadOnly(True)Async.json create mode 100644 sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_IgnoreReadOnly(True).json create mode 100644 sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_IgnoreReadOnly(True)Async.json diff --git a/sdk/storage/Azure.Storage.Files.Shares/src/Generated/DirectoryRestClient.cs b/sdk/storage/Azure.Storage.Files.Shares/src/Generated/DirectoryRestClient.cs index e17bc5c6f2c6..98460f7c4bc3 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/src/Generated/DirectoryRestClient.cs +++ b/sdk/storage/Azure.Storage.Files.Shares/src/Generated/DirectoryRestClient.cs @@ -719,7 +719,7 @@ internal HttpMessage CreateRenameRequest(string renameSource, int? timeout, bool } if (ignoreReadOnly != null) { - request.Headers.Add("x-ms-file-rename-ignore-read-only", ignoreReadOnly.Value); + request.Headers.Add("x-ms-file-rename-ignore-readonly", ignoreReadOnly.Value); } if (sourceLeaseId != null) { diff --git a/sdk/storage/Azure.Storage.Files.Shares/src/Generated/FileRestClient.cs b/sdk/storage/Azure.Storage.Files.Shares/src/Generated/FileRestClient.cs index fb9f4b526fe5..81b6e0631b1b 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/src/Generated/FileRestClient.cs +++ b/sdk/storage/Azure.Storage.Files.Shares/src/Generated/FileRestClient.cs @@ -1525,7 +1525,7 @@ internal HttpMessage CreateRenameRequest(string renameSource, int? timeout, bool } if (ignoreReadOnly != null) { - request.Headers.Add("x-ms-file-rename-ignore-read-only", ignoreReadOnly.Value); + request.Headers.Add("x-ms-file-rename-ignore-readonly", ignoreReadOnly.Value); } if (sourceLeaseId != null) { diff --git a/sdk/storage/Azure.Storage.Files.Shares/src/autorest.md b/sdk/storage/Azure.Storage.Files.Shares/src/autorest.md index c1825566cd81..e48b5e6b548e 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/src/autorest.md +++ b/sdk/storage/Azure.Storage.Files.Shares/src/autorest.md @@ -4,7 +4,7 @@ Run `dotnet build /t:GenerateCode` to generate code. ``` yaml input-file: - - https://raw.githubusercontent.com/Azure/azure-rest-api-specs/564d0137d08defea63d9de2413ef5336fbfe2e6d/specification/storage/data-plane/Microsoft.FileStorage/preview/2021-04-10/file.json + - C:\Users\seanmcc\git\azure-rest-api-specs\specification\storage\data-plane\Microsoft.FileStorage\preview\2021-04-10\file.json # https://github.com/Azure/autorest/issues/4075 skip-semantics-validation: true modelerfour: diff --git a/sdk/storage/Azure.Storage.Files.Shares/tests/DirectoryClientTests.cs b/sdk/storage/Azure.Storage.Files.Shares/tests/DirectoryClientTests.cs index ac012bc63834..fd757027b0ab 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/tests/DirectoryClientTests.cs +++ b/sdk/storage/Azure.Storage.Files.Shares/tests/DirectoryClientTests.cs @@ -1309,7 +1309,6 @@ await TestHelper.AssertExpectedExceptionAsync( } } - [Ignore("service bug")] [RecordedTest] [ServiceVersion(Min = ShareClientOptions.ServiceVersion.V2021_04_10)] [TestCase(true)] @@ -1350,7 +1349,7 @@ await destFile.CreateAsync( options: options); // Assert - Response response = await destFile.GetPropertiesAsync(); + Response response = await destDirectory.GetPropertiesAsync(); } else { diff --git a/sdk/storage/Azure.Storage.Files.Shares/tests/FileClientTests.cs b/sdk/storage/Azure.Storage.Files.Shares/tests/FileClientTests.cs index 24a25c3e9b38..575590d23447 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/tests/FileClientTests.cs +++ b/sdk/storage/Azure.Storage.Files.Shares/tests/FileClientTests.cs @@ -3723,7 +3723,6 @@ await TestHelper.AssertExpectedExceptionAsync( } } - [Ignore("serivce bug")] [RecordedTest] [ServiceVersion(Min = ShareClientOptions.ServiceVersion.V2021_04_10)] [TestCase(true)] diff --git a/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_IgnoreReadOnly(False).json b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_IgnoreReadOnly(False).json index 32a5b339102b..62c1cee1e23c 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_IgnoreReadOnly(False).json +++ b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_IgnoreReadOnly(False).json @@ -1,47 +1,47 @@ { "Entries": [ { - "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-386083a9-ad83-0894-4dd6-117a8bba3b56?restype=share", + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-386083a9-ad83-0894-4dd6-117a8bba3b56?restype=share", "RequestMethod": "PUT", "RequestHeaders": { "Accept": "application/xml", "Authorization": "Sanitized", - "traceparent": "00-f64364404de349479a36abb1b6fd5c56-1214efd5667ed843-00", + "traceparent": "00-8a2a79de3188864fa043094d1aca2750-71be72c48d51da4c-00", "User-Agent": [ - "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", - "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" ], "x-ms-client-request-id": "dcb94502-bd40-d679-991a-659989abac94", - "x-ms-date": "Fri, 29 Oct 2021 19:29:24 GMT", + "x-ms-date": "Tue, 30 Nov 2021 19:31:22 GMT", "x-ms-return-client-request-id": "true", "x-ms-version": "2021-04-10" }, "RequestBody": null, "StatusCode": 201, "ResponseHeaders": { - "Date": "Fri, 29 Oct 2021 19:29:25 GMT", - "ETag": "\u00220x8D99B126AF2088E\u0022", - "Last-Modified": "Fri, 29 Oct 2021 19:29:25 GMT", + "Date": "Tue, 30 Nov 2021 19:31:24 GMT", + "ETag": "\u00220x8D9B437FF1EB410\u0022", + "Last-Modified": "Tue, 30 Nov 2021 19:31:24 GMT", "Transfer-Encoding": "chunked", "x-ms-client-request-id": "dcb94502-bd40-d679-991a-659989abac94", - "x-ms-request-id": "e116b192-c01a-0001-2efb-cc0599000000", + "x-ms-request-id": "fe9f84b2-b01a-0009-5520-e63c4a000000", "x-ms-version": "2021-04-10" }, "ResponseBody": [] }, { - "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-386083a9-ad83-0894-4dd6-117a8bba3b56/test-directory-7908531f-27a1-4aa4-e1b7-81a87c5372cf?restype=directory", + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-386083a9-ad83-0894-4dd6-117a8bba3b56/test-directory-7908531f-27a1-4aa4-e1b7-81a87c5372cf?restype=directory", "RequestMethod": "PUT", "RequestHeaders": { "Accept": "application/xml", "Authorization": "Sanitized", - "traceparent": "00-989ed0a5461af54a9be5bfeff5583e50-3f70350185b73b4b-00", + "traceparent": "00-c920074ab6855b44ad03de4bc17ec65b-858bab87f03b1641-00", "User-Agent": [ - "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", - "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" ], "x-ms-client-request-id": "42219c2e-6575-dad7-a16f-fb883bd15946", - "x-ms-date": "Fri, 29 Oct 2021 19:29:24 GMT", + "x-ms-date": "Tue, 30 Nov 2021 19:31:22 GMT", "x-ms-file-attributes": "None", "x-ms-file-creation-time": "Now", "x-ms-file-last-write-time": "Now", @@ -52,37 +52,37 @@ "RequestBody": null, "StatusCode": 201, "ResponseHeaders": { - "Date": "Fri, 29 Oct 2021 19:29:25 GMT", - "ETag": "\u00220x8D99B126AFFE815\u0022", - "Last-Modified": "Fri, 29 Oct 2021 19:29:25 GMT", + "Date": "Tue, 30 Nov 2021 19:31:24 GMT", + "ETag": "\u00220x8D9B437FF2DF648\u0022", + "Last-Modified": "Tue, 30 Nov 2021 19:31:24 GMT", "Transfer-Encoding": "chunked", "x-ms-client-request-id": "42219c2e-6575-dad7-a16f-fb883bd15946", "x-ms-file-attributes": "Directory", - "x-ms-file-change-time": "2021-10-29T19:29:25.6508437Z", - "x-ms-file-creation-time": "2021-10-29T19:29:25.6508437Z", + "x-ms-file-change-time": "2021-11-30T19:31:24.7039048Z", + "x-ms-file-creation-time": "2021-11-30T19:31:24.7039048Z", "x-ms-file-id": "13835128424026341376", - "x-ms-file-last-write-time": "2021-10-29T19:29:25.6508437Z", + "x-ms-file-last-write-time": "2021-11-30T19:31:24.7039048Z", "x-ms-file-parent-id": "0", - "x-ms-file-permission-key": "15110104144358886944*6706197617703823457", - "x-ms-request-id": "e116b194-c01a-0001-2ffb-cc0599000000", - "x-ms-request-server-encrypted": "false", + "x-ms-file-permission-key": "10156757773834485186*23892369358363523", + "x-ms-request-id": "fe9f84b4-b01a-0009-5620-e63c4a000000", + "x-ms-request-server-encrypted": "true", "x-ms-version": "2021-04-10" }, "ResponseBody": [] }, { - "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-386083a9-ad83-0894-4dd6-117a8bba3b56/test-directory-f0a296a8-6733-bf93-3d62-1bc8a21c51d9?restype=directory", + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-386083a9-ad83-0894-4dd6-117a8bba3b56/test-directory-f0a296a8-6733-bf93-3d62-1bc8a21c51d9?restype=directory", "RequestMethod": "PUT", "RequestHeaders": { "Accept": "application/xml", "Authorization": "Sanitized", - "traceparent": "00-fcc3aff761a6c04ab67741b1a3825847-d0ac517fdc8e1f40-00", + "traceparent": "00-8069ab8da74e2d4080c8fb09f0d1279e-2b3843898aa40542-00", "User-Agent": [ - "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", - "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" ], "x-ms-client-request-id": "62df3e7e-2f66-c7d8-0861-05124a0e3885", - "x-ms-date": "Fri, 29 Oct 2021 19:29:24 GMT", + "x-ms-date": "Tue, 30 Nov 2021 19:31:22 GMT", "x-ms-file-attributes": "None", "x-ms-file-creation-time": "Now", "x-ms-file-last-write-time": "Now", @@ -93,38 +93,38 @@ "RequestBody": null, "StatusCode": 201, "ResponseHeaders": { - "Date": "Fri, 29 Oct 2021 19:29:25 GMT", - "ETag": "\u00220x8D99B126B0CB93A\u0022", - "Last-Modified": "Fri, 29 Oct 2021 19:29:25 GMT", + "Date": "Tue, 30 Nov 2021 19:31:24 GMT", + "ETag": "\u00220x8D9B437FF3A525A\u0022", + "Last-Modified": "Tue, 30 Nov 2021 19:31:24 GMT", "Transfer-Encoding": "chunked", "x-ms-client-request-id": "62df3e7e-2f66-c7d8-0861-05124a0e3885", "x-ms-file-attributes": "Directory", - "x-ms-file-change-time": "2021-10-29T19:29:25.7348410Z", - "x-ms-file-creation-time": "2021-10-29T19:29:25.7348410Z", + "x-ms-file-change-time": "2021-11-30T19:31:24.7849050Z", + "x-ms-file-creation-time": "2021-11-30T19:31:24.7849050Z", "x-ms-file-id": "11529285414812647424", - "x-ms-file-last-write-time": "2021-10-29T19:29:25.7348410Z", + "x-ms-file-last-write-time": "2021-11-30T19:31:24.7849050Z", "x-ms-file-parent-id": "0", - "x-ms-file-permission-key": "15110104144358886944*6706197617703823457", - "x-ms-request-id": "e116b195-c01a-0001-30fb-cc0599000000", - "x-ms-request-server-encrypted": "false", + "x-ms-file-permission-key": "10156757773834485186*23892369358363523", + "x-ms-request-id": "fe9f84b5-b01a-0009-5720-e63c4a000000", + "x-ms-request-server-encrypted": "true", "x-ms-version": "2021-04-10" }, "ResponseBody": [] }, { - "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-386083a9-ad83-0894-4dd6-117a8bba3b56/test-directory-f0a296a8-6733-bf93-3d62-1bc8a21c51d9/test-file-c5f0211d-7958-7814-3c0f-2e95c3025caf", + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-386083a9-ad83-0894-4dd6-117a8bba3b56/test-directory-f0a296a8-6733-bf93-3d62-1bc8a21c51d9/test-file-c5f0211d-7958-7814-3c0f-2e95c3025caf", "RequestMethod": "PUT", "RequestHeaders": { "Accept": "application/xml", "Authorization": "Sanitized", - "traceparent": "00-736b7f655c97ef47b948ef248ac986d4-2646df318112d84f-00", + "traceparent": "00-ee864bc4ea84094fbc621a7a5e09efcc-253bce6c0126a144-00", "User-Agent": [ - "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", - "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" ], "x-ms-client-request-id": "41741e65-a39d-0534-2a66-265600420305", "x-ms-content-length": "1024", - "x-ms-date": "Fri, 29 Oct 2021 19:29:25 GMT", + "x-ms-date": "Tue, 30 Nov 2021 19:31:22 GMT", "x-ms-file-attributes": "ReadOnly", "x-ms-file-creation-time": "Now", "x-ms-file-last-write-time": "Now", @@ -136,41 +136,41 @@ "RequestBody": null, "StatusCode": 201, "ResponseHeaders": { - "Date": "Fri, 29 Oct 2021 19:29:25 GMT", - "ETag": "\u00220x8D99B126B19B244\u0022", - "Last-Modified": "Fri, 29 Oct 2021 19:29:25 GMT", + "Date": "Tue, 30 Nov 2021 19:31:24 GMT", + "ETag": "\u00220x8D9B437FF480DFF\u0022", + "Last-Modified": "Tue, 30 Nov 2021 19:31:24 GMT", "Transfer-Encoding": "chunked", "x-ms-client-request-id": "41741e65-a39d-0534-2a66-265600420305", "x-ms-file-attributes": "ReadOnly | Archive", - "x-ms-file-change-time": "2021-10-29T19:29:25.8198596Z", - "x-ms-file-creation-time": "2021-10-29T19:29:25.8198596Z", + "x-ms-file-change-time": "2021-11-30T19:31:24.8749055Z", + "x-ms-file-creation-time": "2021-11-30T19:31:24.8749055Z", "x-ms-file-id": "16140971433240035328", - "x-ms-file-last-write-time": "2021-10-29T19:29:25.8198596Z", + "x-ms-file-last-write-time": "2021-11-30T19:31:24.8749055Z", "x-ms-file-parent-id": "11529285414812647424", - "x-ms-file-permission-key": "13773932323712163591*6706197617703823457", - "x-ms-request-id": "e116b196-c01a-0001-31fb-cc0599000000", - "x-ms-request-server-encrypted": "false", + "x-ms-file-permission-key": "16312887433045634277*23892369358363523", + "x-ms-request-id": "fe9f84b6-b01a-0009-5820-e63c4a000000", + "x-ms-request-server-encrypted": "true", "x-ms-version": "2021-04-10" }, "ResponseBody": [] }, { - "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-386083a9-ad83-0894-4dd6-117a8bba3b56/test-directory-f0a296a8-6733-bf93-3d62-1bc8a21c51d9/test-file-c5f0211d-7958-7814-3c0f-2e95c3025caf?restype=directory\u0026comp=rename", + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-386083a9-ad83-0894-4dd6-117a8bba3b56/test-directory-f0a296a8-6733-bf93-3d62-1bc8a21c51d9/test-file-c5f0211d-7958-7814-3c0f-2e95c3025caf?restype=directory\u0026comp=rename", "RequestMethod": "PUT", "RequestHeaders": { "Accept": "application/xml", "Authorization": "Sanitized", - "traceparent": "00-0b1d8244fffce0489f1126fafb89ab8a-11642aa9c0bc1445-00", + "traceparent": "00-e55f6e3e80d24849bd9e7066ce592668-de71ba453527bd4e-00", "User-Agent": [ - "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", - "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" ], "x-ms-client-request-id": "a5307bc7-1a8d-5512-5944-38d6c91d685a", - "x-ms-date": "Fri, 29 Oct 2021 19:29:25 GMT", + "x-ms-date": "Tue, 30 Nov 2021 19:31:22 GMT", "x-ms-file-attributes": "Directory", - "x-ms-file-rename-ignore-read-only": "false", + "x-ms-file-rename-ignore-readonly": "false", "x-ms-file-rename-replace-if-exists": "true", - "x-ms-file-rename-source": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-386083a9-ad83-0894-4dd6-117a8bba3b56/test-directory-7908531f-27a1-4aa4-e1b7-81a87c5372cf", + "x-ms-file-rename-source": "https%3A%2F%2Ffp8xscnapby3pev24a.file.preprod.core.windows.net%2Ftest-share-386083a9-ad83-0894-4dd6-117a8bba3b56%2Ftest-directory-7908531f-27a1-4aa4-e1b7-81a87c5372cf=", "x-ms-return-client-request-id": "true", "x-ms-version": "2021-04-10" }, @@ -179,31 +179,31 @@ "ResponseHeaders": { "Content-Length": "258", "Content-Type": "application/xml", - "Date": "Fri, 29 Oct 2021 19:29:25 GMT", + "Date": "Tue, 30 Nov 2021 19:31:24 GMT", "x-ms-client-request-id": "a5307bc7-1a8d-5512-5944-38d6c91d685a", "x-ms-error-code": "ReadOnlyAttribute", - "x-ms-request-id": "e116b197-c01a-0001-32fb-cc0599000000", + "x-ms-request-id": "fe9f84b7-b01a-0009-5920-e63c4a000000", "x-ms-version": "2021-04-10" }, "ResponseBody": [ "\uFEFF\u003C?xml version=\u00221.0\u0022 encoding=\u0022utf-8\u0022?\u003E\u003CError\u003E\u003CCode\u003EReadOnlyAttribute\u003C/Code\u003E\u003CMessage\u003EThe specified resource is read-only and cannot be modified at this time.\n", - "RequestId:e116b197-c01a-0001-32fb-cc0599000000\n", - "Time:2021-10-29T19:29:25.8879345Z\u003C/Message\u003E\u003C/Error\u003E" + "RequestId:fe9f84b7-b01a-0009-5920-e63c4a000000\n", + "Time:2021-11-30T19:31:24.9609084Z\u003C/Message\u003E\u003C/Error\u003E" ] }, { - "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-386083a9-ad83-0894-4dd6-117a8bba3b56?restype=share", + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-386083a9-ad83-0894-4dd6-117a8bba3b56?restype=share", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/xml", "Authorization": "Sanitized", - "traceparent": "00-48e1a5ca04b7734b9e89189421818efb-91f60c547ec0ac4c-00", + "traceparent": "00-8a9d9536361d6c4d9d5aca4a1519924f-2ffb4eec36dee94a-00", "User-Agent": [ - "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", - "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" ], "x-ms-client-request-id": "858e3017-5d12-eb77-43c5-627f9c726491", - "x-ms-date": "Fri, 29 Oct 2021 19:29:25 GMT", + "x-ms-date": "Tue, 30 Nov 2021 19:31:23 GMT", "x-ms-delete-snapshots": "include", "x-ms-return-client-request-id": "true", "x-ms-version": "2021-04-10" @@ -211,10 +211,10 @@ "RequestBody": null, "StatusCode": 202, "ResponseHeaders": { - "Date": "Fri, 29 Oct 2021 19:29:25 GMT", + "Date": "Tue, 30 Nov 2021 19:31:24 GMT", "Transfer-Encoding": "chunked", "x-ms-client-request-id": "858e3017-5d12-eb77-43c5-627f9c726491", - "x-ms-request-id": "e116b198-c01a-0001-33fb-cc0599000000", + "x-ms-request-id": "fe9f84b8-b01a-0009-5a20-e63c4a000000", "x-ms-version": "2021-04-10" }, "ResponseBody": [] @@ -222,6 +222,6 @@ ], "Variables": { "RandomSeed": "2081511568", - "Storage_TestConfigDefault": "ProductionTenant\n712xscnapby3pev55a\nU2FuaXRpemVk\nhttps://712xscnapby3pev55a.blob.preprod.core.windows.net\nhttps://712xscnapby3pev55a.file.preprod.core.windows.net\nhttps://712xscnapby3pev55a.queue.core.windows.net\nhttps://712xscnapby3pev55a.table.core.windows.net\n\n\n\n\nhttps://712xscnapby3pev55a-secondary.blob.core.windows.net\nhttps://712xscnapby3pev55a-secondary.file.core.windows.net\nhttps://712xscnapby3pev55a-secondary.queue.core.windows.net\nhttps://712xscnapby3pev55a-secondary.table.core.windows.net\n\nSanitized\n\n\nCloud\nBlobEndpoint=https://712xscnapby3pev55a.blob.preprod.core.windows.net/;QueueEndpoint=https://712xscnapby3pev55a.queue.core.windows.net/;FileEndpoint=https://712xscnapby3pev55a.file.preprod.core.windows.net/;BlobSecondaryEndpoint=https://712xscnapby3pev55a-secondary.blob.core.windows.net/;QueueSecondaryEndpoint=https://712xscnapby3pev55a-secondary.queue.core.windows.net/;FileSecondaryEndpoint=https://712xscnapby3pev55a-secondary.file.core.windows.net/;AccountName=712xscnapby3pev55a;AccountKey=Kg==;\nscope-1\n\n" + "Storage_TestConfigDefault": "ProductionTenant\nfp8xscnapby3pev24a\nU2FuaXRpemVk\nhttps://fp8xscnapby3pev24a.blob.preprod.core.windows.net\nhttps://fp8xscnapby3pev24a.file.preprod.core.windows.net\nhttps://fp8xscnapby3pev24a.queue.core.windows.net\nhttps://fp8xscnapby3pev24a.table.core.windows.net\n\n\n\n\nhttps://fp8xscnapby3pev24a-secondary.blob.core.windows.net\nhttps://fp8xscnapby3pev24a-secondary.file.core.windows.net\nhttps://fp8xscnapby3pev24a-secondary.queue.core.windows.net\nhttps://fp8xscnapby3pev24a-secondary.table.core.windows.net\n\nSanitized\n\n\nCloud\nBlobEndpoint=https://fp8xscnapby3pev24a.blob.preprod.core.windows.net/;QueueEndpoint=https://fp8xscnapby3pev24a.queue.core.windows.net/;FileEndpoint=https://fp8xscnapby3pev24a.file.preprod.core.windows.net/;BlobSecondaryEndpoint=https://fp8xscnapby3pev24a-secondary.blob.core.windows.net/;QueueSecondaryEndpoint=https://fp8xscnapby3pev24a-secondary.queue.core.windows.net/;FileSecondaryEndpoint=https://fp8xscnapby3pev24a-secondary.file.core.windows.net/;AccountName=fp8xscnapby3pev24a;AccountKey=Kg==;\nseanscope1\n\n" } } \ No newline at end of file diff --git a/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_IgnoreReadOnly(False)Async.json b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_IgnoreReadOnly(False)Async.json index 103bd06c9bec..8b30b58e76a9 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_IgnoreReadOnly(False)Async.json +++ b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_IgnoreReadOnly(False)Async.json @@ -1,47 +1,47 @@ { "Entries": [ { - "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-0f99c75b-30ab-9fdf-1098-3f0982ff11d7?restype=share", + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-0f99c75b-30ab-9fdf-1098-3f0982ff11d7?restype=share", "RequestMethod": "PUT", "RequestHeaders": { "Accept": "application/xml", "Authorization": "Sanitized", - "traceparent": "00-2d17a79fd4bb4c479f7a601200ca979d-144e67fb95db794e-00", + "traceparent": "00-6548bb612eedac4b9b51e422e5c2153d-5d87b8bf5642f349-00", "User-Agent": [ - "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", - "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" ], "x-ms-client-request-id": "bda41456-5698-37f5-0318-fdd73eebccfe", - "x-ms-date": "Fri, 29 Oct 2021 19:29:29 GMT", + "x-ms-date": "Tue, 30 Nov 2021 19:31:23 GMT", "x-ms-return-client-request-id": "true", "x-ms-version": "2021-04-10" }, "RequestBody": null, "StatusCode": 201, "ResponseHeaders": { - "Date": "Fri, 29 Oct 2021 19:29:29 GMT", - "ETag": "\u00220x8D99B126DED4784\u0022", - "Last-Modified": "Fri, 29 Oct 2021 19:29:30 GMT", + "Date": "Tue, 30 Nov 2021 19:31:25 GMT", + "ETag": "\u00220x8D9B437FFD24D45\u0022", + "Last-Modified": "Tue, 30 Nov 2021 19:31:25 GMT", "Transfer-Encoding": "chunked", "x-ms-client-request-id": "bda41456-5698-37f5-0318-fdd73eebccfe", - "x-ms-request-id": "e116b1df-c01a-0001-6cfb-cc0599000000", + "x-ms-request-id": "fe9f84c1-b01a-0009-6220-e63c4a000000", "x-ms-version": "2021-04-10" }, "ResponseBody": [] }, { - "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-0f99c75b-30ab-9fdf-1098-3f0982ff11d7/test-directory-8a5c358e-7b8a-c349-7377-5fd371ba7b0c?restype=directory", + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-0f99c75b-30ab-9fdf-1098-3f0982ff11d7/test-directory-8a5c358e-7b8a-c349-7377-5fd371ba7b0c?restype=directory", "RequestMethod": "PUT", "RequestHeaders": { "Accept": "application/xml", "Authorization": "Sanitized", - "traceparent": "00-a47dfba22c213642a9bdff782ad10a1d-fb6af0da90fa204f-00", + "traceparent": "00-d5b6d97e64c7e14cac86a1184595c62e-11262135e622e24d-00", "User-Agent": [ - "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", - "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" ], "x-ms-client-request-id": "ee96c10a-69a7-da9a-cae0-4920f721c648", - "x-ms-date": "Fri, 29 Oct 2021 19:29:29 GMT", + "x-ms-date": "Tue, 30 Nov 2021 19:31:23 GMT", "x-ms-file-attributes": "None", "x-ms-file-creation-time": "Now", "x-ms-file-last-write-time": "Now", @@ -52,37 +52,37 @@ "RequestBody": null, "StatusCode": 201, "ResponseHeaders": { - "Date": "Fri, 29 Oct 2021 19:29:29 GMT", - "ETag": "\u00220x8D99B126DFEF929\u0022", - "Last-Modified": "Fri, 29 Oct 2021 19:29:30 GMT", + "Date": "Tue, 30 Nov 2021 19:31:25 GMT", + "ETag": "\u00220x8D9B437FFE14187\u0022", + "Last-Modified": "Tue, 30 Nov 2021 19:31:25 GMT", "Transfer-Encoding": "chunked", "x-ms-client-request-id": "ee96c10a-69a7-da9a-cae0-4920f721c648", "x-ms-file-attributes": "Directory", - "x-ms-file-change-time": "2021-10-29T19:29:30.6778921Z", - "x-ms-file-creation-time": "2021-10-29T19:29:30.6778921Z", + "x-ms-file-change-time": "2021-11-30T19:31:25.8789255Z", + "x-ms-file-creation-time": "2021-11-30T19:31:25.8789255Z", "x-ms-file-id": "13835128424026341376", - "x-ms-file-last-write-time": "2021-10-29T19:29:30.6778921Z", + "x-ms-file-last-write-time": "2021-11-30T19:31:25.8789255Z", "x-ms-file-parent-id": "0", - "x-ms-file-permission-key": "15110104144358886944*6706197617703823457", - "x-ms-request-id": "e116b1e1-c01a-0001-6dfb-cc0599000000", - "x-ms-request-server-encrypted": "false", + "x-ms-file-permission-key": "10156757773834485186*23892369358363523", + "x-ms-request-id": "fe9f84c3-b01a-0009-6320-e63c4a000000", + "x-ms-request-server-encrypted": "true", "x-ms-version": "2021-04-10" }, "ResponseBody": [] }, { - "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-0f99c75b-30ab-9fdf-1098-3f0982ff11d7/test-directory-2433f19c-5e38-3aa2-f665-044d9b1e27f8?restype=directory", + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-0f99c75b-30ab-9fdf-1098-3f0982ff11d7/test-directory-2433f19c-5e38-3aa2-f665-044d9b1e27f8?restype=directory", "RequestMethod": "PUT", "RequestHeaders": { "Accept": "application/xml", "Authorization": "Sanitized", - "traceparent": "00-6f9946cb116c2a499424d09a60ec1a70-65b510885286c647-00", + "traceparent": "00-025403640a8d5c44bde4d99b7d3505a9-93205384ca6e7644-00", "User-Agent": [ - "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", - "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" ], "x-ms-client-request-id": "aa8f9776-bf47-ab8c-1f5c-f742654d3eac", - "x-ms-date": "Fri, 29 Oct 2021 19:29:29 GMT", + "x-ms-date": "Tue, 30 Nov 2021 19:31:23 GMT", "x-ms-file-attributes": "None", "x-ms-file-creation-time": "Now", "x-ms-file-last-write-time": "Now", @@ -93,38 +93,38 @@ "RequestBody": null, "StatusCode": 201, "ResponseHeaders": { - "Date": "Fri, 29 Oct 2021 19:29:29 GMT", - "ETag": "\u00220x8D99B126E0B071A\u0022", - "Last-Modified": "Fri, 29 Oct 2021 19:29:30 GMT", + "Date": "Tue, 30 Nov 2021 19:31:25 GMT", + "ETag": "\u00220x8D9B437FFEE60FE\u0022", + "Last-Modified": "Tue, 30 Nov 2021 19:31:25 GMT", "Transfer-Encoding": "chunked", "x-ms-client-request-id": "aa8f9776-bf47-ab8c-1f5c-f742654d3eac", "x-ms-file-attributes": "Directory", - "x-ms-file-change-time": "2021-10-29T19:29:30.7568922Z", - "x-ms-file-creation-time": "2021-10-29T19:29:30.7568922Z", + "x-ms-file-change-time": "2021-11-30T19:31:25.9649278Z", + "x-ms-file-creation-time": "2021-11-30T19:31:25.9649278Z", "x-ms-file-id": "11529285414812647424", - "x-ms-file-last-write-time": "2021-10-29T19:29:30.7568922Z", + "x-ms-file-last-write-time": "2021-11-30T19:31:25.9649278Z", "x-ms-file-parent-id": "0", - "x-ms-file-permission-key": "15110104144358886944*6706197617703823457", - "x-ms-request-id": "e116b1e2-c01a-0001-6efb-cc0599000000", - "x-ms-request-server-encrypted": "false", + "x-ms-file-permission-key": "10156757773834485186*23892369358363523", + "x-ms-request-id": "fe9f84c4-b01a-0009-6420-e63c4a000000", + "x-ms-request-server-encrypted": "true", "x-ms-version": "2021-04-10" }, "ResponseBody": [] }, { - "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-0f99c75b-30ab-9fdf-1098-3f0982ff11d7/test-directory-2433f19c-5e38-3aa2-f665-044d9b1e27f8/test-file-5c8d50b9-1758-0e24-8cf9-a55fbb272fd8", + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-0f99c75b-30ab-9fdf-1098-3f0982ff11d7/test-directory-2433f19c-5e38-3aa2-f665-044d9b1e27f8/test-file-5c8d50b9-1758-0e24-8cf9-a55fbb272fd8", "RequestMethod": "PUT", "RequestHeaders": { "Accept": "application/xml", "Authorization": "Sanitized", - "traceparent": "00-c2e46f971826d54285f6076844b3f08f-f4dd541a9b786740-00", + "traceparent": "00-9fb09c157d8fc441a7117a78618934fa-522d9c4406d7834d-00", "User-Agent": [ - "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", - "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" ], "x-ms-client-request-id": "bac1f699-a390-5f0b-7280-1d4e192cf0f8", "x-ms-content-length": "1024", - "x-ms-date": "Fri, 29 Oct 2021 19:29:30 GMT", + "x-ms-date": "Tue, 30 Nov 2021 19:31:24 GMT", "x-ms-file-attributes": "ReadOnly", "x-ms-file-creation-time": "Now", "x-ms-file-last-write-time": "Now", @@ -136,41 +136,41 @@ "RequestBody": null, "StatusCode": 201, "ResponseHeaders": { - "Date": "Fri, 29 Oct 2021 19:29:30 GMT", - "ETag": "\u00220x8D99B126E1678E9\u0022", - "Last-Modified": "Fri, 29 Oct 2021 19:29:30 GMT", + "Date": "Tue, 30 Nov 2021 19:31:25 GMT", + "ETag": "\u00220x8D9B437FFFBCE82\u0022", + "Last-Modified": "Tue, 30 Nov 2021 19:31:26 GMT", "Transfer-Encoding": "chunked", "x-ms-client-request-id": "bac1f699-a390-5f0b-7280-1d4e192cf0f8", "x-ms-file-attributes": "ReadOnly | Archive", - "x-ms-file-change-time": "2021-10-29T19:29:30.8318953Z", - "x-ms-file-creation-time": "2021-10-29T19:29:30.8318953Z", + "x-ms-file-change-time": "2021-11-30T19:31:26.0529282Z", + "x-ms-file-creation-time": "2021-11-30T19:31:26.0529282Z", "x-ms-file-id": "16140971433240035328", - "x-ms-file-last-write-time": "2021-10-29T19:29:30.8318953Z", + "x-ms-file-last-write-time": "2021-11-30T19:31:26.0529282Z", "x-ms-file-parent-id": "11529285414812647424", - "x-ms-file-permission-key": "13773932323712163591*6706197617703823457", - "x-ms-request-id": "e116b1e3-c01a-0001-6ffb-cc0599000000", - "x-ms-request-server-encrypted": "false", + "x-ms-file-permission-key": "16312887433045634277*23892369358363523", + "x-ms-request-id": "fe9f84c5-b01a-0009-6520-e63c4a000000", + "x-ms-request-server-encrypted": "true", "x-ms-version": "2021-04-10" }, "ResponseBody": [] }, { - "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-0f99c75b-30ab-9fdf-1098-3f0982ff11d7/test-directory-2433f19c-5e38-3aa2-f665-044d9b1e27f8/test-file-5c8d50b9-1758-0e24-8cf9-a55fbb272fd8?restype=directory\u0026comp=rename", + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-0f99c75b-30ab-9fdf-1098-3f0982ff11d7/test-directory-2433f19c-5e38-3aa2-f665-044d9b1e27f8/test-file-5c8d50b9-1758-0e24-8cf9-a55fbb272fd8?restype=directory\u0026comp=rename", "RequestMethod": "PUT", "RequestHeaders": { "Accept": "application/xml", "Authorization": "Sanitized", - "traceparent": "00-4edf64968e50434e84d39a650411990c-df470bd6596aa146-00", + "traceparent": "00-06a26c56e11af746ba67bd675c1c74a0-a582aae721e11c48-00", "User-Agent": [ - "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", - "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" ], "x-ms-client-request-id": "c5c67323-7465-c147-9377-920e5f61bbe1", - "x-ms-date": "Fri, 29 Oct 2021 19:29:30 GMT", + "x-ms-date": "Tue, 30 Nov 2021 19:31:24 GMT", "x-ms-file-attributes": "Directory", - "x-ms-file-rename-ignore-read-only": "false", + "x-ms-file-rename-ignore-readonly": "false", "x-ms-file-rename-replace-if-exists": "true", - "x-ms-file-rename-source": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-0f99c75b-30ab-9fdf-1098-3f0982ff11d7/test-directory-8a5c358e-7b8a-c349-7377-5fd371ba7b0c", + "x-ms-file-rename-source": "https%3A%2F%2Ffp8xscnapby3pev24a.file.preprod.core.windows.net%2Ftest-share-0f99c75b-30ab-9fdf-1098-3f0982ff11d7%2Ftest-directory-8a5c358e-7b8a-c349-7377-5fd371ba7b0c=", "x-ms-return-client-request-id": "true", "x-ms-version": "2021-04-10" }, @@ -179,31 +179,31 @@ "ResponseHeaders": { "Content-Length": "258", "Content-Type": "application/xml", - "Date": "Fri, 29 Oct 2021 19:29:30 GMT", + "Date": "Tue, 30 Nov 2021 19:31:25 GMT", "x-ms-client-request-id": "c5c67323-7465-c147-9377-920e5f61bbe1", "x-ms-error-code": "ReadOnlyAttribute", - "x-ms-request-id": "e116b1e4-c01a-0001-70fb-cc0599000000", + "x-ms-request-id": "fe9f84c6-b01a-0009-6620-e63c4a000000", "x-ms-version": "2021-04-10" }, "ResponseBody": [ "\uFEFF\u003C?xml version=\u00221.0\u0022 encoding=\u0022utf-8\u0022?\u003E\u003CError\u003E\u003CCode\u003EReadOnlyAttribute\u003C/Code\u003E\u003CMessage\u003EThe specified resource is read-only and cannot be modified at this time.\n", - "RequestId:e116b1e4-c01a-0001-70fb-cc0599000000\n", - "Time:2021-10-29T19:29:30.9029721Z\u003C/Message\u003E\u003C/Error\u003E" + "RequestId:fe9f84c6-b01a-0009-6620-e63c4a000000\n", + "Time:2021-11-30T19:31:26.1359275Z\u003C/Message\u003E\u003C/Error\u003E" ] }, { - "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-0f99c75b-30ab-9fdf-1098-3f0982ff11d7?restype=share", + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-0f99c75b-30ab-9fdf-1098-3f0982ff11d7?restype=share", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/xml", "Authorization": "Sanitized", - "traceparent": "00-16dc3c3647d8de4da6ec4f87f878a8d0-e58656a76c7f6540-00", + "traceparent": "00-39a2566ef8505c43a4889e23a63d40e4-4e94007107709e48-00", "User-Agent": [ - "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", - "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" ], "x-ms-client-request-id": "a52ab307-2a66-b892-d71b-31fea70fdb3e", - "x-ms-date": "Fri, 29 Oct 2021 19:29:30 GMT", + "x-ms-date": "Tue, 30 Nov 2021 19:31:24 GMT", "x-ms-delete-snapshots": "include", "x-ms-return-client-request-id": "true", "x-ms-version": "2021-04-10" @@ -211,10 +211,10 @@ "RequestBody": null, "StatusCode": 202, "ResponseHeaders": { - "Date": "Fri, 29 Oct 2021 19:29:30 GMT", + "Date": "Tue, 30 Nov 2021 19:31:25 GMT", "Transfer-Encoding": "chunked", "x-ms-client-request-id": "a52ab307-2a66-b892-d71b-31fea70fdb3e", - "x-ms-request-id": "e116b1e5-c01a-0001-71fb-cc0599000000", + "x-ms-request-id": "fe9f84c7-b01a-0009-6720-e63c4a000000", "x-ms-version": "2021-04-10" }, "ResponseBody": [] @@ -222,6 +222,6 @@ ], "Variables": { "RandomSeed": "1584112168", - "Storage_TestConfigDefault": "ProductionTenant\n712xscnapby3pev55a\nU2FuaXRpemVk\nhttps://712xscnapby3pev55a.blob.preprod.core.windows.net\nhttps://712xscnapby3pev55a.file.preprod.core.windows.net\nhttps://712xscnapby3pev55a.queue.core.windows.net\nhttps://712xscnapby3pev55a.table.core.windows.net\n\n\n\n\nhttps://712xscnapby3pev55a-secondary.blob.core.windows.net\nhttps://712xscnapby3pev55a-secondary.file.core.windows.net\nhttps://712xscnapby3pev55a-secondary.queue.core.windows.net\nhttps://712xscnapby3pev55a-secondary.table.core.windows.net\n\nSanitized\n\n\nCloud\nBlobEndpoint=https://712xscnapby3pev55a.blob.preprod.core.windows.net/;QueueEndpoint=https://712xscnapby3pev55a.queue.core.windows.net/;FileEndpoint=https://712xscnapby3pev55a.file.preprod.core.windows.net/;BlobSecondaryEndpoint=https://712xscnapby3pev55a-secondary.blob.core.windows.net/;QueueSecondaryEndpoint=https://712xscnapby3pev55a-secondary.queue.core.windows.net/;FileSecondaryEndpoint=https://712xscnapby3pev55a-secondary.file.core.windows.net/;AccountName=712xscnapby3pev55a;AccountKey=Kg==;\nscope-1\n\n" + "Storage_TestConfigDefault": "ProductionTenant\nfp8xscnapby3pev24a\nU2FuaXRpemVk\nhttps://fp8xscnapby3pev24a.blob.preprod.core.windows.net\nhttps://fp8xscnapby3pev24a.file.preprod.core.windows.net\nhttps://fp8xscnapby3pev24a.queue.core.windows.net\nhttps://fp8xscnapby3pev24a.table.core.windows.net\n\n\n\n\nhttps://fp8xscnapby3pev24a-secondary.blob.core.windows.net\nhttps://fp8xscnapby3pev24a-secondary.file.core.windows.net\nhttps://fp8xscnapby3pev24a-secondary.queue.core.windows.net\nhttps://fp8xscnapby3pev24a-secondary.table.core.windows.net\n\nSanitized\n\n\nCloud\nBlobEndpoint=https://fp8xscnapby3pev24a.blob.preprod.core.windows.net/;QueueEndpoint=https://fp8xscnapby3pev24a.queue.core.windows.net/;FileEndpoint=https://fp8xscnapby3pev24a.file.preprod.core.windows.net/;BlobSecondaryEndpoint=https://fp8xscnapby3pev24a-secondary.blob.core.windows.net/;QueueSecondaryEndpoint=https://fp8xscnapby3pev24a-secondary.queue.core.windows.net/;FileSecondaryEndpoint=https://fp8xscnapby3pev24a-secondary.file.core.windows.net/;AccountName=fp8xscnapby3pev24a;AccountKey=Kg==;\nseanscope1\n\n" } } \ No newline at end of file diff --git a/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_IgnoreReadOnly(True).json b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_IgnoreReadOnly(True).json new file mode 100644 index 000000000000..b7edb2309b0e --- /dev/null +++ b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_IgnoreReadOnly(True).json @@ -0,0 +1,267 @@ +{ + "Entries": [ + { + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-fc6e9a64-ae4f-59c6-37f7-0619a06706b1?restype=share", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-352dcd264e6f6e4d95a62da468bf1fe1-58a6dc082b027041-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" + ], + "x-ms-client-request-id": "de0f1b42-3cfd-b4ba-fdfe-044b8f3bcd4a", + "x-ms-date": "Tue, 30 Nov 2021 19:31:20 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Tue, 30 Nov 2021 19:31:23 GMT", + "ETag": "\u00220x8D9B437FEA7605D\u0022", + "Last-Modified": "Tue, 30 Nov 2021 19:31:23 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "de0f1b42-3cfd-b4ba-fdfe-044b8f3bcd4a", + "x-ms-request-id": "fe9f84a8-b01a-0009-4e20-e63c4a000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-fc6e9a64-ae4f-59c6-37f7-0619a06706b1/test-directory-9e0ff58f-1664-e50f-c1a8-d0e8943f7b08?restype=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-0e82bd31e99d64498ec783153d4d5c0d-c8c6affabe8c4348-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" + ], + "x-ms-client-request-id": "e8f7cf98-3e1f-2b1a-0c29-1d546bd120be", + "x-ms-date": "Tue, 30 Nov 2021 19:31:21 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Tue, 30 Nov 2021 19:31:23 GMT", + "ETag": "\u00220x8D9B437FEC12A31\u0022", + "Last-Modified": "Tue, 30 Nov 2021 19:31:23 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "e8f7cf98-3e1f-2b1a-0c29-1d546bd120be", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-11-30T19:31:23.9908913Z", + "x-ms-file-creation-time": "2021-11-30T19:31:23.9908913Z", + "x-ms-file-id": "13835128424026341376", + "x-ms-file-last-write-time": "2021-11-30T19:31:23.9908913Z", + "x-ms-file-parent-id": "0", + "x-ms-file-permission-key": "10156757773834485186*23892369358363523", + "x-ms-request-id": "fe9f84ab-b01a-0009-4f20-e63c4a000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-fc6e9a64-ae4f-59c6-37f7-0619a06706b1/test-directory-0830fb83-4863-67f2-4001-a17bb4426b34?restype=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-8f72f1f75dfb2243b2f189fc3bc26dbc-019c91fc390d634c-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" + ], + "x-ms-client-request-id": "7e48a3c8-2e5c-508c-dd90-a81e9c9f76c9", + "x-ms-date": "Tue, 30 Nov 2021 19:31:22 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Tue, 30 Nov 2021 19:31:23 GMT", + "ETag": "\u00220x8D9B437FECE2276\u0022", + "Last-Modified": "Tue, 30 Nov 2021 19:31:24 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "7e48a3c8-2e5c-508c-dd90-a81e9c9f76c9", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-11-30T19:31:24.0758902Z", + "x-ms-file-creation-time": "2021-11-30T19:31:24.0758902Z", + "x-ms-file-id": "11529285414812647424", + "x-ms-file-last-write-time": "2021-11-30T19:31:24.0758902Z", + "x-ms-file-parent-id": "0", + "x-ms-file-permission-key": "10156757773834485186*23892369358363523", + "x-ms-request-id": "fe9f84ad-b01a-0009-5020-e63c4a000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-fc6e9a64-ae4f-59c6-37f7-0619a06706b1/test-directory-0830fb83-4863-67f2-4001-a17bb4426b34/test-file-8be3e9bd-5b81-f176-1254-9bb7cfc25ce0", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-c2a156b66263aa4eb27b6339f3cb5beb-f76360ffe098e740-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" + ], + "x-ms-client-request-id": "2171af35-167c-6daa-2c57-6b0893d5811a", + "x-ms-content-length": "1024", + "x-ms-date": "Tue, 30 Nov 2021 19:31:22 GMT", + "x-ms-file-attributes": "ReadOnly", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-type": "file", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Tue, 30 Nov 2021 19:31:23 GMT", + "ETag": "\u00220x8D9B437FEE0E741\u0022", + "Last-Modified": "Tue, 30 Nov 2021 19:31:24 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "2171af35-167c-6daa-2c57-6b0893d5811a", + "x-ms-file-attributes": "ReadOnly | Archive", + "x-ms-file-change-time": "2021-11-30T19:31:24.1988929Z", + "x-ms-file-creation-time": "2021-11-30T19:31:24.1988929Z", + "x-ms-file-id": "16140971433240035328", + "x-ms-file-last-write-time": "2021-11-30T19:31:24.1988929Z", + "x-ms-file-parent-id": "11529285414812647424", + "x-ms-file-permission-key": "16312887433045634277*23892369358363523", + "x-ms-request-id": "fe9f84ae-b01a-0009-5120-e63c4a000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-fc6e9a64-ae4f-59c6-37f7-0619a06706b1/test-directory-0830fb83-4863-67f2-4001-a17bb4426b34/test-file-8be3e9bd-5b81-f176-1254-9bb7cfc25ce0?restype=directory\u0026comp=rename", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-53ef934413935042af5112fddb4f56ae-623f4d2fefdfa246-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" + ], + "x-ms-client-request-id": "1f82ce15-3b50-4a64-ca46-e4a382ceaf7e", + "x-ms-date": "Tue, 30 Nov 2021 19:31:22 GMT", + "x-ms-file-attributes": "Directory", + "x-ms-file-rename-ignore-readonly": "true", + "x-ms-file-rename-replace-if-exists": "true", + "x-ms-file-rename-source": "https%3A%2F%2Ffp8xscnapby3pev24a.file.preprod.core.windows.net%2Ftest-share-fc6e9a64-ae4f-59c6-37f7-0619a06706b1%2Ftest-directory-9e0ff58f-1664-e50f-c1a8-d0e8943f7b08=", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Date": "Tue, 30 Nov 2021 19:31:23 GMT", + "ETag": "\u00220x8D9B437FEF0ED00\u0022", + "Last-Modified": "Tue, 30 Nov 2021 19:31:24 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "1f82ce15-3b50-4a64-ca46-e4a382ceaf7e", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-11-30T19:31:24.3038976Z", + "x-ms-file-creation-time": "2021-11-30T19:31:23.9908913Z", + "x-ms-file-id": "13835128424026341376", + "x-ms-file-last-write-time": "2021-11-30T19:31:23.9908913Z", + "x-ms-file-parent-id": "11529285414812647424", + "x-ms-file-permission-key": "10156757773834485186*23892369358363523", + "x-ms-request-id": "fe9f84af-b01a-0009-5220-e63c4a000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-fc6e9a64-ae4f-59c6-37f7-0619a06706b1/test-directory-0830fb83-4863-67f2-4001-a17bb4426b34/test-file-8be3e9bd-5b81-f176-1254-9bb7cfc25ce0?restype=directory", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" + ], + "x-ms-client-request-id": "c5f32350-6153-f7c9-6373-5ca5812c4d42", + "x-ms-date": "Tue, 30 Nov 2021 19:31:22 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Date": "Tue, 30 Nov 2021 19:31:24 GMT", + "ETag": "\u00220x8D9B437FEF0ED00\u0022", + "Last-Modified": "Tue, 30 Nov 2021 19:31:24 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "c5f32350-6153-f7c9-6373-5ca5812c4d42", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-11-30T19:31:24.3038976Z", + "x-ms-file-creation-time": "2021-11-30T19:31:23.9908913Z", + "x-ms-file-id": "13835128424026341376", + "x-ms-file-last-write-time": "2021-11-30T19:31:23.9908913Z", + "x-ms-file-parent-id": "11529285414812647424", + "x-ms-file-permission-key": "10156757773834485186*23892369358363523", + "x-ms-request-id": "fe9f84b0-b01a-0009-5320-e63c4a000000", + "x-ms-server-encrypted": "true", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-fc6e9a64-ae4f-59c6-37f7-0619a06706b1?restype=share", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-263ec587b6ca5c4ca1ed93d9365f8145-257561a38e42fd4d-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" + ], + "x-ms-client-request-id": "5e52764d-e9db-1c2a-028b-bf98bb3b4db4", + "x-ms-date": "Tue, 30 Nov 2021 19:31:22 GMT", + "x-ms-delete-snapshots": "include", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "Date": "Tue, 30 Nov 2021 19:31:24 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "5e52764d-e9db-1c2a-028b-bf98bb3b4db4", + "x-ms-request-id": "fe9f84b1-b01a-0009-5420-e63c4a000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + } + ], + "Variables": { + "RandomSeed": "1528814244", + "Storage_TestConfigDefault": "ProductionTenant\nfp8xscnapby3pev24a\nU2FuaXRpemVk\nhttps://fp8xscnapby3pev24a.blob.preprod.core.windows.net\nhttps://fp8xscnapby3pev24a.file.preprod.core.windows.net\nhttps://fp8xscnapby3pev24a.queue.core.windows.net\nhttps://fp8xscnapby3pev24a.table.core.windows.net\n\n\n\n\nhttps://fp8xscnapby3pev24a-secondary.blob.core.windows.net\nhttps://fp8xscnapby3pev24a-secondary.file.core.windows.net\nhttps://fp8xscnapby3pev24a-secondary.queue.core.windows.net\nhttps://fp8xscnapby3pev24a-secondary.table.core.windows.net\n\nSanitized\n\n\nCloud\nBlobEndpoint=https://fp8xscnapby3pev24a.blob.preprod.core.windows.net/;QueueEndpoint=https://fp8xscnapby3pev24a.queue.core.windows.net/;FileEndpoint=https://fp8xscnapby3pev24a.file.preprod.core.windows.net/;BlobSecondaryEndpoint=https://fp8xscnapby3pev24a-secondary.blob.core.windows.net/;QueueSecondaryEndpoint=https://fp8xscnapby3pev24a-secondary.queue.core.windows.net/;FileSecondaryEndpoint=https://fp8xscnapby3pev24a-secondary.file.core.windows.net/;AccountName=fp8xscnapby3pev24a;AccountKey=Kg==;\nseanscope1\n\n" + } +} \ No newline at end of file diff --git a/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_IgnoreReadOnly(True)Async.json b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_IgnoreReadOnly(True)Async.json new file mode 100644 index 000000000000..675f01fcb6a8 --- /dev/null +++ b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/DirectoryClientTests/RenameAsync_IgnoreReadOnly(True)Async.json @@ -0,0 +1,267 @@ +{ + "Entries": [ + { + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-47dccb4b-48b0-f654-2947-c46fdfce6745?restype=share", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-e0a81aee1e781549ba17107d67b99e60-25679ec6ae337d47-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" + ], + "x-ms-client-request-id": "219ac1fc-abd5-967c-479f-797f13401e0d", + "x-ms-date": "Tue, 30 Nov 2021 19:31:23 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Tue, 30 Nov 2021 19:31:24 GMT", + "ETag": "\u00220x8D9B437FF71DD46\u0022", + "Last-Modified": "Tue, 30 Nov 2021 19:31:25 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "219ac1fc-abd5-967c-479f-797f13401e0d", + "x-ms-request-id": "fe9f84b9-b01a-0009-5b20-e63c4a000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-47dccb4b-48b0-f654-2947-c46fdfce6745/test-directory-a0c84a8a-923d-c5a2-6783-d22d5fd7e924?restype=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-5126b2a3dcd9cb43ba5711649be0ade3-86e185b31e8c6645-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" + ], + "x-ms-client-request-id": "c2f1dc64-b83c-6ac2-1ed5-ba51d94e3670", + "x-ms-date": "Tue, 30 Nov 2021 19:31:23 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Tue, 30 Nov 2021 19:31:24 GMT", + "ETag": "\u00220x8D9B437FF81E2F8\u0022", + "Last-Modified": "Tue, 30 Nov 2021 19:31:25 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "c2f1dc64-b83c-6ac2-1ed5-ba51d94e3670", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-11-30T19:31:25.2539128Z", + "x-ms-file-creation-time": "2021-11-30T19:31:25.2539128Z", + "x-ms-file-id": "13835128424026341376", + "x-ms-file-last-write-time": "2021-11-30T19:31:25.2539128Z", + "x-ms-file-parent-id": "0", + "x-ms-file-permission-key": "10156757773834485186*23892369358363523", + "x-ms-request-id": "fe9f84bb-b01a-0009-5c20-e63c4a000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-47dccb4b-48b0-f654-2947-c46fdfce6745/test-directory-4e9055b5-00cd-45d9-da21-ea669ab8b981?restype=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-2d870d6b8937e24faf01f0f9976f20be-28277cbe74b8ed43-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" + ], + "x-ms-client-request-id": "b633879f-f655-6467-02ac-e71acd5bd066", + "x-ms-date": "Tue, 30 Nov 2021 19:31:23 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Tue, 30 Nov 2021 19:31:24 GMT", + "ETag": "\u00220x8D9B437FF8E8D2D\u0022", + "Last-Modified": "Tue, 30 Nov 2021 19:31:25 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "b633879f-f655-6467-02ac-e71acd5bd066", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-11-30T19:31:25.3369133Z", + "x-ms-file-creation-time": "2021-11-30T19:31:25.3369133Z", + "x-ms-file-id": "11529285414812647424", + "x-ms-file-last-write-time": "2021-11-30T19:31:25.3369133Z", + "x-ms-file-parent-id": "0", + "x-ms-file-permission-key": "10156757773834485186*23892369358363523", + "x-ms-request-id": "fe9f84bc-b01a-0009-5d20-e63c4a000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-47dccb4b-48b0-f654-2947-c46fdfce6745/test-directory-4e9055b5-00cd-45d9-da21-ea669ab8b981/test-file-3b12381c-b485-8e89-6d59-4ac5007bb9bc", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-11b00c4299212848b352dcd85f5659ff-2cfc5ce740b9174e-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" + ], + "x-ms-client-request-id": "52429937-920c-ebe2-fea5-48fbaba16387", + "x-ms-content-length": "1024", + "x-ms-date": "Tue, 30 Nov 2021 19:31:23 GMT", + "x-ms-file-attributes": "ReadOnly", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-type": "file", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Tue, 30 Nov 2021 19:31:25 GMT", + "ETag": "\u00220x8D9B437FF9CBE22\u0022", + "Last-Modified": "Tue, 30 Nov 2021 19:31:25 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "52429937-920c-ebe2-fea5-48fbaba16387", + "x-ms-file-attributes": "ReadOnly | Archive", + "x-ms-file-change-time": "2021-11-30T19:31:25.4299170Z", + "x-ms-file-creation-time": "2021-11-30T19:31:25.4299170Z", + "x-ms-file-id": "16140971433240035328", + "x-ms-file-last-write-time": "2021-11-30T19:31:25.4299170Z", + "x-ms-file-parent-id": "11529285414812647424", + "x-ms-file-permission-key": "16312887433045634277*23892369358363523", + "x-ms-request-id": "fe9f84bd-b01a-0009-5e20-e63c4a000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-47dccb4b-48b0-f654-2947-c46fdfce6745/test-directory-4e9055b5-00cd-45d9-da21-ea669ab8b981/test-file-3b12381c-b485-8e89-6d59-4ac5007bb9bc?restype=directory\u0026comp=rename", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-44feee05090cab44b31f23fcd2239dc5-6fb7effdc277dc49-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" + ], + "x-ms-client-request-id": "668da2f0-6738-c2b0-9fdb-14dfba309c94", + "x-ms-date": "Tue, 30 Nov 2021 19:31:23 GMT", + "x-ms-file-attributes": "Directory", + "x-ms-file-rename-ignore-readonly": "true", + "x-ms-file-rename-replace-if-exists": "true", + "x-ms-file-rename-source": "https%3A%2F%2Ffp8xscnapby3pev24a.file.preprod.core.windows.net%2Ftest-share-47dccb4b-48b0-f654-2947-c46fdfce6745%2Ftest-directory-a0c84a8a-923d-c5a2-6783-d22d5fd7e924=", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Date": "Tue, 30 Nov 2021 19:31:25 GMT", + "ETag": "\u00220x8D9B437FFAB8B2B\u0022", + "Last-Modified": "Tue, 30 Nov 2021 19:31:25 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "668da2f0-6738-c2b0-9fdb-14dfba309c94", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-11-30T19:31:25.5269163Z", + "x-ms-file-creation-time": "2021-11-30T19:31:25.2539128Z", + "x-ms-file-id": "13835128424026341376", + "x-ms-file-last-write-time": "2021-11-30T19:31:25.2539128Z", + "x-ms-file-parent-id": "11529285414812647424", + "x-ms-file-permission-key": "10156757773834485186*23892369358363523", + "x-ms-request-id": "fe9f84be-b01a-0009-5f20-e63c4a000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-47dccb4b-48b0-f654-2947-c46fdfce6745/test-directory-4e9055b5-00cd-45d9-da21-ea669ab8b981/test-file-3b12381c-b485-8e89-6d59-4ac5007bb9bc?restype=directory", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" + ], + "x-ms-client-request-id": "090ba857-fd14-8b4f-7a04-acb8a9015fdc", + "x-ms-date": "Tue, 30 Nov 2021 19:31:23 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Date": "Tue, 30 Nov 2021 19:31:25 GMT", + "ETag": "\u00220x8D9B437FFAB8B2B\u0022", + "Last-Modified": "Tue, 30 Nov 2021 19:31:25 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "090ba857-fd14-8b4f-7a04-acb8a9015fdc", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-11-30T19:31:25.5269163Z", + "x-ms-file-creation-time": "2021-11-30T19:31:25.2539128Z", + "x-ms-file-id": "13835128424026341376", + "x-ms-file-last-write-time": "2021-11-30T19:31:25.2539128Z", + "x-ms-file-parent-id": "11529285414812647424", + "x-ms-file-permission-key": "10156757773834485186*23892369358363523", + "x-ms-request-id": "fe9f84bf-b01a-0009-6020-e63c4a000000", + "x-ms-server-encrypted": "true", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-47dccb4b-48b0-f654-2947-c46fdfce6745?restype=share", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-48fa651e87390147bf738fedd35fc5a0-cc3b0c838db85c42-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" + ], + "x-ms-client-request-id": "11876624-9325-0480-a8bb-9b02715bd0b6", + "x-ms-date": "Tue, 30 Nov 2021 19:31:23 GMT", + "x-ms-delete-snapshots": "include", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "Date": "Tue, 30 Nov 2021 19:31:25 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "11876624-9325-0480-a8bb-9b02715bd0b6", + "x-ms-request-id": "fe9f84c0-b01a-0009-6120-e63c4a000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + } + ], + "Variables": { + "RandomSeed": "745409231", + "Storage_TestConfigDefault": "ProductionTenant\nfp8xscnapby3pev24a\nU2FuaXRpemVk\nhttps://fp8xscnapby3pev24a.blob.preprod.core.windows.net\nhttps://fp8xscnapby3pev24a.file.preprod.core.windows.net\nhttps://fp8xscnapby3pev24a.queue.core.windows.net\nhttps://fp8xscnapby3pev24a.table.core.windows.net\n\n\n\n\nhttps://fp8xscnapby3pev24a-secondary.blob.core.windows.net\nhttps://fp8xscnapby3pev24a-secondary.file.core.windows.net\nhttps://fp8xscnapby3pev24a-secondary.queue.core.windows.net\nhttps://fp8xscnapby3pev24a-secondary.table.core.windows.net\n\nSanitized\n\n\nCloud\nBlobEndpoint=https://fp8xscnapby3pev24a.blob.preprod.core.windows.net/;QueueEndpoint=https://fp8xscnapby3pev24a.queue.core.windows.net/;FileEndpoint=https://fp8xscnapby3pev24a.file.preprod.core.windows.net/;BlobSecondaryEndpoint=https://fp8xscnapby3pev24a-secondary.blob.core.windows.net/;QueueSecondaryEndpoint=https://fp8xscnapby3pev24a-secondary.queue.core.windows.net/;FileSecondaryEndpoint=https://fp8xscnapby3pev24a-secondary.file.core.windows.net/;AccountName=fp8xscnapby3pev24a;AccountKey=Kg==;\nseanscope1\n\n" + } +} \ No newline at end of file diff --git a/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_IgnoreReadOnly(False).json b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_IgnoreReadOnly(False).json index f0831d4428f0..816f8a844702 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_IgnoreReadOnly(False).json +++ b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_IgnoreReadOnly(False).json @@ -1,47 +1,47 @@ { "Entries": [ { - "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-fdeabb69-ce00-ecb4-8b90-24a776c2dfc5?restype=share", + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-fdeabb69-ce00-ecb4-8b90-24a776c2dfc5?restype=share", "RequestMethod": "PUT", "RequestHeaders": { "Accept": "application/xml", "Authorization": "Sanitized", - "traceparent": "00-b4e4d113403f1240bf48312f016930bc-79421f9687a5334d-00", + "traceparent": "00-031bdfe3605fd94182ce37c7f40222c9-b2f3377e23e08b4b-00", "User-Agent": [ - "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", - "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" ], "x-ms-client-request-id": "6091754b-fc48-f514-a22e-24e65f7bdd25", - "x-ms-date": "Fri, 29 Oct 2021 19:29:34 GMT", + "x-ms-date": "Tue, 30 Nov 2021 19:31:24 GMT", "x-ms-return-client-request-id": "true", "x-ms-version": "2021-04-10" }, "RequestBody": null, "StatusCode": 201, "ResponseHeaders": { - "Date": "Fri, 29 Oct 2021 19:29:35 GMT", - "ETag": "\u00220x8D99B1270DDD827\u0022", - "Last-Modified": "Fri, 29 Oct 2021 19:29:35 GMT", + "Date": "Tue, 30 Nov 2021 19:31:26 GMT", + "ETag": "\u00220x8D9B438008327B6\u0022", + "Last-Modified": "Tue, 30 Nov 2021 19:31:26 GMT", "Transfer-Encoding": "chunked", "x-ms-client-request-id": "6091754b-fc48-f514-a22e-24e65f7bdd25", - "x-ms-request-id": "e116b22b-c01a-0001-2afb-cc0599000000", + "x-ms-request-id": "fe9f84d0-b01a-0009-6f20-e63c4a000000", "x-ms-version": "2021-04-10" }, "ResponseBody": [] }, { - "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-fdeabb69-ce00-ecb4-8b90-24a776c2dfc5/test-directory-249fbc08-c42f-5b5a-c7c4-e9b2c4753953?restype=directory", + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-fdeabb69-ce00-ecb4-8b90-24a776c2dfc5/test-directory-249fbc08-c42f-5b5a-c7c4-e9b2c4753953?restype=directory", "RequestMethod": "PUT", "RequestHeaders": { "Accept": "application/xml", "Authorization": "Sanitized", - "traceparent": "00-a1394256a83b654db436f47e554ffd18-f271a11129892344-00", + "traceparent": "00-757715aec88cc0479d84d76b4819e970-9b8b567c479a4e45-00", "User-Agent": [ - "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", - "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" ], "x-ms-client-request-id": "f736e471-8297-86e0-1b35-99831362302c", - "x-ms-date": "Fri, 29 Oct 2021 19:29:34 GMT", + "x-ms-date": "Tue, 30 Nov 2021 19:31:25 GMT", "x-ms-file-attributes": "None", "x-ms-file-creation-time": "Now", "x-ms-file-last-write-time": "Now", @@ -52,38 +52,38 @@ "RequestBody": null, "StatusCode": 201, "ResponseHeaders": { - "Date": "Fri, 29 Oct 2021 19:29:35 GMT", - "ETag": "\u00220x8D99B1270EE7A47\u0022", - "Last-Modified": "Fri, 29 Oct 2021 19:29:35 GMT", + "Date": "Tue, 30 Nov 2021 19:31:26 GMT", + "ETag": "\u00220x8D9B43800926A0F\u0022", + "Last-Modified": "Tue, 30 Nov 2021 19:31:27 GMT", "Transfer-Encoding": "chunked", "x-ms-client-request-id": "f736e471-8297-86e0-1b35-99831362302c", "x-ms-file-attributes": "Directory", - "x-ms-file-change-time": "2021-10-29T19:29:35.6029511Z", - "x-ms-file-creation-time": "2021-10-29T19:29:35.6029511Z", + "x-ms-file-change-time": "2021-11-30T19:31:27.0399503Z", + "x-ms-file-creation-time": "2021-11-30T19:31:27.0399503Z", "x-ms-file-id": "13835128424026341376", - "x-ms-file-last-write-time": "2021-10-29T19:29:35.6029511Z", + "x-ms-file-last-write-time": "2021-11-30T19:31:27.0399503Z", "x-ms-file-parent-id": "0", - "x-ms-file-permission-key": "15110104144358886944*6706197617703823457", - "x-ms-request-id": "e116b22d-c01a-0001-2bfb-cc0599000000", - "x-ms-request-server-encrypted": "false", + "x-ms-file-permission-key": "10156757773834485186*23892369358363523", + "x-ms-request-id": "fe9f84d2-b01a-0009-7020-e63c4a000000", + "x-ms-request-server-encrypted": "true", "x-ms-version": "2021-04-10" }, "ResponseBody": [] }, { - "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-fdeabb69-ce00-ecb4-8b90-24a776c2dfc5/test-directory-249fbc08-c42f-5b5a-c7c4-e9b2c4753953/test-file-4bfcd1f5-db1e-89f4-3fe8-6414b1d973b9", + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-fdeabb69-ce00-ecb4-8b90-24a776c2dfc5/test-directory-249fbc08-c42f-5b5a-c7c4-e9b2c4753953/test-file-4bfcd1f5-db1e-89f4-3fe8-6414b1d973b9", "RequestMethod": "PUT", "RequestHeaders": { "Accept": "application/xml", "Authorization": "Sanitized", - "traceparent": "00-18cb23250b88af48917dd25e8bd0a93e-7751b4924474b343-00", + "traceparent": "00-f5b4251cc12c944c9860dc36670ce969-0c80cd6a5fe8ba40-00", "User-Agent": [ - "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", - "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" ], "x-ms-client-request-id": "168be5ea-7a11-957a-efac-b8af1ecbd541", "x-ms-content-length": "1024", - "x-ms-date": "Fri, 29 Oct 2021 19:29:34 GMT", + "x-ms-date": "Tue, 30 Nov 2021 19:31:25 GMT", "x-ms-file-attributes": "None", "x-ms-file-creation-time": "Now", "x-ms-file-last-write-time": "Now", @@ -95,38 +95,38 @@ "RequestBody": null, "StatusCode": 201, "ResponseHeaders": { - "Date": "Fri, 29 Oct 2021 19:29:35 GMT", - "ETag": "\u00220x8D99B1270FB4B39\u0022", - "Last-Modified": "Fri, 29 Oct 2021 19:29:35 GMT", + "Date": "Tue, 30 Nov 2021 19:31:26 GMT", + "ETag": "\u00220x8D9B43800A04CBF\u0022", + "Last-Modified": "Tue, 30 Nov 2021 19:31:27 GMT", "Transfer-Encoding": "chunked", "x-ms-client-request-id": "168be5ea-7a11-957a-efac-b8af1ecbd541", "x-ms-file-attributes": "Archive", - "x-ms-file-change-time": "2021-10-29T19:29:35.6869433Z", - "x-ms-file-creation-time": "2021-10-29T19:29:35.6869433Z", + "x-ms-file-change-time": "2021-11-30T19:31:27.1309503Z", + "x-ms-file-creation-time": "2021-11-30T19:31:27.1309503Z", "x-ms-file-id": "11529285414812647424", - "x-ms-file-last-write-time": "2021-10-29T19:29:35.6869433Z", + "x-ms-file-last-write-time": "2021-11-30T19:31:27.1309503Z", "x-ms-file-parent-id": "13835128424026341376", - "x-ms-file-permission-key": "13773932323712163591*6706197617703823457", - "x-ms-request-id": "e116b22e-c01a-0001-2cfb-cc0599000000", - "x-ms-request-server-encrypted": "false", + "x-ms-file-permission-key": "16312887433045634277*23892369358363523", + "x-ms-request-id": "fe9f84d3-b01a-0009-7120-e63c4a000000", + "x-ms-request-server-encrypted": "true", "x-ms-version": "2021-04-10" }, "ResponseBody": [] }, { - "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-fdeabb69-ce00-ecb4-8b90-24a776c2dfc5/test-directory-249fbc08-c42f-5b5a-c7c4-e9b2c4753953/test-file-c384e0c2-5021-b3ed-1595-1748f5f9a445", + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-fdeabb69-ce00-ecb4-8b90-24a776c2dfc5/test-directory-249fbc08-c42f-5b5a-c7c4-e9b2c4753953/test-file-c384e0c2-5021-b3ed-1595-1748f5f9a445", "RequestMethod": "PUT", "RequestHeaders": { "Accept": "application/xml", "Authorization": "Sanitized", - "traceparent": "00-d1ed5e876e18954c9577b2f8b15f159c-b32b96fddbe2174c-00", + "traceparent": "00-4d4a90934275c842ad1f3d50e9e26b87-aad28693338d074b-00", "User-Agent": [ - "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", - "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" ], "x-ms-client-request-id": "0538a400-e076-9a3c-f7d7-017c63329ff6", "x-ms-content-length": "1024", - "x-ms-date": "Fri, 29 Oct 2021 19:29:34 GMT", + "x-ms-date": "Tue, 30 Nov 2021 19:31:25 GMT", "x-ms-file-attributes": "ReadOnly", "x-ms-file-creation-time": "Now", "x-ms-file-last-write-time": "Now", @@ -138,40 +138,40 @@ "RequestBody": null, "StatusCode": 201, "ResponseHeaders": { - "Date": "Fri, 29 Oct 2021 19:29:35 GMT", - "ETag": "\u00220x8D99B127105F99D\u0022", - "Last-Modified": "Fri, 29 Oct 2021 19:29:35 GMT", + "Date": "Tue, 30 Nov 2021 19:31:26 GMT", + "ETag": "\u00220x8D9B43800ACF706\u0022", + "Last-Modified": "Tue, 30 Nov 2021 19:31:27 GMT", "Transfer-Encoding": "chunked", "x-ms-client-request-id": "0538a400-e076-9a3c-f7d7-017c63329ff6", "x-ms-file-attributes": "ReadOnly | Archive", - "x-ms-file-change-time": "2021-10-29T19:29:35.7569437Z", - "x-ms-file-creation-time": "2021-10-29T19:29:35.7569437Z", + "x-ms-file-change-time": "2021-11-30T19:31:27.2139526Z", + "x-ms-file-creation-time": "2021-11-30T19:31:27.2139526Z", "x-ms-file-id": "16140971433240035328", - "x-ms-file-last-write-time": "2021-10-29T19:29:35.7569437Z", + "x-ms-file-last-write-time": "2021-11-30T19:31:27.2139526Z", "x-ms-file-parent-id": "13835128424026341376", - "x-ms-file-permission-key": "13773932323712163591*6706197617703823457", - "x-ms-request-id": "e116b22f-c01a-0001-2dfb-cc0599000000", - "x-ms-request-server-encrypted": "false", + "x-ms-file-permission-key": "16312887433045634277*23892369358363523", + "x-ms-request-id": "fe9f84d4-b01a-0009-7220-e63c4a000000", + "x-ms-request-server-encrypted": "true", "x-ms-version": "2021-04-10" }, "ResponseBody": [] }, { - "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-fdeabb69-ce00-ecb4-8b90-24a776c2dfc5/test-directory-249fbc08-c42f-5b5a-c7c4-e9b2c4753953/test-file-c384e0c2-5021-b3ed-1595-1748f5f9a445?comp=rename", + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-fdeabb69-ce00-ecb4-8b90-24a776c2dfc5/test-directory-249fbc08-c42f-5b5a-c7c4-e9b2c4753953/test-file-c384e0c2-5021-b3ed-1595-1748f5f9a445?comp=rename", "RequestMethod": "PUT", "RequestHeaders": { "Accept": "application/xml", "Authorization": "Sanitized", - "traceparent": "00-fcc7c833c83b224b9b18afafd8194ee9-bf17b5191b60fe41-00", + "traceparent": "00-d40fc9b5ffd3144e9c009f719f88052d-31bade98a05d6649-00", "User-Agent": [ - "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", - "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" ], "x-ms-client-request-id": "5047af4c-9fc0-63cf-ca90-d4765b2b21a2", - "x-ms-date": "Fri, 29 Oct 2021 19:29:35 GMT", - "x-ms-file-rename-ignore-read-only": "false", + "x-ms-date": "Tue, 30 Nov 2021 19:31:25 GMT", + "x-ms-file-rename-ignore-readonly": "false", "x-ms-file-rename-replace-if-exists": "true", - "x-ms-file-rename-source": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-fdeabb69-ce00-ecb4-8b90-24a776c2dfc5/test-directory-249fbc08-c42f-5b5a-c7c4-e9b2c4753953/test-file-4bfcd1f5-db1e-89f4-3fe8-6414b1d973b9", + "x-ms-file-rename-source": "https%3A%2F%2Ffp8xscnapby3pev24a.file.preprod.core.windows.net%2Ftest-share-fdeabb69-ce00-ecb4-8b90-24a776c2dfc5%2Ftest-directory-249fbc08-c42f-5b5a-c7c4-e9b2c4753953%2Ftest-file-4bfcd1f5-db1e-89f4-3fe8-6414b1d973b9=", "x-ms-return-client-request-id": "true", "x-ms-version": "2021-04-10" }, @@ -180,31 +180,31 @@ "ResponseHeaders": { "Content-Length": "258", "Content-Type": "application/xml", - "Date": "Fri, 29 Oct 2021 19:29:35 GMT", + "Date": "Tue, 30 Nov 2021 19:31:26 GMT", "x-ms-client-request-id": "5047af4c-9fc0-63cf-ca90-d4765b2b21a2", "x-ms-error-code": "ReadOnlyAttribute", - "x-ms-request-id": "e116b230-c01a-0001-2efb-cc0599000000", + "x-ms-request-id": "fe9f84d5-b01a-0009-7320-e63c4a000000", "x-ms-version": "2021-04-10" }, "ResponseBody": [ "\uFEFF\u003C?xml version=\u00221.0\u0022 encoding=\u0022utf-8\u0022?\u003E\u003CError\u003E\u003CCode\u003EReadOnlyAttribute\u003C/Code\u003E\u003CMessage\u003EThe specified resource is read-only and cannot be modified at this time.\n", - "RequestId:e116b230-c01a-0001-2efb-cc0599000000\n", - "Time:2021-10-29T19:29:35.8339426Z\u003C/Message\u003E\u003C/Error\u003E" + "RequestId:fe9f84d5-b01a-0009-7320-e63c4a000000\n", + "Time:2021-11-30T19:31:27.2959502Z\u003C/Message\u003E\u003C/Error\u003E" ] }, { - "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-fdeabb69-ce00-ecb4-8b90-24a776c2dfc5?restype=share", + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-fdeabb69-ce00-ecb4-8b90-24a776c2dfc5?restype=share", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/xml", "Authorization": "Sanitized", - "traceparent": "00-079abc54fc8f8a42804fee034e28826a-7f671284ad792740-00", + "traceparent": "00-513af1a112a6214b89f5dc325408099e-b464e4b1b5b5f441-00", "User-Agent": [ - "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", - "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" ], "x-ms-client-request-id": "b32ff7ac-4eea-6835-a407-4d10337c090c", - "x-ms-date": "Fri, 29 Oct 2021 19:29:35 GMT", + "x-ms-date": "Tue, 30 Nov 2021 19:31:25 GMT", "x-ms-delete-snapshots": "include", "x-ms-return-client-request-id": "true", "x-ms-version": "2021-04-10" @@ -212,10 +212,10 @@ "RequestBody": null, "StatusCode": 202, "ResponseHeaders": { - "Date": "Fri, 29 Oct 2021 19:29:35 GMT", + "Date": "Tue, 30 Nov 2021 19:31:26 GMT", "Transfer-Encoding": "chunked", "x-ms-client-request-id": "b32ff7ac-4eea-6835-a407-4d10337c090c", - "x-ms-request-id": "e116b231-c01a-0001-2ffb-cc0599000000", + "x-ms-request-id": "fe9f84d6-b01a-0009-7420-e63c4a000000", "x-ms-version": "2021-04-10" }, "ResponseBody": [] @@ -223,6 +223,6 @@ ], "Variables": { "RandomSeed": "1617454569", - "Storage_TestConfigDefault": "ProductionTenant\n712xscnapby3pev55a\nU2FuaXRpemVk\nhttps://712xscnapby3pev55a.blob.preprod.core.windows.net\nhttps://712xscnapby3pev55a.file.preprod.core.windows.net\nhttps://712xscnapby3pev55a.queue.core.windows.net\nhttps://712xscnapby3pev55a.table.core.windows.net\n\n\n\n\nhttps://712xscnapby3pev55a-secondary.blob.core.windows.net\nhttps://712xscnapby3pev55a-secondary.file.core.windows.net\nhttps://712xscnapby3pev55a-secondary.queue.core.windows.net\nhttps://712xscnapby3pev55a-secondary.table.core.windows.net\n\nSanitized\n\n\nCloud\nBlobEndpoint=https://712xscnapby3pev55a.blob.preprod.core.windows.net/;QueueEndpoint=https://712xscnapby3pev55a.queue.core.windows.net/;FileEndpoint=https://712xscnapby3pev55a.file.preprod.core.windows.net/;BlobSecondaryEndpoint=https://712xscnapby3pev55a-secondary.blob.core.windows.net/;QueueSecondaryEndpoint=https://712xscnapby3pev55a-secondary.queue.core.windows.net/;FileSecondaryEndpoint=https://712xscnapby3pev55a-secondary.file.core.windows.net/;AccountName=712xscnapby3pev55a;AccountKey=Kg==;\nscope-1\n\n" + "Storage_TestConfigDefault": "ProductionTenant\nfp8xscnapby3pev24a\nU2FuaXRpemVk\nhttps://fp8xscnapby3pev24a.blob.preprod.core.windows.net\nhttps://fp8xscnapby3pev24a.file.preprod.core.windows.net\nhttps://fp8xscnapby3pev24a.queue.core.windows.net\nhttps://fp8xscnapby3pev24a.table.core.windows.net\n\n\n\n\nhttps://fp8xscnapby3pev24a-secondary.blob.core.windows.net\nhttps://fp8xscnapby3pev24a-secondary.file.core.windows.net\nhttps://fp8xscnapby3pev24a-secondary.queue.core.windows.net\nhttps://fp8xscnapby3pev24a-secondary.table.core.windows.net\n\nSanitized\n\n\nCloud\nBlobEndpoint=https://fp8xscnapby3pev24a.blob.preprod.core.windows.net/;QueueEndpoint=https://fp8xscnapby3pev24a.queue.core.windows.net/;FileEndpoint=https://fp8xscnapby3pev24a.file.preprod.core.windows.net/;BlobSecondaryEndpoint=https://fp8xscnapby3pev24a-secondary.blob.core.windows.net/;QueueSecondaryEndpoint=https://fp8xscnapby3pev24a-secondary.queue.core.windows.net/;FileSecondaryEndpoint=https://fp8xscnapby3pev24a-secondary.file.core.windows.net/;AccountName=fp8xscnapby3pev24a;AccountKey=Kg==;\nseanscope1\n\n" } } \ No newline at end of file diff --git a/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_IgnoreReadOnly(False)Async.json b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_IgnoreReadOnly(False)Async.json index 2e8134deb641..32a7d5d3ce47 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_IgnoreReadOnly(False)Async.json +++ b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_IgnoreReadOnly(False)Async.json @@ -1,47 +1,47 @@ { "Entries": [ { - "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-7c5e7eb6-4a32-be61-6023-1176446e6185?restype=share", + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-7c5e7eb6-4a32-be61-6023-1176446e6185?restype=share", "RequestMethod": "PUT", "RequestHeaders": { "Accept": "application/xml", "Authorization": "Sanitized", - "traceparent": "00-bfd48ec86c64324083e62fd496e81b59-4b8fe885a091374c-00", + "traceparent": "00-53eaf0e238cdb8459ee31d3e11fdd54a-aa6503163c1cc448-00", "User-Agent": [ - "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", - "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" ], "x-ms-client-request-id": "fede1db7-720f-b286-2ab8-fcea0304fe63", - "x-ms-date": "Fri, 29 Oct 2021 19:29:40 GMT", + "x-ms-date": "Tue, 30 Nov 2021 19:31:26 GMT", "x-ms-return-client-request-id": "true", "x-ms-version": "2021-04-10" }, "RequestBody": null, "StatusCode": 201, "ResponseHeaders": { - "Date": "Fri, 29 Oct 2021 19:29:41 GMT", - "ETag": "\u00220x8D99B12748F6EFD\u0022", - "Last-Modified": "Fri, 29 Oct 2021 19:29:41 GMT", + "Date": "Tue, 30 Nov 2021 19:31:27 GMT", + "ETag": "\u00220x8D9B438013847AC\u0022", + "Last-Modified": "Tue, 30 Nov 2021 19:31:28 GMT", "Transfer-Encoding": "chunked", "x-ms-client-request-id": "fede1db7-720f-b286-2ab8-fcea0304fe63", - "x-ms-request-id": "e116b28c-c01a-0001-7afb-cc0599000000", + "x-ms-request-id": "fe9f84df-b01a-0009-7c20-e63c4a000000", "x-ms-version": "2021-04-10" }, "ResponseBody": [] }, { - "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-7c5e7eb6-4a32-be61-6023-1176446e6185/test-directory-9d7ba656-ee11-5194-d966-b43d592b164e?restype=directory", + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-7c5e7eb6-4a32-be61-6023-1176446e6185/test-directory-9d7ba656-ee11-5194-d966-b43d592b164e?restype=directory", "RequestMethod": "PUT", "RequestHeaders": { "Accept": "application/xml", "Authorization": "Sanitized", - "traceparent": "00-5900c0212790814b8d0874eb05b330b0-6013541b1f091949-00", + "traceparent": "00-af1c27e87f5a004ab8d9e74692acb574-e0bacfe85b1af54f-00", "User-Agent": [ - "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", - "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" ], "x-ms-client-request-id": "01e08ef6-7c95-c893-898c-25a8bd4959ff", - "x-ms-date": "Fri, 29 Oct 2021 19:29:40 GMT", + "x-ms-date": "Tue, 30 Nov 2021 19:31:26 GMT", "x-ms-file-attributes": "None", "x-ms-file-creation-time": "Now", "x-ms-file-last-write-time": "Now", @@ -52,38 +52,38 @@ "RequestBody": null, "StatusCode": 201, "ResponseHeaders": { - "Date": "Fri, 29 Oct 2021 19:29:41 GMT", - "ETag": "\u00220x8D99B12749F0184\u0022", - "Last-Modified": "Fri, 29 Oct 2021 19:29:41 GMT", + "Date": "Tue, 30 Nov 2021 19:31:27 GMT", + "ETag": "\u00220x8D9B4380146EDBA\u0022", + "Last-Modified": "Tue, 30 Nov 2021 19:31:28 GMT", "Transfer-Encoding": "chunked", "x-ms-client-request-id": "01e08ef6-7c95-c893-898c-25a8bd4959ff", "x-ms-file-attributes": "Directory", - "x-ms-file-change-time": "2021-10-29T19:29:41.7930116Z", - "x-ms-file-creation-time": "2021-10-29T19:29:41.7930116Z", + "x-ms-file-change-time": "2021-11-30T19:31:28.2229690Z", + "x-ms-file-creation-time": "2021-11-30T19:31:28.2229690Z", "x-ms-file-id": "13835128424026341376", - "x-ms-file-last-write-time": "2021-10-29T19:29:41.7930116Z", + "x-ms-file-last-write-time": "2021-11-30T19:31:28.2229690Z", "x-ms-file-parent-id": "0", - "x-ms-file-permission-key": "15110104144358886944*6706197617703823457", - "x-ms-request-id": "e116b28e-c01a-0001-7bfb-cc0599000000", - "x-ms-request-server-encrypted": "false", + "x-ms-file-permission-key": "10156757773834485186*23892369358363523", + "x-ms-request-id": "fe9f84e1-b01a-0009-7d20-e63c4a000000", + "x-ms-request-server-encrypted": "true", "x-ms-version": "2021-04-10" }, "ResponseBody": [] }, { - "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-7c5e7eb6-4a32-be61-6023-1176446e6185/test-directory-9d7ba656-ee11-5194-d966-b43d592b164e/test-file-97e0ada1-d745-f3d3-307f-f3dd3032e81f", + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-7c5e7eb6-4a32-be61-6023-1176446e6185/test-directory-9d7ba656-ee11-5194-d966-b43d592b164e/test-file-97e0ada1-d745-f3d3-307f-f3dd3032e81f", "RequestMethod": "PUT", "RequestHeaders": { "Accept": "application/xml", "Authorization": "Sanitized", - "traceparent": "00-c4b3c66d60613b44b639665387d62159-a3b5d17297b8f94a-00", + "traceparent": "00-c3aaa2041f145845b44102675d72490a-fd2ab92d47d77641-00", "User-Agent": [ - "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", - "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" ], "x-ms-client-request-id": "bbc0bfda-5dd9-1e7e-bbec-d11688b59857", "x-ms-content-length": "1024", - "x-ms-date": "Fri, 29 Oct 2021 19:29:41 GMT", + "x-ms-date": "Tue, 30 Nov 2021 19:31:26 GMT", "x-ms-file-attributes": "None", "x-ms-file-creation-time": "Now", "x-ms-file-last-write-time": "Now", @@ -95,38 +95,38 @@ "RequestBody": null, "StatusCode": 201, "ResponseHeaders": { - "Date": "Fri, 29 Oct 2021 19:29:41 GMT", - "ETag": "\u00220x8D99B1274AA257A\u0022", - "Last-Modified": "Fri, 29 Oct 2021 19:29:41 GMT", + "Date": "Tue, 30 Nov 2021 19:31:27 GMT", + "ETag": "\u00220x8D9B43801548268\u0022", + "Last-Modified": "Tue, 30 Nov 2021 19:31:28 GMT", "Transfer-Encoding": "chunked", "x-ms-client-request-id": "bbc0bfda-5dd9-1e7e-bbec-d11688b59857", "x-ms-file-attributes": "Archive", - "x-ms-file-change-time": "2021-10-29T19:29:41.8660218Z", - "x-ms-file-creation-time": "2021-10-29T19:29:41.8660218Z", + "x-ms-file-change-time": "2021-11-30T19:31:28.3119720Z", + "x-ms-file-creation-time": "2021-11-30T19:31:28.3119720Z", "x-ms-file-id": "11529285414812647424", - "x-ms-file-last-write-time": "2021-10-29T19:29:41.8660218Z", + "x-ms-file-last-write-time": "2021-11-30T19:31:28.3119720Z", "x-ms-file-parent-id": "13835128424026341376", - "x-ms-file-permission-key": "13773932323712163591*6706197617703823457", - "x-ms-request-id": "e116b28f-c01a-0001-7cfb-cc0599000000", - "x-ms-request-server-encrypted": "false", + "x-ms-file-permission-key": "16312887433045634277*23892369358363523", + "x-ms-request-id": "fe9f84e2-b01a-0009-7e20-e63c4a000000", + "x-ms-request-server-encrypted": "true", "x-ms-version": "2021-04-10" }, "ResponseBody": [] }, { - "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-7c5e7eb6-4a32-be61-6023-1176446e6185/test-directory-9d7ba656-ee11-5194-d966-b43d592b164e/test-file-cb3705a4-8e02-8cb4-f452-c04e3acfb563", + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-7c5e7eb6-4a32-be61-6023-1176446e6185/test-directory-9d7ba656-ee11-5194-d966-b43d592b164e/test-file-cb3705a4-8e02-8cb4-f452-c04e3acfb563", "RequestMethod": "PUT", "RequestHeaders": { "Accept": "application/xml", "Authorization": "Sanitized", - "traceparent": "00-31933af92e7be948822ba09910e4e9d3-a2e89f7246080744-00", + "traceparent": "00-f607e404c509d04ea36205a3503d7aa4-d005c9a8b0b7474e-00", "User-Agent": [ - "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", - "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" ], "x-ms-client-request-id": "385e465d-7395-4b5e-0a34-c6869c2fe4eb", "x-ms-content-length": "1024", - "x-ms-date": "Fri, 29 Oct 2021 19:29:41 GMT", + "x-ms-date": "Tue, 30 Nov 2021 19:31:26 GMT", "x-ms-file-attributes": "ReadOnly", "x-ms-file-creation-time": "Now", "x-ms-file-last-write-time": "Now", @@ -138,40 +138,40 @@ "RequestBody": null, "StatusCode": 201, "ResponseHeaders": { - "Date": "Fri, 29 Oct 2021 19:29:41 GMT", - "ETag": "\u00220x8D99B1274B60CB1\u0022", - "Last-Modified": "Fri, 29 Oct 2021 19:29:41 GMT", + "Date": "Tue, 30 Nov 2021 19:31:27 GMT", + "ETag": "\u00220x8D9B4380161058F\u0022", + "Last-Modified": "Tue, 30 Nov 2021 19:31:28 GMT", "Transfer-Encoding": "chunked", "x-ms-client-request-id": "385e465d-7395-4b5e-0a34-c6869c2fe4eb", "x-ms-file-attributes": "ReadOnly | Archive", - "x-ms-file-change-time": "2021-10-29T19:29:41.9440305Z", - "x-ms-file-creation-time": "2021-10-29T19:29:41.9440305Z", + "x-ms-file-change-time": "2021-11-30T19:31:28.3939727Z", + "x-ms-file-creation-time": "2021-11-30T19:31:28.3939727Z", "x-ms-file-id": "16140971433240035328", - "x-ms-file-last-write-time": "2021-10-29T19:29:41.9440305Z", + "x-ms-file-last-write-time": "2021-11-30T19:31:28.3939727Z", "x-ms-file-parent-id": "13835128424026341376", - "x-ms-file-permission-key": "13773932323712163591*6706197617703823457", - "x-ms-request-id": "e116b290-c01a-0001-7dfb-cc0599000000", - "x-ms-request-server-encrypted": "false", + "x-ms-file-permission-key": "16312887433045634277*23892369358363523", + "x-ms-request-id": "fe9f84e3-b01a-0009-7f20-e63c4a000000", + "x-ms-request-server-encrypted": "true", "x-ms-version": "2021-04-10" }, "ResponseBody": [] }, { - "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-7c5e7eb6-4a32-be61-6023-1176446e6185/test-directory-9d7ba656-ee11-5194-d966-b43d592b164e/test-file-cb3705a4-8e02-8cb4-f452-c04e3acfb563?comp=rename", + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-7c5e7eb6-4a32-be61-6023-1176446e6185/test-directory-9d7ba656-ee11-5194-d966-b43d592b164e/test-file-cb3705a4-8e02-8cb4-f452-c04e3acfb563?comp=rename", "RequestMethod": "PUT", "RequestHeaders": { "Accept": "application/xml", "Authorization": "Sanitized", - "traceparent": "00-0263529564d95940b371152d9ac24a69-5a4103a56c7ef741-00", + "traceparent": "00-5197076269f10047a695658119342f7d-40d92e590f979c4c-00", "User-Agent": [ - "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", - "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" ], "x-ms-client-request-id": "f3f09e4e-7c71-cccd-34b7-663d66be7643", - "x-ms-date": "Fri, 29 Oct 2021 19:29:41 GMT", - "x-ms-file-rename-ignore-read-only": "false", + "x-ms-date": "Tue, 30 Nov 2021 19:31:26 GMT", + "x-ms-file-rename-ignore-readonly": "false", "x-ms-file-rename-replace-if-exists": "true", - "x-ms-file-rename-source": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-7c5e7eb6-4a32-be61-6023-1176446e6185/test-directory-9d7ba656-ee11-5194-d966-b43d592b164e/test-file-97e0ada1-d745-f3d3-307f-f3dd3032e81f", + "x-ms-file-rename-source": "https%3A%2F%2Ffp8xscnapby3pev24a.file.preprod.core.windows.net%2Ftest-share-7c5e7eb6-4a32-be61-6023-1176446e6185%2Ftest-directory-9d7ba656-ee11-5194-d966-b43d592b164e%2Ftest-file-97e0ada1-d745-f3d3-307f-f3dd3032e81f=", "x-ms-return-client-request-id": "true", "x-ms-version": "2021-04-10" }, @@ -180,31 +180,31 @@ "ResponseHeaders": { "Content-Length": "258", "Content-Type": "application/xml", - "Date": "Fri, 29 Oct 2021 19:29:41 GMT", + "Date": "Tue, 30 Nov 2021 19:31:27 GMT", "x-ms-client-request-id": "f3f09e4e-7c71-cccd-34b7-663d66be7643", "x-ms-error-code": "ReadOnlyAttribute", - "x-ms-request-id": "e116b291-c01a-0001-7efb-cc0599000000", + "x-ms-request-id": "fe9f84e4-b01a-0009-8020-e63c4a000000", "x-ms-version": "2021-04-10" }, "ResponseBody": [ "\uFEFF\u003C?xml version=\u00221.0\u0022 encoding=\u0022utf-8\u0022?\u003E\u003CError\u003E\u003CCode\u003EReadOnlyAttribute\u003C/Code\u003E\u003CMessage\u003EThe specified resource is read-only and cannot be modified at this time.\n", - "RequestId:e116b291-c01a-0001-7efb-cc0599000000\n", - "Time:2021-10-29T19:29:42.0179645Z\u003C/Message\u003E\u003C/Error\u003E" + "RequestId:fe9f84e4-b01a-0009-8020-e63c4a000000\n", + "Time:2021-11-30T19:31:28.4769757Z\u003C/Message\u003E\u003C/Error\u003E" ] }, { - "RequestUri": "https://712xscnapby3pev55a.file.preprod.core.windows.net/test-share-7c5e7eb6-4a32-be61-6023-1176446e6185?restype=share", + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-7c5e7eb6-4a32-be61-6023-1176446e6185?restype=share", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/xml", "Authorization": "Sanitized", - "traceparent": "00-029cf82ef4425741b7e50bb431a44173-0a5f3ecea5329344-00", + "traceparent": "00-cc9115604e689b4395f74c2aa9b354cd-fb2b2ba83685de4b-00", "User-Agent": [ - "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211029.1", - "(.NET 5.0.11; Microsoft Windows 10.0.19043)" + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" ], "x-ms-client-request-id": "fd3873eb-f03e-ba7a-a00a-c1fbc1a81100", - "x-ms-date": "Fri, 29 Oct 2021 19:29:41 GMT", + "x-ms-date": "Tue, 30 Nov 2021 19:31:26 GMT", "x-ms-delete-snapshots": "include", "x-ms-return-client-request-id": "true", "x-ms-version": "2021-04-10" @@ -212,10 +212,10 @@ "RequestBody": null, "StatusCode": 202, "ResponseHeaders": { - "Date": "Fri, 29 Oct 2021 19:29:41 GMT", + "Date": "Tue, 30 Nov 2021 19:31:27 GMT", "Transfer-Encoding": "chunked", "x-ms-client-request-id": "fd3873eb-f03e-ba7a-a00a-c1fbc1a81100", - "x-ms-request-id": "e116b292-c01a-0001-7ffb-cc0599000000", + "x-ms-request-id": "fe9f84e5-b01a-0009-0120-e63c4a000000", "x-ms-version": "2021-04-10" }, "ResponseBody": [] @@ -223,6 +223,6 @@ ], "Variables": { "RandomSeed": "2114182377", - "Storage_TestConfigDefault": "ProductionTenant\n712xscnapby3pev55a\nU2FuaXRpemVk\nhttps://712xscnapby3pev55a.blob.preprod.core.windows.net\nhttps://712xscnapby3pev55a.file.preprod.core.windows.net\nhttps://712xscnapby3pev55a.queue.core.windows.net\nhttps://712xscnapby3pev55a.table.core.windows.net\n\n\n\n\nhttps://712xscnapby3pev55a-secondary.blob.core.windows.net\nhttps://712xscnapby3pev55a-secondary.file.core.windows.net\nhttps://712xscnapby3pev55a-secondary.queue.core.windows.net\nhttps://712xscnapby3pev55a-secondary.table.core.windows.net\n\nSanitized\n\n\nCloud\nBlobEndpoint=https://712xscnapby3pev55a.blob.preprod.core.windows.net/;QueueEndpoint=https://712xscnapby3pev55a.queue.core.windows.net/;FileEndpoint=https://712xscnapby3pev55a.file.preprod.core.windows.net/;BlobSecondaryEndpoint=https://712xscnapby3pev55a-secondary.blob.core.windows.net/;QueueSecondaryEndpoint=https://712xscnapby3pev55a-secondary.queue.core.windows.net/;FileSecondaryEndpoint=https://712xscnapby3pev55a-secondary.file.core.windows.net/;AccountName=712xscnapby3pev55a;AccountKey=Kg==;\nscope-1\n\n" + "Storage_TestConfigDefault": "ProductionTenant\nfp8xscnapby3pev24a\nU2FuaXRpemVk\nhttps://fp8xscnapby3pev24a.blob.preprod.core.windows.net\nhttps://fp8xscnapby3pev24a.file.preprod.core.windows.net\nhttps://fp8xscnapby3pev24a.queue.core.windows.net\nhttps://fp8xscnapby3pev24a.table.core.windows.net\n\n\n\n\nhttps://fp8xscnapby3pev24a-secondary.blob.core.windows.net\nhttps://fp8xscnapby3pev24a-secondary.file.core.windows.net\nhttps://fp8xscnapby3pev24a-secondary.queue.core.windows.net\nhttps://fp8xscnapby3pev24a-secondary.table.core.windows.net\n\nSanitized\n\n\nCloud\nBlobEndpoint=https://fp8xscnapby3pev24a.blob.preprod.core.windows.net/;QueueEndpoint=https://fp8xscnapby3pev24a.queue.core.windows.net/;FileEndpoint=https://fp8xscnapby3pev24a.file.preprod.core.windows.net/;BlobSecondaryEndpoint=https://fp8xscnapby3pev24a-secondary.blob.core.windows.net/;QueueSecondaryEndpoint=https://fp8xscnapby3pev24a-secondary.queue.core.windows.net/;FileSecondaryEndpoint=https://fp8xscnapby3pev24a-secondary.file.core.windows.net/;AccountName=fp8xscnapby3pev24a;AccountKey=Kg==;\nseanscope1\n\n" } } \ No newline at end of file diff --git a/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_IgnoreReadOnly(True).json b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_IgnoreReadOnly(True).json new file mode 100644 index 000000000000..56766b45eab2 --- /dev/null +++ b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_IgnoreReadOnly(True).json @@ -0,0 +1,270 @@ +{ + "Entries": [ + { + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-c37ae416-0d48-9e89-9cbf-74f0329e57b4?restype=share", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-674e6965cb6b5a4db41295d2f9e0be0c-784cecb801d8414c-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" + ], + "x-ms-client-request-id": "e8e4b378-ccb4-4d46-1d81-a5da159b5dd7", + "x-ms-date": "Tue, 30 Nov 2021 19:31:24 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Tue, 30 Nov 2021 19:31:25 GMT", + "ETag": "\u00220x8D9B43800229091\u0022", + "Last-Modified": "Tue, 30 Nov 2021 19:31:26 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "e8e4b378-ccb4-4d46-1d81-a5da159b5dd7", + "x-ms-request-id": "fe9f84c8-b01a-0009-6820-e63c4a000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-c37ae416-0d48-9e89-9cbf-74f0329e57b4/test-directory-50ae14ad-6d57-a881-b38f-8ea49e9d13e4?restype=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-d7bfe008194ed040a4020d0bae9cfff6-9058411caed77941-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" + ], + "x-ms-client-request-id": "763e9745-6208-0bb1-323b-34253ea1ae80", + "x-ms-date": "Tue, 30 Nov 2021 19:31:24 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Tue, 30 Nov 2021 19:31:25 GMT", + "ETag": "\u00220x8D9B438003220FF\u0022", + "Last-Modified": "Tue, 30 Nov 2021 19:31:26 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "763e9745-6208-0bb1-323b-34253ea1ae80", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-11-30T19:31:26.4089343Z", + "x-ms-file-creation-time": "2021-11-30T19:31:26.4089343Z", + "x-ms-file-id": "13835128424026341376", + "x-ms-file-last-write-time": "2021-11-30T19:31:26.4089343Z", + "x-ms-file-parent-id": "0", + "x-ms-file-permission-key": "10156757773834485186*23892369358363523", + "x-ms-request-id": "fe9f84ca-b01a-0009-6920-e63c4a000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-c37ae416-0d48-9e89-9cbf-74f0329e57b4/test-directory-50ae14ad-6d57-a881-b38f-8ea49e9d13e4/test-file-aacdc06e-de23-3e1c-1493-317e867fe15d", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-683610c3433321449636e61b3f4773f1-bca0ac5f2e754b40-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" + ], + "x-ms-client-request-id": "07936629-2a89-6776-7aff-6274303284b3", + "x-ms-content-length": "1024", + "x-ms-date": "Tue, 30 Nov 2021 19:31:24 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-type": "file", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Tue, 30 Nov 2021 19:31:26 GMT", + "ETag": "\u00220x8D9B438003F6785\u0022", + "Last-Modified": "Tue, 30 Nov 2021 19:31:26 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "07936629-2a89-6776-7aff-6274303284b3", + "x-ms-file-attributes": "Archive", + "x-ms-file-change-time": "2021-11-30T19:31:26.4959365Z", + "x-ms-file-creation-time": "2021-11-30T19:31:26.4959365Z", + "x-ms-file-id": "11529285414812647424", + "x-ms-file-last-write-time": "2021-11-30T19:31:26.4959365Z", + "x-ms-file-parent-id": "13835128424026341376", + "x-ms-file-permission-key": "16312887433045634277*23892369358363523", + "x-ms-request-id": "fe9f84cb-b01a-0009-6a20-e63c4a000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-c37ae416-0d48-9e89-9cbf-74f0329e57b4/test-directory-50ae14ad-6d57-a881-b38f-8ea49e9d13e4/test-file-4a6bd65a-a742-d122-e422-f0b6929d0439", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-a3b9cd771777334fa0bb9136e6fa2748-3be659227305b64c-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" + ], + "x-ms-client-request-id": "632598e7-926f-823b-43c1-22673ac0d4dc", + "x-ms-content-length": "1024", + "x-ms-date": "Tue, 30 Nov 2021 19:31:24 GMT", + "x-ms-file-attributes": "ReadOnly", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-type": "file", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Tue, 30 Nov 2021 19:31:26 GMT", + "ETag": "\u00220x8D9B438004C11BF\u0022", + "Last-Modified": "Tue, 30 Nov 2021 19:31:26 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "632598e7-926f-823b-43c1-22673ac0d4dc", + "x-ms-file-attributes": "ReadOnly | Archive", + "x-ms-file-change-time": "2021-11-30T19:31:26.5789375Z", + "x-ms-file-creation-time": "2021-11-30T19:31:26.5789375Z", + "x-ms-file-id": "16140971433240035328", + "x-ms-file-last-write-time": "2021-11-30T19:31:26.5789375Z", + "x-ms-file-parent-id": "13835128424026341376", + "x-ms-file-permission-key": "16312887433045634277*23892369358363523", + "x-ms-request-id": "fe9f84cc-b01a-0009-6b20-e63c4a000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-c37ae416-0d48-9e89-9cbf-74f0329e57b4/test-directory-50ae14ad-6d57-a881-b38f-8ea49e9d13e4/test-file-4a6bd65a-a742-d122-e422-f0b6929d0439?comp=rename", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-314ed849ac1957489de76a6c68076b9f-702c122187551949-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" + ], + "x-ms-client-request-id": "f9ce69a7-a078-25c9-78d2-dc2ab76c54bd", + "x-ms-date": "Tue, 30 Nov 2021 19:31:24 GMT", + "x-ms-file-rename-ignore-readonly": "true", + "x-ms-file-rename-replace-if-exists": "true", + "x-ms-file-rename-source": "https%3A%2F%2Ffp8xscnapby3pev24a.file.preprod.core.windows.net%2Ftest-share-c37ae416-0d48-9e89-9cbf-74f0329e57b4%2Ftest-directory-50ae14ad-6d57-a881-b38f-8ea49e9d13e4%2Ftest-file-aacdc06e-de23-3e1c-1493-317e867fe15d=", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Date": "Tue, 30 Nov 2021 19:31:26 GMT", + "ETag": "\u00220x8D9B438005A9147\u0022", + "Last-Modified": "Tue, 30 Nov 2021 19:31:26 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "f9ce69a7-a078-25c9-78d2-dc2ab76c54bd", + "x-ms-file-attributes": "Archive", + "x-ms-file-change-time": "2021-11-30T19:31:26.6739527Z", + "x-ms-file-creation-time": "2021-11-30T19:31:26.4959365Z", + "x-ms-file-id": "11529285414812647424", + "x-ms-file-last-write-time": "2021-11-30T19:31:26.4959365Z", + "x-ms-file-parent-id": "13835128424026341376", + "x-ms-file-permission-key": "16312887433045634277*23892369358363523", + "x-ms-request-id": "fe9f84cd-b01a-0009-6c20-e63c4a000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-c37ae416-0d48-9e89-9cbf-74f0329e57b4/test-directory-50ae14ad-6d57-a881-b38f-8ea49e9d13e4/test-file-4a6bd65a-a742-d122-e422-f0b6929d0439", + "RequestMethod": "HEAD", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" + ], + "x-ms-client-request-id": "d1bfa52a-dbf1-5b63-6097-030b889bc896", + "x-ms-date": "Tue, 30 Nov 2021 19:31:24 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Length": "1024", + "Content-Type": "application/octet-stream", + "Date": "Tue, 30 Nov 2021 19:31:26 GMT", + "ETag": "\u00220x8D9B438005A9147\u0022", + "Last-Modified": "Tue, 30 Nov 2021 19:31:26 GMT", + "x-ms-client-request-id": "d1bfa52a-dbf1-5b63-6097-030b889bc896", + "x-ms-file-attributes": "Archive", + "x-ms-file-change-time": "2021-11-30T19:31:26.6739527Z", + "x-ms-file-creation-time": "2021-11-30T19:31:26.4959365Z", + "x-ms-file-id": "11529285414812647424", + "x-ms-file-last-write-time": "2021-11-30T19:31:26.4959365Z", + "x-ms-file-parent-id": "13835128424026341376", + "x-ms-file-permission-key": "16312887433045634277*23892369358363523", + "x-ms-request-id": "fe9f84ce-b01a-0009-6d20-e63c4a000000", + "x-ms-server-encrypted": "true", + "x-ms-type": "File", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-c37ae416-0d48-9e89-9cbf-74f0329e57b4?restype=share", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-922cb892b2947a41a2f94d1832b7d7db-e5342ec09eda0e47-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" + ], + "x-ms-client-request-id": "12005b6a-82ad-48cb-4d08-b012fb9efa36", + "x-ms-date": "Tue, 30 Nov 2021 19:31:24 GMT", + "x-ms-delete-snapshots": "include", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "Date": "Tue, 30 Nov 2021 19:31:26 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "12005b6a-82ad-48cb-4d08-b012fb9efa36", + "x-ms-request-id": "fe9f84cf-b01a-0009-6e20-e63c4a000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + } + ], + "Variables": { + "RandomSeed": "1697464720", + "Storage_TestConfigDefault": "ProductionTenant\nfp8xscnapby3pev24a\nU2FuaXRpemVk\nhttps://fp8xscnapby3pev24a.blob.preprod.core.windows.net\nhttps://fp8xscnapby3pev24a.file.preprod.core.windows.net\nhttps://fp8xscnapby3pev24a.queue.core.windows.net\nhttps://fp8xscnapby3pev24a.table.core.windows.net\n\n\n\n\nhttps://fp8xscnapby3pev24a-secondary.blob.core.windows.net\nhttps://fp8xscnapby3pev24a-secondary.file.core.windows.net\nhttps://fp8xscnapby3pev24a-secondary.queue.core.windows.net\nhttps://fp8xscnapby3pev24a-secondary.table.core.windows.net\n\nSanitized\n\n\nCloud\nBlobEndpoint=https://fp8xscnapby3pev24a.blob.preprod.core.windows.net/;QueueEndpoint=https://fp8xscnapby3pev24a.queue.core.windows.net/;FileEndpoint=https://fp8xscnapby3pev24a.file.preprod.core.windows.net/;BlobSecondaryEndpoint=https://fp8xscnapby3pev24a-secondary.blob.core.windows.net/;QueueSecondaryEndpoint=https://fp8xscnapby3pev24a-secondary.queue.core.windows.net/;FileSecondaryEndpoint=https://fp8xscnapby3pev24a-secondary.file.core.windows.net/;AccountName=fp8xscnapby3pev24a;AccountKey=Kg==;\nseanscope1\n\n" + } +} \ No newline at end of file diff --git a/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_IgnoreReadOnly(True)Async.json b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_IgnoreReadOnly(True)Async.json new file mode 100644 index 000000000000..f85f669960a9 --- /dev/null +++ b/sdk/storage/Azure.Storage.Files.Shares/tests/SessionRecords/FileClientTests/RenameAsync_IgnoreReadOnly(True)Async.json @@ -0,0 +1,270 @@ +{ + "Entries": [ + { + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-d755c2c5-a37b-cb3c-0962-d5c6c2daa924?restype=share", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-1d511ec0b76ad54881828dbb8da56ce7-22ff4dea6b91224c-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" + ], + "x-ms-client-request-id": "7a235587-93a7-38ff-9aa6-bfbaee6a2610", + "x-ms-date": "Tue, 30 Nov 2021 19:31:25 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Tue, 30 Nov 2021 19:31:26 GMT", + "ETag": "\u00220x8D9B43800D45538\u0022", + "Last-Modified": "Tue, 30 Nov 2021 19:31:27 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "7a235587-93a7-38ff-9aa6-bfbaee6a2610", + "x-ms-request-id": "fe9f84d7-b01a-0009-7520-e63c4a000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-d755c2c5-a37b-cb3c-0962-d5c6c2daa924/test-directory-8bf4fa46-e1b8-ee79-abd1-685b132f84f7?restype=directory", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-8ece696c05dac048a750328edc93e413-5240cb9dc8f8b048-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" + ], + "x-ms-client-request-id": "4cc67ffa-721d-a596-dc34-ced52ba4246b", + "x-ms-date": "Tue, 30 Nov 2021 19:31:25 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Tue, 30 Nov 2021 19:31:27 GMT", + "ETag": "\u00220x8D9B43800E4A925\u0022", + "Last-Modified": "Tue, 30 Nov 2021 19:31:27 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "4cc67ffa-721d-a596-dc34-ced52ba4246b", + "x-ms-file-attributes": "Directory", + "x-ms-file-change-time": "2021-11-30T19:31:27.5789605Z", + "x-ms-file-creation-time": "2021-11-30T19:31:27.5789605Z", + "x-ms-file-id": "13835128424026341376", + "x-ms-file-last-write-time": "2021-11-30T19:31:27.5789605Z", + "x-ms-file-parent-id": "0", + "x-ms-file-permission-key": "10156757773834485186*23892369358363523", + "x-ms-request-id": "fe9f84d9-b01a-0009-7620-e63c4a000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-d755c2c5-a37b-cb3c-0962-d5c6c2daa924/test-directory-8bf4fa46-e1b8-ee79-abd1-685b132f84f7/test-file-6756c821-ba2c-1758-7dfe-f1351b58d750", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-d9053f38b290a548badc9209a75398f2-be55d4af8cae9f41-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" + ], + "x-ms-client-request-id": "4fff5b5e-2e05-3fd8-27ae-cf1f80608a83", + "x-ms-content-length": "1024", + "x-ms-date": "Tue, 30 Nov 2021 19:31:25 GMT", + "x-ms-file-attributes": "None", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-type": "file", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Tue, 30 Nov 2021 19:31:27 GMT", + "ETag": "\u00220x8D9B43800F4AECB\u0022", + "Last-Modified": "Tue, 30 Nov 2021 19:31:27 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "4fff5b5e-2e05-3fd8-27ae-cf1f80608a83", + "x-ms-file-attributes": "Archive", + "x-ms-file-change-time": "2021-11-30T19:31:27.6839627Z", + "x-ms-file-creation-time": "2021-11-30T19:31:27.6839627Z", + "x-ms-file-id": "11529285414812647424", + "x-ms-file-last-write-time": "2021-11-30T19:31:27.6839627Z", + "x-ms-file-parent-id": "13835128424026341376", + "x-ms-file-permission-key": "16312887433045634277*23892369358363523", + "x-ms-request-id": "fe9f84da-b01a-0009-7720-e63c4a000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-d755c2c5-a37b-cb3c-0962-d5c6c2daa924/test-directory-8bf4fa46-e1b8-ee79-abd1-685b132f84f7/test-file-c7997e5d-9043-e901-ee64-769329d5b7d5", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-9a3dce90b8607f49b6a3ef4b47739b9e-23f8245fee345448-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" + ], + "x-ms-client-request-id": "e1250d0e-040e-cdb1-5916-60a0b8441651", + "x-ms-content-length": "1024", + "x-ms-date": "Tue, 30 Nov 2021 19:31:25 GMT", + "x-ms-file-attributes": "ReadOnly", + "x-ms-file-creation-time": "Now", + "x-ms-file-last-write-time": "Now", + "x-ms-file-permission": "Inherit", + "x-ms-return-client-request-id": "true", + "x-ms-type": "file", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "Date": "Tue, 30 Nov 2021 19:31:27 GMT", + "ETag": "\u00220x8D9B438010158F2\u0022", + "Last-Modified": "Tue, 30 Nov 2021 19:31:27 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "e1250d0e-040e-cdb1-5916-60a0b8441651", + "x-ms-file-attributes": "ReadOnly | Archive", + "x-ms-file-change-time": "2021-11-30T19:31:27.7669618Z", + "x-ms-file-creation-time": "2021-11-30T19:31:27.7669618Z", + "x-ms-file-id": "16140971433240035328", + "x-ms-file-last-write-time": "2021-11-30T19:31:27.7669618Z", + "x-ms-file-parent-id": "13835128424026341376", + "x-ms-file-permission-key": "16312887433045634277*23892369358363523", + "x-ms-request-id": "fe9f84db-b01a-0009-7820-e63c4a000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-d755c2c5-a37b-cb3c-0962-d5c6c2daa924/test-directory-8bf4fa46-e1b8-ee79-abd1-685b132f84f7/test-file-c7997e5d-9043-e901-ee64-769329d5b7d5?comp=rename", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-97065f2842a24945a285cabfb64d100b-e35242aa617f6f4c-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" + ], + "x-ms-client-request-id": "1c85e6f3-d5b0-2dc7-4b09-664227aa5447", + "x-ms-date": "Tue, 30 Nov 2021 19:31:25 GMT", + "x-ms-file-rename-ignore-readonly": "true", + "x-ms-file-rename-replace-if-exists": "true", + "x-ms-file-rename-source": "https%3A%2F%2Ffp8xscnapby3pev24a.file.preprod.core.windows.net%2Ftest-share-d755c2c5-a37b-cb3c-0962-d5c6c2daa924%2Ftest-directory-8bf4fa46-e1b8-ee79-abd1-685b132f84f7%2Ftest-file-6756c821-ba2c-1758-7dfe-f1351b58d750=", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Date": "Tue, 30 Nov 2021 19:31:27 GMT", + "ETag": "\u00220x8D9B4380111FAE0\u0022", + "Last-Modified": "Tue, 30 Nov 2021 19:31:27 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "1c85e6f3-d5b0-2dc7-4b09-664227aa5447", + "x-ms-file-attributes": "Archive", + "x-ms-file-change-time": "2021-11-30T19:31:27.8759648Z", + "x-ms-file-creation-time": "2021-11-30T19:31:27.6839627Z", + "x-ms-file-id": "11529285414812647424", + "x-ms-file-last-write-time": "2021-11-30T19:31:27.6839627Z", + "x-ms-file-parent-id": "13835128424026341376", + "x-ms-file-permission-key": "16312887433045634277*23892369358363523", + "x-ms-request-id": "fe9f84dc-b01a-0009-7920-e63c4a000000", + "x-ms-request-server-encrypted": "true", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-d755c2c5-a37b-cb3c-0962-d5c6c2daa924/test-directory-8bf4fa46-e1b8-ee79-abd1-685b132f84f7/test-file-c7997e5d-9043-e901-ee64-769329d5b7d5", + "RequestMethod": "HEAD", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" + ], + "x-ms-client-request-id": "d1ac2c96-fabf-21a1-32bf-387f64e7ad88", + "x-ms-date": "Tue, 30 Nov 2021 19:31:25 GMT", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Length": "1024", + "Content-Type": "application/octet-stream", + "Date": "Tue, 30 Nov 2021 19:31:27 GMT", + "ETag": "\u00220x8D9B4380111FAE0\u0022", + "Last-Modified": "Tue, 30 Nov 2021 19:31:27 GMT", + "x-ms-client-request-id": "d1ac2c96-fabf-21a1-32bf-387f64e7ad88", + "x-ms-file-attributes": "Archive", + "x-ms-file-change-time": "2021-11-30T19:31:27.8759648Z", + "x-ms-file-creation-time": "2021-11-30T19:31:27.6839627Z", + "x-ms-file-id": "11529285414812647424", + "x-ms-file-last-write-time": "2021-11-30T19:31:27.6839627Z", + "x-ms-file-parent-id": "13835128424026341376", + "x-ms-file-permission-key": "16312887433045634277*23892369358363523", + "x-ms-request-id": "fe9f84dd-b01a-0009-7a20-e63c4a000000", + "x-ms-server-encrypted": "true", + "x-ms-type": "File", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://fp8xscnapby3pev24a.file.preprod.core.windows.net/test-share-d755c2c5-a37b-cb3c-0962-d5c6c2daa924?restype=share", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/xml", + "Authorization": "Sanitized", + "traceparent": "00-b2e0d762858c5d4c9c318caa46996d8b-9bfa15faace3d94d-00", + "User-Agent": [ + "azsdk-net-Storage.Files.Shares/12.9.0-alpha.20211130.1", + "(.NET 5.0.12; Microsoft Windows 10.0.19044)" + ], + "x-ms-client-request-id": "faac535f-83fd-1087-79a2-3c0eb487dffb", + "x-ms-date": "Tue, 30 Nov 2021 19:31:26 GMT", + "x-ms-delete-snapshots": "include", + "x-ms-return-client-request-id": "true", + "x-ms-version": "2021-04-10" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "Date": "Tue, 30 Nov 2021 19:31:27 GMT", + "Transfer-Encoding": "chunked", + "x-ms-client-request-id": "faac535f-83fd-1087-79a2-3c0eb487dffb", + "x-ms-request-id": "fe9f84de-b01a-0009-7b20-e63c4a000000", + "x-ms-version": "2021-04-10" + }, + "ResponseBody": [] + } + ], + "Variables": { + "RandomSeed": "309793516", + "Storage_TestConfigDefault": "ProductionTenant\nfp8xscnapby3pev24a\nU2FuaXRpemVk\nhttps://fp8xscnapby3pev24a.blob.preprod.core.windows.net\nhttps://fp8xscnapby3pev24a.file.preprod.core.windows.net\nhttps://fp8xscnapby3pev24a.queue.core.windows.net\nhttps://fp8xscnapby3pev24a.table.core.windows.net\n\n\n\n\nhttps://fp8xscnapby3pev24a-secondary.blob.core.windows.net\nhttps://fp8xscnapby3pev24a-secondary.file.core.windows.net\nhttps://fp8xscnapby3pev24a-secondary.queue.core.windows.net\nhttps://fp8xscnapby3pev24a-secondary.table.core.windows.net\n\nSanitized\n\n\nCloud\nBlobEndpoint=https://fp8xscnapby3pev24a.blob.preprod.core.windows.net/;QueueEndpoint=https://fp8xscnapby3pev24a.queue.core.windows.net/;FileEndpoint=https://fp8xscnapby3pev24a.file.preprod.core.windows.net/;BlobSecondaryEndpoint=https://fp8xscnapby3pev24a-secondary.blob.core.windows.net/;QueueSecondaryEndpoint=https://fp8xscnapby3pev24a-secondary.queue.core.windows.net/;FileSecondaryEndpoint=https://fp8xscnapby3pev24a-secondary.file.core.windows.net/;AccountName=fp8xscnapby3pev24a;AccountKey=Kg==;\nseanscope1\n\n" + } +} \ No newline at end of file From 90448d29deba36c45a9d0189823100be5ca420b5 Mon Sep 17 00:00:00 2001 From: Sean McCullough Date: Tue, 30 Nov 2021 14:39:33 -0600 Subject: [PATCH 21/21] updated autorest --- sdk/storage/Azure.Storage.Files.Shares/src/autorest.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/storage/Azure.Storage.Files.Shares/src/autorest.md b/sdk/storage/Azure.Storage.Files.Shares/src/autorest.md index e48b5e6b548e..6d65c80a9808 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/src/autorest.md +++ b/sdk/storage/Azure.Storage.Files.Shares/src/autorest.md @@ -4,7 +4,7 @@ Run `dotnet build /t:GenerateCode` to generate code. ``` yaml input-file: - - C:\Users\seanmcc\git\azure-rest-api-specs\specification\storage\data-plane\Microsoft.FileStorage\preview\2021-04-10\file.json + - https://raw.githubusercontent.com/Azure/azure-rest-api-specs/588cdc4700d1da755c67df8fafbcc95df1ba528b/specification/storage/data-plane/Microsoft.FileStorage/preview/2021-04-10/file.json # https://github.com/Azure/autorest/issues/4075 skip-semantics-validation: true modelerfour: