summaryrefslogtreecommitdiff
path: root/spec/services/ci/prometheus_metrics/observe_histograms_service_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/services/ci/prometheus_metrics/observe_histograms_service_spec.rb')
-rw-r--r--spec/services/ci/prometheus_metrics/observe_histograms_service_spec.rb27
1 files changed, 1 insertions, 26 deletions
diff --git a/spec/services/ci/prometheus_metrics/observe_histograms_service_spec.rb b/spec/services/ci/prometheus_metrics/observe_histograms_service_spec.rb
index 2eef852b0f4..0b100af5902 100644
--- a/spec/services/ci/prometheus_metrics/observe_histograms_service_spec.rb
+++ b/spec/services/ci/prometheus_metrics/observe_histograms_service_spec.rb
@@ -4,6 +4,7 @@ require 'spec_helper'
RSpec.describe Ci::PrometheusMetrics::ObserveHistogramsService do
let_it_be(:project) { create(:project) }
+
let(:params) { {} }
subject(:execute) { described_class.new(project, params).execute }
@@ -54,32 +55,6 @@ RSpec.describe Ci::PrometheusMetrics::ObserveHistogramsService do
end
end
- context 'with feature flag disabled' do
- before do
- stub_feature_flags(ci_accept_frontend_prometheus_metrics: false)
- end
-
- let(:params) do
- {
- histograms: [
- { name: 'pipeline_graph_link_calculation_duration_seconds', value: '4' }
- ]
- }
- end
-
- it 'does not register the metrics' do
- execute
-
- expect(histogram_data).to be_nil
- end
-
- it 'returns an empty body and status code' do
- is_expected.to be_success
- expect(subject.http_status).to eq(:accepted)
- expect(subject.payload).to eq({})
- end
- end
-
def histogram_data(name = :pipeline_graph_link_calculation_duration_seconds)
Gitlab::Metrics.registry.get(name)&.get({})
end