diff options
Diffstat (limited to 'spec/lib/gitlab/metrics/dashboard')
4 files changed, 47 insertions, 47 deletions
diff --git a/spec/lib/gitlab/metrics/dashboard/defaults_spec.rb b/spec/lib/gitlab/metrics/dashboard/defaults_spec.rb index 1f306753c39..b8556829a59 100644 --- a/spec/lib/gitlab/metrics/dashboard/defaults_spec.rb +++ b/spec/lib/gitlab/metrics/dashboard/defaults_spec.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require 'spec_helper' +require 'fast_spec_helper' RSpec.describe Gitlab::Metrics::Dashboard::Defaults do it { is_expected.to be_const_defined(:DEFAULT_PANEL_TYPE) } diff --git a/spec/lib/gitlab/metrics/dashboard/importers/prometheus_metrics_spec.rb b/spec/lib/gitlab/metrics/dashboard/importers/prometheus_metrics_spec.rb index c15e717b126..bc6cd383758 100644 --- a/spec/lib/gitlab/metrics/dashboard/importers/prometheus_metrics_spec.rb +++ b/spec/lib/gitlab/metrics/dashboard/importers/prometheus_metrics_spec.rb @@ -24,13 +24,13 @@ RSpec.describe Gitlab::Metrics::Dashboard::Importers::PrometheusMetrics do context 'with existing metrics' do let(:existing_metric_attributes) do { - project: project, - identifier: 'metric_b', - title: 'overwrite', - y_label: 'overwrite', - query: 'overwrite', - unit: 'overwrite', - legend: 'overwrite', + project: project, + identifier: 'metric_b', + title: 'overwrite', + y_label: 'overwrite', + query: 'overwrite', + unit: 'overwrite', + legend: 'overwrite', dashboard_path: dashboard_path } end @@ -43,11 +43,11 @@ RSpec.describe Gitlab::Metrics::Dashboard::Importers::PrometheusMetrics do subject.execute expect(existing_metric.reload.attributes.with_indifferent_access).to include({ - title: 'Super Chart B', + title: 'Super Chart B', y_label: 'y_label', - query: 'query', - unit: 'unit', - legend: 'Legend Label' + query: 'query', + unit: 'unit', + legend: 'Legend Label' }) end @@ -69,11 +69,11 @@ RSpec.describe Gitlab::Metrics::Dashboard::Importers::PrometheusMetrics do subject.execute expect(existing_metric.reload.attributes.with_indifferent_access).to include({ - title: 'Super Chart B', + title: 'Super Chart B', y_label: 'y_label', - query: 'query', - unit: 'unit', - legend: 'Legend Label' + query: 'query', + unit: 'unit', + legend: 'Legend Label' }) end diff --git a/spec/lib/gitlab/metrics/dashboard/validator/errors_spec.rb b/spec/lib/gitlab/metrics/dashboard/validator/errors_spec.rb index fdbba6c31b5..a50c2a506cb 100644 --- a/spec/lib/gitlab/metrics/dashboard/validator/errors_spec.rb +++ b/spec/lib/gitlab/metrics/dashboard/validator/errors_spec.rb @@ -17,11 +17,11 @@ RSpec.describe Gitlab::Metrics::Dashboard::Validator::Errors do let(:error_hash) do { - 'data' => 'property_name', + 'data' => 'property_name', 'data_pointer' => pointer, - 'type' => type, - 'schema' => 'schema', - 'details' => details + 'type' => type, + 'schema' => 'schema', + 'details' => details } end @@ -72,10 +72,10 @@ RSpec.describe Gitlab::Metrics::Dashboard::Validator::Errors do let(:type) { 'pattern' } let(:error_hash) do { - 'data' => 'property_name', + 'data' => 'property_name', 'data_pointer' => pointer, - 'type' => type, - 'schema' => { 'pattern' => 'aa.*' } + 'type' => type, + 'schema' => { 'pattern' => 'aa.*' } } end @@ -86,10 +86,10 @@ RSpec.describe Gitlab::Metrics::Dashboard::Validator::Errors do let(:type) { 'format' } let(:error_hash) do { - 'data' => 'property_name', + 'data' => 'property_name', 'data_pointer' => pointer, - 'type' => type, - 'schema' => { 'format' => 'date-time' } + 'type' => type, + 'schema' => { 'format' => 'date-time' } } end @@ -100,10 +100,10 @@ RSpec.describe Gitlab::Metrics::Dashboard::Validator::Errors do let(:type) { 'const' } let(:error_hash) do { - 'data' => 'property_name', + 'data' => 'property_name', 'data_pointer' => pointer, - 'type' => type, - 'schema' => { 'const' => 'one' } + 'type' => type, + 'schema' => { 'const' => 'one' } } end @@ -114,10 +114,10 @@ RSpec.describe Gitlab::Metrics::Dashboard::Validator::Errors do let(:type) { 'enum' } let(:error_hash) do { - 'data' => 'property_name', + 'data' => 'property_name', 'data_pointer' => pointer, - 'type' => type, - 'schema' => { 'enum' => %w(one two) } + 'type' => type, + 'schema' => { 'enum' => %w(one two) } } end @@ -128,10 +128,10 @@ RSpec.describe Gitlab::Metrics::Dashboard::Validator::Errors do let(:type) { 'unknown' } let(:error_hash) do { - 'data' => 'property_name', + 'data' => 'property_name', 'data_pointer' => pointer, - 'type' => type, - 'schema' => 'schema' + 'type' => type, + 'schema' => 'schema' } end diff --git a/spec/lib/gitlab/metrics/dashboard/validator_spec.rb b/spec/lib/gitlab/metrics/dashboard/validator_spec.rb index eb67ea2b7da..aaa9daf8fee 100644 --- a/spec/lib/gitlab/metrics/dashboard/validator_spec.rb +++ b/spec/lib/gitlab/metrics/dashboard/validator_spec.rb @@ -33,9 +33,9 @@ RSpec.describe Gitlab::Metrics::Dashboard::Validator do context 'with metric identifier present in current dashboard' do before do create(:prometheus_metric, - identifier: 'metric_a1', + identifier: 'metric_a1', dashboard_path: 'test/path.yml', - project: project + project: project ) end @@ -45,9 +45,9 @@ RSpec.describe Gitlab::Metrics::Dashboard::Validator do context 'with metric identifier present in another dashboard' do before do create(:prometheus_metric, - identifier: 'metric_a1', + identifier: 'metric_a1', dashboard_path: 'some/other/dashboard/path.yml', - project: project + project: project ) end @@ -94,9 +94,9 @@ RSpec.describe Gitlab::Metrics::Dashboard::Validator do context 'with metric identifier present in current dashboard' do before do create(:prometheus_metric, - identifier: 'metric_a1', + identifier: 'metric_a1', dashboard_path: 'test/path.yml', - project: project + project: project ) end @@ -106,9 +106,9 @@ RSpec.describe Gitlab::Metrics::Dashboard::Validator do context 'with metric identifier present in another dashboard' do before do create(:prometheus_metric, - identifier: 'metric_a1', + identifier: 'metric_a1', dashboard_path: 'some/other/dashboard/path.yml', - project: project + project: project ) end @@ -166,9 +166,9 @@ RSpec.describe Gitlab::Metrics::Dashboard::Validator do context 'with metric identifier present in current dashboard' do before do create(:prometheus_metric, - identifier: 'metric_a1', + identifier: 'metric_a1', dashboard_path: 'test/path.yml', - project: project + project: project ) end @@ -178,9 +178,9 @@ RSpec.describe Gitlab::Metrics::Dashboard::Validator do context 'with metric identifier present in another dashboard' do before do create(:prometheus_metric, - identifier: 'metric_a1', + identifier: 'metric_a1', dashboard_path: 'some/other/dashboard/path.yml', - project: project + project: project ) end |