blob: dbd44cc3309e55f3bc7f422dc62dbe1b7cdbceee (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
# frozen_string_literal: true
require 'spec_helper'
RSpec.describe Gitlab::Usage::Metrics::Instrumentations::PrometheusEnabledMetric, feature_category: :service_ping do
before do
allow(Gitlab::Prometheus::Internal).to receive(:prometheus_enabled?).and_return(expected_value)
end
[true, false].each do |setting|
context "when the setting is #{setting}" do
let(:expected_value) { setting }
it_behaves_like 'a correct instrumented metric value', { time_frame: 'none' }
end
end
end
|