setup: - do: ingest.put_pipeline: id: "pipeline1" body: > { "description": "_description", "processors": [ { "set" : { "field" : "field1", "value": "value1" } } ] } - do: ingest.put_pipeline: id: "pipeline2" body: > { "description": "_description", "processors": [ { "set" : { "field" : "field2", "value": "value2" } } ] } --- teardown: - do: ingest.delete_pipeline: id: "pipeline1" ignore: 404 - do: ingest.delete_pipeline: id: "pipeline2" ignore: 404 --- "Test bulk request without default pipeline": - do: bulk: body: - index: _index: test_index _id: test_id1 pipeline: pipeline1 - f1: v1 - index: _index: test_index _id: test_id2 - f1: v2 - gte: { ingest_took: 0 } - do: get: index: test_index id: test_id1 - match: {_source.field1: value1} - is_false: _source.field2 - do: get: index: test_index id: test_id2 - is_false: _source.field1 - is_false: _source.field2 - do: cluster.state: {} # Get cluster-manager node id - set: { cluster_manager_node: cluster_manager } - do: nodes.stats: metric: [ ingest ] #we can't assert anything here since we might have more than one node in the cluster - gte: {nodes.$cluster_manager.ingest.total.count: 0} - gte: {nodes.$cluster_manager.ingest.total.failed: 0} - gte: {nodes.$cluster_manager.ingest.total.time_in_millis: 0} - match: {nodes.$cluster_manager.ingest.total.current: 0} - gte: {nodes.$cluster_manager.ingest.pipelines.pipeline1.count: 0} - match: {nodes.$cluster_manager.ingest.pipelines.pipeline1.failed: 0} - gte: {nodes.$cluster_manager.ingest.pipelines.pipeline1.time_in_millis: 0} - match: {nodes.$cluster_manager.ingest.pipelines.pipeline1.current: 0} --- "Test bulk request with default pipeline": - do: bulk: pipeline: pipeline1 body: - index: _index: test_index _id: test_id1 - f1: v1 - index: _index: test_index _id: test_id2 pipeline: pipeline2 - f1: v2 - gte: { ingest_took: 0 } - do: cluster.state: {} # Get cluster-manager node id - set: { cluster_manager_node: cluster_manager } - do: nodes.stats: metric: [ ingest ] #we can't assert anything here since we might have more than one node in the cluster - gte: {nodes.$cluster_manager.ingest.total.count: 0} - gte: {nodes.$cluster_manager.ingest.total.failed: 0} - gte: {nodes.$cluster_manager.ingest.total.time_in_millis: 0} - match: {nodes.$cluster_manager.ingest.total.current: 0} - gte: {nodes.$cluster_manager.ingest.pipelines.pipeline2.count: 0} - match: {nodes.$cluster_manager.ingest.pipelines.pipeline2.failed: 0} - gte: {nodes.$cluster_manager.ingest.pipelines.pipeline2.time_in_millis: 0} - match: {nodes.$cluster_manager.ingest.pipelines.pipeline2.current: 0} - do: get: index: test_index id: test_id1 - match: {_source.field1: value1} - is_false: _source.field2 - do: get: index: test_index id: test_id2 - is_false: _source.field1 - match: {_source.field2: value2}