You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by GitBox <gi...@apache.org> on 2021/07/30 13:52:11 UTC

[GitHub] [nifi] Lehel44 commented on a change in pull request #5190: NIFI-7947: Add directory deletion functionality in DeleteAzureDataLakeStorage

Lehel44 commented on a change in pull request #5190:
URL: https://github.com/apache/nifi/pull/5190#discussion_r679941927



##########
File path: nifi-nar-bundles/nifi-azure-bundle/nifi-azure-processors/src/test/java/org/apache/nifi/processors/azure/storage/ITDeleteAzureDataLakeStorage.java
##########
@@ -35,15 +35,82 @@
 
 public class ITDeleteAzureDataLakeStorage extends AbstractAzureDataLakeStorageIT {
 
+    private static final boolean FILE = true;
+    private static final boolean DIRECTORY = false;
+
     @Override
     protected Class<? extends Processor> getProcessorClass() {
         return DeleteAzureDataLakeStorage.class;
     }
 
+    @Test
+    public void testDeleteDirectoryWithFiles() {
+        // GIVEN
+        String directory = "TestDirectory";
+        String filename = "testFile.txt";
+        String fileContent = "AzureFileContent";
+        String inputFlowFileContent = "InputFlowFileContent";
+
+        createDirectoryAndUploadFile(directory, filename, fileContent);
+
+        // WHEN
+        // THEN
+        testSuccessfulDelete(fileSystemName, directory, filename, inputFlowFileContent, inputFlowFileContent, DIRECTORY);
+    }
+
+    @Test
+    public void testDeleteEmptyDirectoryAsFolder() {

Review comment:
       Yes, originally you could delete an empty folder if you provided it in the filename property. Now we have introduced a new property to chose between file and folder deletion. So that currently we can delete an empty directory as a FILE or as a FOLDER. I think I will rename the other test case, too. Or shall I add a comment somewhere about this? It's not trivial at all.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org