Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed issue where pagianted parameter was being sent with DataLakeFil… #37934

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sdk/storage/Azure.Storage.Files.DataLake/assets.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"AssetsRepo": "Azure/azure-sdk-assets",
"AssetsRepoPrefixPath": "net",
"TagPrefix": "net/storage/Azure.Storage.Files.DataLake",
"Tag": "net/storage/Azure.Storage.Files.DataLake_369e19e7ec"
"Tag": "net/storage/Azure.Storage.Files.DataLake_7989a584e7"
}
Original file line number Diff line number Diff line change
Expand Up @@ -1865,6 +1865,7 @@ private async Task<Response> DeleteInternal(
// Pagination only applies to service version 2023-08-03 and later, when using OAuth.
bool? paginated = null;
if (_clientConfiguration.ClientOptions.Version >= DataLakeClientOptions.ServiceVersion.V2023_08_03
&& recursive.GetValueOrDefault()
&& _clientConfiguration.TokenCredential != null)
{
paginated = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -951,6 +951,20 @@ public async Task DeleteAsync()
await fileClient.DeleteAsync();
}

[RecordedTest]
public async Task DeleteAsync_OAuth()
{
DataLakeServiceClient oauthService = GetServiceClient_OAuth();
await using DisposingFileSystem test = await GetNewFileSystem(oauthService);
DataLakeDirectoryClient directory = await test.FileSystem.CreateDirectoryAsync(GetNewDirectoryName());

// Arrange
DataLakeFileClient fileClient = await directory.CreateFileAsync(GetNewFileName());

// Act
await fileClient.DeleteAsync();
}

[RecordedTest]
public async Task DeleteFileAsync_Error()
{
Expand Down