diff --git a/lib/pact_broker/matrix/row.rb b/lib/pact_broker/matrix/row.rb index ee5327b6f..dfde836f5 100644 --- a/lib/pact_broker/matrix/row.rb +++ b/lib/pact_broker/matrix/row.rb @@ -7,7 +7,6 @@ module PactBroker module Matrix - class Row < Sequel::Model(:matrix) # Used when using table_print to output query results diff --git a/lib/pact_broker/metrics/service.rb b/lib/pact_broker/metrics/service.rb index c3cf68fb6..67af5bc7c 100644 --- a/lib/pact_broker/metrics/service.rb +++ b/lib/pact_broker/metrics/service.rb @@ -8,6 +8,8 @@ require 'pact_broker/webhooks/webhook' require 'pact_broker/webhooks/triggered_webhook' require 'pact_broker/webhooks/execution' +require 'pact_broker/matrix/row' +require 'pact_broker/matrix/head_row' module PactBroker module Metrics @@ -48,6 +50,12 @@ def metrics }, webhookExecutions: { count: PactBroker::Webhooks::Execution.count + }, + matrix: { + count: PactBroker::Matrix::Row.count + }, + headMatrix: { + count: PactBroker::Matrix::HeadRow.count } } end diff --git a/spec/features/metrics_spec.rb b/spec/features/metrics_spec.rb index 3934e68ae..99089905d 100644 --- a/spec/features/metrics_spec.rb +++ b/spec/features/metrics_spec.rb @@ -18,6 +18,6 @@ end it "returns some metrics" do - expect(json_response_body).to be_instance_of(Hash) + expect(json_response_body[:pacticipants]).to be_instance_of(Hash) end end