Search in sources :

Example 6 with PipelineConfiguration

use of org.opensearch.ingest.PipelineConfiguration in project OpenSearch by opensearch-project.

the class GetPipelineResponseTests method mutateInstance.

@Override
protected GetPipelineResponse mutateInstance(GetPipelineResponse response) {
    try {
        List<PipelineConfiguration> clonePipelines = new ArrayList<>(response.pipelines());
        clonePipelines.add(createRandomPipeline("pipeline_" + clonePipelines.size() + 1));
        return new GetPipelineResponse(clonePipelines);
    } catch (IOException e) {
        throw new UncheckedIOException(e);
    }
}
Also used : ArrayList(java.util.ArrayList) UncheckedIOException(java.io.UncheckedIOException) PipelineConfiguration(org.opensearch.ingest.PipelineConfiguration) IOException(java.io.IOException) UncheckedIOException(java.io.UncheckedIOException)

Aggregations

PipelineConfiguration (org.opensearch.ingest.PipelineConfiguration)6 XContentBuilder (org.opensearch.common.xcontent.XContentBuilder)4 ArrayList (java.util.ArrayList)2 IOException (java.io.IOException)1 UncheckedIOException (java.io.UncheckedIOException)1 Matchers.containsString (org.hamcrest.Matchers.containsString)1 GetPipelineRequest (org.opensearch.action.ingest.GetPipelineRequest)1 GetPipelineResponse (org.opensearch.action.ingest.GetPipelineResponse)1 PutPipelineRequest (org.opensearch.action.ingest.PutPipelineRequest)1 XContentParser (org.opensearch.common.xcontent.XContentParser)1