File tree Expand file tree Collapse file tree 3 files changed +16
-1
lines changed
sdk/storage/Azure.Storage.Files.DataLake Expand file tree Collapse file tree 3 files changed +16
-1
lines changed Original file line number Diff line number Diff line change 22 "AssetsRepo" : " Azure/azure-sdk-assets" ,
33 "AssetsRepoPrefixPath" : " net" ,
44 "TagPrefix" : " net/storage/Azure.Storage.Files.DataLake" ,
5- "Tag" : " net/storage/Azure.Storage.Files.DataLake_369e19e7ec "
5+ "Tag" : " net/storage/Azure.Storage.Files.DataLake_7989a584e7 "
66}
Original file line number Diff line number Diff line change @@ -1865,6 +1865,7 @@ private async Task<Response> DeleteInternal(
18651865 // Pagination only applies to service version 2023-08-03 and later, when using OAuth.
18661866 bool ? paginated = null ;
18671867 if ( _clientConfiguration . ClientOptions . Version > = DataLakeClientOptions . ServiceVersion . V2023_08_03
1868+ && recursive . GetValueOrDefault ( )
18681869 && _clientConfiguration . TokenCredential != null )
18691870 {
18701871 paginated = true ;
Original file line number Diff line number Diff line change @@ -951,6 +951,20 @@ public async Task DeleteAsync()
951951 await fileClient . DeleteAsync ( ) ;
952952 }
953953
954+ [ RecordedTest ]
955+ public async Task DeleteAsync_OAuth ( )
956+ {
957+ DataLakeServiceClient oauthService = GetServiceClient_OAuth ( ) ;
958+ await using DisposingFileSystem test = await GetNewFileSystem ( oauthService ) ;
959+ DataLakeDirectoryClient directory = await test . FileSystem . CreateDirectoryAsync ( GetNewDirectoryName ( ) ) ;
960+
961+ // Arrange
962+ DataLakeFileClient fileClient = await directory . CreateFileAsync ( GetNewFileName ( ) ) ;
963+
964+ // Act
965+ await fileClient . DeleteAsync ( ) ;
966+ }
967+
954968 [ RecordedTest ]
955969 public async Task DeleteFileAsync_Error ( )
956970 {
You can’t perform that action at this time.
0 commit comments