debian-mirror-gitlab/spec/services/metrics/global_metrics_update_service_spec.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
435 B
Ruby
Raw Permalink Normal View History

2023-06-20 00:43:36 +05:30
# frozen_string_literal: true
require 'spec_helper'
RSpec.describe Metrics::GlobalMetricsUpdateService, :prometheus, feature_category: :metrics do
describe '#execute' do
it 'sets gitlab_maintenance_mode gauge metric' do
metric = subject.maintenance_mode_metric
expect(Gitlab).to receive(:maintenance_mode?).and_return(true)
expect { subject.execute }.to change { metric.get }.from(0).to(1)
end
end
end