debian-mirror-gitlab/spec/services/metrics/global_metrics_update_service_spec.rb
2023-06-20 00:43:36 +05:30

14 lines
435 B
Ruby

# 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