MuazmaZ commented on a change in pull request #4227:
URL: https://github.com/apache/nifi/pull/4227#discussion_r413981836
##########
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:
Hi @turcsanyip Yes, this is expected behavior. The builder/client
internally url encodes the URL provided. If you need access to the non-url
encoded url, you can use the Utility.urlDecode function in the common library.
----------------------------------------------------------------
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]