Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab_config_metric_spec.rb « instrumentations « metrics « usage « gitlab « lib « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: e9814f0cb51bd38902adaf9343c5fe46284471a6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# frozen_string_literal: true

require 'spec_helper'

RSpec.describe Gitlab::Usage::Metrics::Instrumentations::GitlabConfigMetric, feature_category: :service_ping do
  describe 'config metric' do
    using RSpec::Parameterized::TableSyntax

    where(:config_value, :expected_value) do
      false | false
      true  | true
    end

    with_them do
      before do
        stub_config(artifacts: { object_store: { enabled: config_value } })
      end

      it_behaves_like 'a correct instrumented metric value', {
        time_frame: 'none',
        options: {
          config: {
            artifacts: {
              object_store: 'enabled'
            }
          }
        }
      }
    end
  end
end