[
https://issues.apache.org/jira/browse/NIFI-3095?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15709319#comment-15709319
]
ASF GitHub Bot commented on NIFI-3095:
--------------------------------------
Github user JPercivall commented on a diff in the pull request:
https://github.com/apache/nifi/pull/1276#discussion_r90293399
--- Diff:
nifi-nar-bundles/nifi-elasticsearch-bundle/nifi-elasticsearch-processors/src/test/java/org/apache/nifi/processors/elasticsearch/TestFetchElasticsearchHttp.java
---
@@ -65,6 +65,35 @@ public void teardown() {
public void testFetchElasticsearchOnTrigger() throws IOException {
runner = TestRunners.newTestRunner(new
FetchElasticsearchHttpTestProcessor(true)); // all docs are found
runner.setValidateExpressionUsage(true);
+ runner.setProperty(AbstractElasticsearchHttpProcessor.ES_URL,
"${es.url}");
+
+ runner.setProperty(FetchElasticsearchHttp.INDEX, "doc");
+ runner.assertNotValid();
+ runner.setProperty(FetchElasticsearchHttp.TYPE, "status");
+ runner.assertNotValid();
+ runner.setProperty(FetchElasticsearchHttp.DOC_ID, "${doc_id}");
+ runner.assertValid();
+
runner.setProperty(AbstractElasticsearchHttpProcessor.CONNECT_TIMEOUT,
"${connect.timeout}");
+ runner.assertValid();
+
+ runner.setVariable("es.url", "http://127.0.0.1:9200");
+ runner.setVariable("connect.timeout", "5s");
+
+ runner.enqueue(docExample, new HashMap<String, String>() {{
+ put("doc_id", "28039652140");
+ }});
+ runner.run(1, true, true);
+
+
runner.assertAllFlowFilesTransferred(FetchElasticsearchHttp.REL_SUCCESS, 1);
+ final MockFlowFile out =
runner.getFlowFilesForRelationship(FetchElasticsearchHttp.REL_SUCCESS).get(0);
+ assertNotNull(out);
+ out.assertAttributeEquals("doc_id", "28039652140");
+ }
+
+ @Test
+ public void testFetchElasticsearchOnTriggerEL() throws IOException {
--- End diff --
Looks like the test names got mixed up here
> PutElasticSearch (2.x Bulk API) - Add expression language support to
> 'Elasticsearch Hosts' and 'Cluster Name' fields
> --------------------------------------------------------------------------------------------------------------------
>
> Key: NIFI-3095
> URL: https://issues.apache.org/jira/browse/NIFI-3095
> Project: Apache NiFi
> Issue Type: Improvement
> Components: Extensions
> Reporter: Randy Bovay
> Assignee: Matt Burgess
> Fix For: 1.2.0
>
>
> Being able to a) Use Expression Language in the Hoss field, and ClusterName
> fields.
> This way we can provide a variable input to the service, and have it differ
> in our different data centers and environments.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)