nifi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From marka...@apache.org
Subject [4/6] incubator-nifi git commit: NIFI-296: Add tests for ooxml office documents
Date Mon, 02 Mar 2015 16:29:06 GMT
NIFI-296: Add tests for ooxml office documents


Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/8f5afd0c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/8f5afd0c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/8f5afd0c

Branch: refs/heads/develop
Commit: 8f5afd0c9af068e8050810ed51ee2a055fcad379
Parents: 089eec2
Author: Adam Lamar <adamonduty@gmail.com>
Authored: Sun Mar 1 19:49:49 2015 +0000
Committer: Adam Lamar <adamonduty@gmail.com>
Committed: Sun Mar 1 19:58:54 2015 +0000

----------------------------------------------------------------------
 .../processors/standard/TestIdentifyMimeType.java  |   8 ++++++++
 .../resources/TestIdentifyMimeType/392790.pptx     | Bin 0 -> 49539 bytes
 .../resources/TestIdentifyMimeType/528206.xlsx     | Bin 0 -> 13153 bytes
 .../resources/TestIdentifyMimeType/651924.docx     | Bin 0 -> 12131 bytes
 4 files changed, 8 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/8f5afd0c/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestIdentifyMimeType.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestIdentifyMimeType.java
b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestIdentifyMimeType.java
index 1bf4585..97c4b34 100644
--- a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestIdentifyMimeType.java
+++ b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestIdentifyMimeType.java
@@ -72,6 +72,11 @@ public class TestIdentifyMimeType {
         expectedMimeTypes.put("1.xml", "application/xml");
         expectedMimeTypes.put("flowfilev3", "application/flowfile-v3");
         expectedMimeTypes.put("flowfilev1.tar", "application/flowfile-v1");
+        // Office documents below randomly selected from govdocs1:
+        // http://digitalcorpora.org/corpora/govdocs
+        expectedMimeTypes.put("651924.docx", "application/vnd.openxmlformats-officedocument.wordprocessingml.document");
+        expectedMimeTypes.put("528206.xlsx", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
+        expectedMimeTypes.put("392790.pptx", "application/vnd.openxmlformats-officedocument.presentationml.presentation");
 
         final Map<String, String> expectedExtensions = new HashMap<>();
         expectedExtensions.put("1.7z", ".7z");
@@ -90,6 +95,9 @@ public class TestIdentifyMimeType {
         expectedExtensions.put("1.xml", ".xml");
         expectedExtensions.put("flowfilev3", "");
         expectedExtensions.put("flowfilev1.tar", "");
+        expectedExtensions.put("651924.docx", ".docx");
+        expectedExtensions.put("528206.xlsx", ".xlsx");
+        expectedExtensions.put("392790.pptx", ".pptx");
 
         final List<MockFlowFile> filesOut = runner.getFlowFilesForRelationship(IdentifyMimeType.REL_SUCCESS);
         for (final MockFlowFile file : filesOut) {

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/8f5afd0c/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/resources/TestIdentifyMimeType/392790.pptx
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/resources/TestIdentifyMimeType/392790.pptx
b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/resources/TestIdentifyMimeType/392790.pptx
new file mode 100644
index 0000000..84000b9
Binary files /dev/null and b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/resources/TestIdentifyMimeType/392790.pptx
differ

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/8f5afd0c/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/resources/TestIdentifyMimeType/528206.xlsx
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/resources/TestIdentifyMimeType/528206.xlsx
b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/resources/TestIdentifyMimeType/528206.xlsx
new file mode 100644
index 0000000..4ce41fc
Binary files /dev/null and b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/resources/TestIdentifyMimeType/528206.xlsx
differ

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/8f5afd0c/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/resources/TestIdentifyMimeType/651924.docx
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/resources/TestIdentifyMimeType/651924.docx
b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/resources/TestIdentifyMimeType/651924.docx
new file mode 100644
index 0000000..837dfa1
Binary files /dev/null and b/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/resources/TestIdentifyMimeType/651924.docx
differ


Mime
View raw message