Skip to content

Commit

Permalink
Fixed issue where pagianted parameter was being sent with DataLakeFil… (
Browse files Browse the repository at this point in the history
  • Loading branch information
seanmcc-msft authored Aug 1, 2023
1 parent 599559f commit 28770b5
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
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
14 changes: 14 additions & 0 deletions sdk/storage/Azure.Storage.Files.DataLake/tests/FileClientTests.cs
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

0 comments on commit 28770b5

Please sign in to comment.