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 2020/04/23 16:18:11 UTC

[GitHub] [nifi] turcsanyip commented on a change in pull request #4227: NIFI-7298: PutAzureDataLakeStorage tests.

turcsanyip commented on a change in pull request #4227:
URL: https://github.com/apache/nifi/pull/4227#discussion_r413935947



##########
File path: nifi-nar-bundles/nifi-azure-bundle/nifi-azure-processors/src/test/java/org/apache/nifi/processors/azure/storage/ITPutAzureDataLakeStorage.java
##########
@@ -32,26 +49,223 @@
 
     @Before
     public void setUp() {
-        runner.setProperty(PutAzureDataLakeStorage.FILE, TEST_FILE_NAME);
+        runner.setProperty(PutAzureDataLakeStorage.DIRECTORY, DIRECTORY);
+        runner.setProperty(PutAzureDataLakeStorage.FILE, FILE_NAME);
+    }
+
+    @Test
+    public void testPutFileToExistingDirectory() throws Exception {
+        fileSystemClient.createDirectory(DIRECTORY);
+
+        runProcessor(FILE_DATA);
+
+        assertSuccess(DIRECTORY, FILE_NAME, FILE_DATA);
+    }
+
+    @Test
+    public void testPutFileToNonExistingDirectory() throws Exception {
+        runProcessor(FILE_DATA);
+
+        assertSuccess(DIRECTORY, FILE_NAME, FILE_DATA);
+    }
+
+    @Ignore
+    // DataLakeFileClient.getFileUrl() returns "dir1%2Fdir2%2Fdir3%2Fdir4" for "dir1/dir2/dir3/dir4"
+    // seems to be a bug in the Azure lib

Review comment:
       @MuazmaZ Do you think it is a bug or works as expected?
   I would expect
   `https://mystorageaccount.dfs.core.windows.net/myfilesystem/dir1/dir2/dir3/dir4/file1`
   (as displayed on the Azure Portal)
   instead of
   `https://mystorageaccount.dfs.core.windows.net/myfilesystem/dir1%2Fdir2%2Fdir3%2Fdir4/file1`




----------------------------------------------------------------
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.

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