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/07/06 12:36:35 UTC

[GitHub] [nifi] MikeThomsen commented on a change in pull request #4370: NIFI-6128 UnpackContent: Store unpacked file data

MikeThomsen commented on a change in pull request #4370:
URL: https://github.com/apache/nifi/pull/4370#discussion_r450190144



##########
File path: nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestUnpackContent.java
##########
@@ -70,10 +70,14 @@ public void testTar() throws IOException {
         autoUnpackRunner.assertTransferCount(UnpackContent.REL_FAILURE, 0);
 
         final List<MockFlowFile> unpacked = unpackRunner.getFlowFilesForRelationship(UnpackContent.REL_SUCCESS);
+
         for (final MockFlowFile flowFile : unpacked) {
             final String filename = flowFile.getAttribute(CoreAttributes.FILENAME.key());
             final String folder = flowFile.getAttribute(CoreAttributes.PATH.key());
             final Path path = dataPath.resolve(folder).resolve(filename);
+            assertEquals(flowFile.getAttribute("file.inner.permission"),"420");
+            assertEquals("jmcarey", flowFile.getAttribute("file.inner.owner"));
+            assertEquals("mkpasswd", flowFile.getAttribute("file.inner.group"));

Review comment:
       Should have a test here for the last modified time attribute. You should be able to just use another `SimpleDateFormat` to see if you can successfully parse the attribute back into a `java.util.Date`.




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