Skip to content

Commit c0b4cdb

Browse files
committed
add test
1 parent 8819899 commit c0b4cdb

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

qa/integration/services/monitoring_api.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,12 @@ def pipeline_stats(pipeline_id)
3131
stats_response.fetch("pipelines").fetch(pipeline_id)
3232
end
3333

34+
def pipelines_stats
35+
resp = Manticore.get("http://localhost:#{@port}/_node/stats/pipelines").body
36+
stats_response = JSON.parse(resp)
37+
stats_response.fetch("pipelines")
38+
end
39+
3440
def event_stats
3541
resp = Manticore.get("http://localhost:#{@port}/_node/stats").body
3642
stats_response = JSON.parse(resp)

x-pack/qa/integration/monitoring/direct_shipping_spec.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,12 @@
3131

3232
include_examples "record monitoring data to es"
3333

34+
it "gives pipelines stats" do
35+
api = MonitoringAPI.new
36+
stats = api.pipelines_stats
37+
expect(stats.keys).not_to be_nil
38+
end
39+
3440
after :all do
3541
@logstash_service.stop unless @logstash_service.nil?
3642
@elasticsearch_service.stop unless @elasticsearch_service.nil?

0 commit comments

Comments
 (0)