diff options
author | Tal Levy <JubBoy333@gmail.com> | 2016-06-15 14:57:18 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-06-15 14:57:18 -0700 |
commit | a26260fb72071cffed52cfbb5f5f5225594a29a0 (patch) | |
tree | 36d332d231cc1ac29f3c2df27f3a4db035ea8f9f /core/src/test/java/org/elasticsearch/action/ingest | |
parent | 154d750e4b54511deef93db2af1067aaf1497955 (diff) |
new ScriptProcessor for Ingest (#18193)
add new ScriptProcessor for executing ES Scripts within pipelines
Diffstat (limited to 'core/src/test/java/org/elasticsearch/action/ingest')
-rw-r--r-- | core/src/test/java/org/elasticsearch/action/ingest/SimulatePipelineRequestParsingTests.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/core/src/test/java/org/elasticsearch/action/ingest/SimulatePipelineRequestParsingTests.java b/core/src/test/java/org/elasticsearch/action/ingest/SimulatePipelineRequestParsingTests.java index b7cd5ef0b9..4b50f69e4c 100644 --- a/core/src/test/java/org/elasticsearch/action/ingest/SimulatePipelineRequestParsingTests.java +++ b/core/src/test/java/org/elasticsearch/action/ingest/SimulatePipelineRequestParsingTests.java @@ -19,6 +19,7 @@ package org.elasticsearch.action.ingest; +import org.elasticsearch.cluster.service.ClusterService; import org.elasticsearch.ingest.PipelineStore; import org.elasticsearch.ingest.ProcessorsRegistry; import org.elasticsearch.ingest.TestProcessor; @@ -27,6 +28,7 @@ import org.elasticsearch.ingest.core.CompoundProcessor; import org.elasticsearch.ingest.core.IngestDocument; import org.elasticsearch.ingest.core.Pipeline; import org.elasticsearch.ingest.core.Processor; +import org.elasticsearch.script.ScriptService; import org.elasticsearch.test.ESTestCase; import org.junit.Before; @@ -58,8 +60,8 @@ public class SimulatePipelineRequestParsingTests extends ESTestCase { CompoundProcessor pipelineCompoundProcessor = new CompoundProcessor(processor); Pipeline pipeline = new Pipeline(SIMULATED_PIPELINE_ID, null, pipelineCompoundProcessor); ProcessorsRegistry.Builder processorRegistryBuilder = new ProcessorsRegistry.Builder(); - processorRegistryBuilder.registerProcessor("mock_processor", ((templateService, registry) -> mock(Processor.Factory.class))); - ProcessorsRegistry processorRegistry = processorRegistryBuilder.build(TestTemplateService.instance()); + processorRegistryBuilder.registerProcessor("mock_processor", ((registry) -> mock(Processor.Factory.class))); + ProcessorsRegistry processorRegistry = processorRegistryBuilder.build(mock(ScriptService.class), mock(ClusterService.class)); store = mock(PipelineStore.class); when(store.get(SIMULATED_PIPELINE_ID)).thenReturn(pipeline); when(store.getProcessorRegistry()).thenReturn(processorRegistry); |