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



##########
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:
       +1 vote.  I saw the exception in the output, and it turns out that your 
test case expects failures (assertFailure).




----------------------------------------------------------------
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:
[email protected]


Reply via email to