add test for bulk without any request holiding a pipeline id

This commit is contained in:
javanna 2016-01-11 14:56:02 +01:00 committed by Luca Cavanna
parent 21c89e6c5b
commit fad2571ba5
1 changed files with 13 additions and 0 deletions

View File

@ -85,6 +85,19 @@ public class IngestActionFilterTests extends ESTestCase {
verifyZeroInteractions(executionService, actionFilterChain);
}
public void testApplyBulkNoPipelineId() throws Exception {
BulkRequest bulkRequest = new BulkRequest();
bulkRequest.add(new IndexRequest());
Task task = mock(Task.class);
ActionListener actionListener = mock(ActionListener.class);
ActionFilterChain actionFilterChain = mock(ActionFilterChain.class);
filter.apply(task, BulkAction.NAME, bulkRequest, actionListener, actionFilterChain);
verify(actionFilterChain).proceed(task, BulkAction.NAME, bulkRequest, actionListener);
verifyZeroInteractions(executionService, actionFilterChain);
}
@SuppressWarnings("unchecked")
public void testApplyIngestIdViaRequestParam() throws Exception {
Task task = mock(Task.class);