diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-01-29 15:09:40 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-01-29 15:09:40 +0000 |
commit | 10052df7536415c192788799b294c9a5ecf07ce7 (patch) | |
tree | 0404e80139c6784aabf4985ee8f4e33d82278c61 /spec/models/prometheus_metric_spec.rb | |
parent | a4df3f0dbbe9a18ee6cadaef0d3313669eb1c7d6 (diff) | |
download | gitlab-ce-10052df7536415c192788799b294c9a5ecf07ce7.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/models/prometheus_metric_spec.rb')
-rw-r--r-- | spec/models/prometheus_metric_spec.rb | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/spec/models/prometheus_metric_spec.rb b/spec/models/prometheus_metric_spec.rb index 9588167bbcc..a20f4edcf4a 100644 --- a/spec/models/prometheus_metric_spec.rb +++ b/spec/models/prometheus_metric_spec.rb @@ -3,6 +3,8 @@ require 'spec_helper' RSpec.describe PrometheusMetric do + using RSpec::Parameterized::TableSyntax + subject { build(:prometheus_metric) } it_behaves_like 'having unique enum values' @@ -14,8 +16,6 @@ RSpec.describe PrometheusMetric do it { is_expected.to validate_uniqueness_of(:identifier).scoped_to(:project_id).allow_nil } describe 'common metrics' do - using RSpec::Parameterized::TableSyntax - where(:common, :with_project, :result) do false | true | true false | false | false @@ -34,8 +34,6 @@ RSpec.describe PrometheusMetric do end describe '#query_series' do - using RSpec::Parameterized::TableSyntax - where(:legend, :type) do 'Some other legend' | NilClass 'Status Code' | Array @@ -72,8 +70,6 @@ RSpec.describe PrometheusMetric do end describe '#priority' do - using RSpec::Parameterized::TableSyntax - where(:group, :priority) do :nginx_ingress_vts | 10 :nginx_ingress | 10 @@ -97,8 +93,6 @@ RSpec.describe PrometheusMetric do end describe '#required_metrics' do - using RSpec::Parameterized::TableSyntax - where(:group, :required_metrics) do :nginx_ingress_vts | %w(nginx_upstream_responses_total nginx_upstream_response_msecs_avg) :nginx_ingress | %w(nginx_ingress_controller_requests nginx_ingress_controller_ingress_upstream_latency_seconds_sum) |