Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
kaisecheng committed Feb 28, 2025
1 parent 8819899 commit c0b4cdb
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions qa/integration/services/monitoring_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ def pipeline_stats(pipeline_id)
stats_response.fetch("pipelines").fetch(pipeline_id)
end

def pipelines_stats
resp = Manticore.get("http://localhost:#{@port}/_node/stats/pipelines").body
stats_response = JSON.parse(resp)
stats_response.fetch("pipelines")
end

def event_stats
resp = Manticore.get("http://localhost:#{@port}/_node/stats").body
stats_response = JSON.parse(resp)
Expand Down
6 changes: 6 additions & 0 deletions x-pack/qa/integration/monitoring/direct_shipping_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@

include_examples "record monitoring data to es"

it "gives pipelines stats" do
api = MonitoringAPI.new
stats = api.pipelines_stats
expect(stats.keys).not_to be_nil
end

after :all do
@logstash_service.stop unless @logstash_service.nil?
@elasticsearch_service.stop unless @elasticsearch_service.nil?
Expand Down

0 comments on commit c0b4cdb

Please sign in to comment.