diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-07-20 15:26:25 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-07-20 15:26:25 +0300 |
commit | a09983ae35713f5a2bbb100981116d31ce99826e (patch) | |
tree | 2ee2af7bd104d57086db360a7e6d8c9d5d43667a /spec/services/metrics | |
parent | 18c5ab32b738c0b6ecb4d0df3994000482f34bd8 (diff) |
Add latest changes from gitlab-org/gitlab@13-2-stable-ee
Diffstat (limited to 'spec/services/metrics')
19 files changed, 227 insertions, 36 deletions
diff --git a/spec/services/metrics/dashboard/annotations/create_service_spec.rb b/spec/services/metrics/dashboard/annotations/create_service_spec.rb index 7dabca3c860..c3fe7238047 100644 --- a/spec/services/metrics/dashboard/annotations/create_service_spec.rb +++ b/spec/services/metrics/dashboard/annotations/create_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Metrics::Dashboard::Annotations::CreateService do +RSpec.describe Metrics::Dashboard::Annotations::CreateService do let_it_be(:user) { create(:user) } let(:description) { 'test annotation' } let(:dashboard_path) { 'config/prometheus/common_metrics.yml' } diff --git a/spec/services/metrics/dashboard/annotations/delete_service_spec.rb b/spec/services/metrics/dashboard/annotations/delete_service_spec.rb index 95825db6902..ec2bd3772bf 100644 --- a/spec/services/metrics/dashboard/annotations/delete_service_spec.rb +++ b/spec/services/metrics/dashboard/annotations/delete_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Metrics::Dashboard::Annotations::DeleteService do +RSpec.describe Metrics::Dashboard::Annotations::DeleteService do let(:user) { create(:user) } let(:service_instance) { described_class.new(user, annotation) } diff --git a/spec/services/metrics/dashboard/clone_dashboard_service_spec.rb b/spec/services/metrics/dashboard/clone_dashboard_service_spec.rb index 3d26ab2ede5..4a226fe386c 100644 --- a/spec/services/metrics/dashboard/clone_dashboard_service_spec.rb +++ b/spec/services/metrics/dashboard/clone_dashboard_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Metrics::Dashboard::CloneDashboardService, :use_clean_rails_memory_store_caching do +RSpec.describe Metrics::Dashboard::CloneDashboardService, :use_clean_rails_memory_store_caching do include MetricsDashboardHelpers let_it_be(:user) { create(:user) } @@ -81,7 +81,22 @@ describe Metrics::Dashboard::CloneDashboardService, :use_clean_rails_memory_stor allow(::Gitlab::Metrics::Dashboard::Processor).to receive(:new).and_return(double(process: file_content_hash)) end - it_behaves_like 'valid dashboard cloning process', ::Metrics::Dashboard::SystemDashboardService::DASHBOARD_PATH, [::Gitlab::Metrics::Dashboard::Stages::CommonMetricsInserter, ::Gitlab::Metrics::Dashboard::Stages::CustomMetricsInserter, ::Gitlab::Metrics::Dashboard::Stages::Sorter] + it_behaves_like 'valid dashboard cloning process', ::Metrics::Dashboard::SystemDashboardService::DASHBOARD_PATH, + [ + ::Gitlab::Metrics::Dashboard::Stages::CommonMetricsInserter, + ::Gitlab::Metrics::Dashboard::Stages::CustomMetricsInserter, + ::Gitlab::Metrics::Dashboard::Stages::Sorter + ] + + it_behaves_like 'valid dashboard cloning process', ::Metrics::Dashboard::ClusterDashboardService::DASHBOARD_PATH, + [ + ::Gitlab::Metrics::Dashboard::Stages::CommonMetricsInserter, + ::Gitlab::Metrics::Dashboard::Stages::Sorter + ] + + it_behaves_like 'valid dashboard cloning process', + ::Metrics::Dashboard::SelfMonitoringDashboardService::DASHBOARD_PATH, + [::Gitlab::Metrics::Dashboard::Stages::CustomMetricsInserter] context 'selected branch already exists' do let(:branch) { 'existing_branch' } diff --git a/spec/services/metrics/dashboard/cluster_dashboard_service_spec.rb b/spec/services/metrics/dashboard/cluster_dashboard_service_spec.rb new file mode 100644 index 00000000000..f2e32d5eb35 --- /dev/null +++ b/spec/services/metrics/dashboard/cluster_dashboard_service_spec.rb @@ -0,0 +1,59 @@ +# frozen_string_literal: true + +require 'spec_helper' + +RSpec.describe Metrics::Dashboard::ClusterDashboardService, :use_clean_rails_memory_store_caching do + include MetricsDashboardHelpers + + let_it_be(:user) { create(:user) } + let_it_be(:cluster_project) { create(:cluster_project) } + let_it_be(:cluster) { cluster_project.cluster } + let_it_be(:project) { cluster_project.project } + + before do + project.add_maintainer(user) + end + + describe '.valid_params?' do + let(:params) { { cluster: cluster, embedded: 'false' } } + + subject { described_class.valid_params?(params) } + + it { is_expected.to be_truthy } + + context 'with matching dashboard_path' do + let(:params) { { dashboard_path: ::Metrics::Dashboard::ClusterDashboardService::DASHBOARD_PATH } } + + it { is_expected.to be_truthy } + end + + context 'missing cluster without dashboard_path' do + let(:params) { {} } + + it { is_expected.to be_falsey } + end + end + + describe '#get_dashboard' do + let(:service_params) { [project, user, { cluster: cluster, cluster_type: :project }] } + let(:service_call) { subject.get_dashboard } + + subject { described_class.new(*service_params) } + + it_behaves_like 'valid dashboard service response' + it_behaves_like 'caches the unprocessed dashboard for subsequent calls' + it_behaves_like 'refreshes cache when dashboard_version is changed' + + it_behaves_like 'dashboard_version contains SHA256 hash of dashboard file content' do + let(:dashboard_path) { described_class::DASHBOARD_PATH } + let(:dashboard_version) { subject.send(:dashboard_version) } + end + + context 'when called with a non-system dashboard' do + let(:dashboard_path) { 'garbage/dashboard/path' } + + # We want to always return the cluster dashboard. + it_behaves_like 'valid dashboard service response' + end + end +end diff --git a/spec/services/metrics/dashboard/cluster_metrics_embed_service_spec.rb b/spec/services/metrics/dashboard/cluster_metrics_embed_service_spec.rb new file mode 100644 index 00000000000..e80911d6265 --- /dev/null +++ b/spec/services/metrics/dashboard/cluster_metrics_embed_service_spec.rb @@ -0,0 +1,72 @@ +# frozen_string_literal: true + +require 'spec_helper' + +RSpec.describe Metrics::Dashboard::ClusterMetricsEmbedService, :use_clean_rails_memory_store_caching do + include MetricsDashboardHelpers + using RSpec::Parameterized::TableSyntax + + let_it_be(:user) { create(:user) } + let_it_be(:cluster_project) { create(:cluster_project) } + let_it_be(:cluster) { cluster_project.cluster } + let_it_be(:project) { cluster_project.project } + + before do + project.add_maintainer(user) + end + + describe '.valid_params?' do + let(:valid_params) { { cluster: 1, embedded: 'true', group: 'hello', title: 'world', y_label: 'countries' } } + + subject { described_class } + + it { expect(subject.valid_params?(valid_params)).to be_truthy } + + context 'missing all params' do + let(:params) { {} } + + it { expect(subject.valid_params?(params)).to be_falsy } + end + + [:cluster, :embedded, :group, :title, :y_label].each do |param_key| + it 'returns false with missing param' do + params = valid_params.except(param_key) + + expect(subject.valid_params?(params)).to be_falsy + end + end + end + + describe '#get_dashboard' do + let(:service_params) do + [ + project, + user, + { + cluster: cluster, + cluster_type: :project, + embedded: 'true', + group: 'Cluster Health', + title: 'CPU Usage', + y_label: 'CPU (cores)' + } + ] + end + let(:service_call) { described_class.new(*service_params).get_dashboard } + let(:panel_groups) { service_call[:dashboard][:panel_groups] } + let(:panel) { panel_groups.first[:panels].first } + + it_behaves_like 'valid embedded dashboard service response' + it_behaves_like 'caches the unprocessed dashboard for subsequent calls' + + it 'returns one panel' do + expect(panel_groups.size).to eq 1 + expect(panel_groups.first[:panels].size).to eq 1 + end + + it 'returns panel by title and y_label' do + expect(panel[:title]).to eq(service_params.last[:title]) + expect(panel[:y_label]).to eq(service_params.last[:y_label]) + end + end +end diff --git a/spec/services/metrics/dashboard/custom_dashboard_service_spec.rb b/spec/services/metrics/dashboard/custom_dashboard_service_spec.rb index 4966b83bbab..d4391ecb6b9 100644 --- a/spec/services/metrics/dashboard/custom_dashboard_service_spec.rb +++ b/spec/services/metrics/dashboard/custom_dashboard_service_spec.rb @@ -2,24 +2,31 @@ require 'spec_helper' -describe Metrics::Dashboard::CustomDashboardService, :use_clean_rails_memory_store_caching do +RSpec.describe Metrics::Dashboard::CustomDashboardService, :use_clean_rails_memory_store_caching do include MetricsDashboardHelpers let_it_be(:user) { create(:user) } let_it_be(:project) { create(:project) } let_it_be(:environment) { create(:environment, project: project) } + let(:dashboard_path) { '.gitlab/dashboards/test.yml' } + let(:service_params) { [project, user, { environment: environment, dashboard_path: dashboard_path }] } + + subject { described_class.new(*service_params) } + before do project.add_maintainer(user) end + describe '#raw_dashboard' do + let(:project) { project_with_dashboard(dashboard_path) } + + it_behaves_like '#raw_dashboard raises error if dashboard loading fails' + end + describe '#get_dashboard' do - let(:dashboard_path) { '.gitlab/dashboards/test.yml' } - let(:service_params) { [project, user, { environment: environment, dashboard_path: dashboard_path }] } let(:service_call) { subject.get_dashboard } - subject { described_class.new(*service_params) } - context 'when the dashboard does not exist' do it_behaves_like 'misconfigured dashboard service response', :not_found @@ -92,7 +99,8 @@ describe Metrics::Dashboard::CustomDashboardService, :use_clean_rails_memory_sto path: dashboard_path, display_name: 'test.yml', default: false, - system_dashboard: false + system_dashboard: false, + out_of_the_box_dashboard: false }] ) end diff --git a/spec/services/metrics/dashboard/custom_metric_embed_service_spec.rb b/spec/services/metrics/dashboard/custom_metric_embed_service_spec.rb index 1a9ddc87ab0..a5f7c2ab8ab 100644 --- a/spec/services/metrics/dashboard/custom_metric_embed_service_spec.rb +++ b/spec/services/metrics/dashboard/custom_metric_embed_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Metrics::Dashboard::CustomMetricEmbedService do +RSpec.describe Metrics::Dashboard::CustomMetricEmbedService do include MetricsDashboardHelpers let_it_be(:project, reload: true) { build(:project) } diff --git a/spec/services/metrics/dashboard/default_embed_service_spec.rb b/spec/services/metrics/dashboard/default_embed_service_spec.rb index 8e32316433d..2ce10eac026 100644 --- a/spec/services/metrics/dashboard/default_embed_service_spec.rb +++ b/spec/services/metrics/dashboard/default_embed_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Metrics::Dashboard::DefaultEmbedService, :use_clean_rails_memory_store_caching do +RSpec.describe Metrics::Dashboard::DefaultEmbedService, :use_clean_rails_memory_store_caching do include MetricsDashboardHelpers let_it_be(:project) { build(:project) } diff --git a/spec/services/metrics/dashboard/dynamic_embed_service_spec.rb b/spec/services/metrics/dashboard/dynamic_embed_service_spec.rb index ee75284b4ce..72b356be60f 100644 --- a/spec/services/metrics/dashboard/dynamic_embed_service_spec.rb +++ b/spec/services/metrics/dashboard/dynamic_embed_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Metrics::Dashboard::DynamicEmbedService, :use_clean_rails_memory_store_caching do +RSpec.describe Metrics::Dashboard::DynamicEmbedService, :use_clean_rails_memory_store_caching do include MetricsDashboardHelpers let_it_be(:project) { build(:project) } diff --git a/spec/services/metrics/dashboard/gitlab_alert_embed_service_spec.rb b/spec/services/metrics/dashboard/gitlab_alert_embed_service_spec.rb index a66150be42c..29c941826b5 100644 --- a/spec/services/metrics/dashboard/gitlab_alert_embed_service_spec.rb +++ b/spec/services/metrics/dashboard/gitlab_alert_embed_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Metrics::Dashboard::GitlabAlertEmbedService do +RSpec.describe Metrics::Dashboard::GitlabAlertEmbedService do include MetricsDashboardHelpers let_it_be(:alert) { create(:prometheus_alert) } diff --git a/spec/services/metrics/dashboard/grafana_metric_embed_service_spec.rb b/spec/services/metrics/dashboard/grafana_metric_embed_service_spec.rb index 3547e1f0f8c..ee3c55cb642 100644 --- a/spec/services/metrics/dashboard/grafana_metric_embed_service_spec.rb +++ b/spec/services/metrics/dashboard/grafana_metric_embed_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Metrics::Dashboard::GrafanaMetricEmbedService do +RSpec.describe Metrics::Dashboard::GrafanaMetricEmbedService do include MetricsDashboardHelpers include ReactiveCachingHelpers include GrafanaApiHelpers @@ -182,7 +182,7 @@ describe Metrics::Dashboard::GrafanaMetricEmbedService do end end -describe Metrics::Dashboard::GrafanaUidParser do +RSpec.describe Metrics::Dashboard::GrafanaUidParser do let_it_be(:grafana_integration) { create(:grafana_integration) } let_it_be(:project) { grafana_integration.project } @@ -213,7 +213,7 @@ describe Metrics::Dashboard::GrafanaUidParser do end end -describe Metrics::Dashboard::DatasourceNameParser do +RSpec.describe Metrics::Dashboard::DatasourceNameParser do include GrafanaApiHelpers let(:grafana_url) { valid_grafana_dashboard_link('https://gitlab.grafana.net') } diff --git a/spec/services/metrics/dashboard/pod_dashboard_service_spec.rb b/spec/services/metrics/dashboard/pod_dashboard_service_spec.rb index 1e62a5504a9..ae0e38a04b2 100644 --- a/spec/services/metrics/dashboard/pod_dashboard_service_spec.rb +++ b/spec/services/metrics/dashboard/pod_dashboard_service_spec.rb @@ -2,17 +2,26 @@ require 'spec_helper' -describe Metrics::Dashboard::PodDashboardService, :use_clean_rails_memory_store_caching do +RSpec.describe Metrics::Dashboard::PodDashboardService, :use_clean_rails_memory_store_caching do include MetricsDashboardHelpers let_it_be(:user) { create(:user) } let_it_be(:project) { create(:project) } let_it_be(:environment) { create(:environment, project: project) } + let(:dashboard_path) { described_class::DASHBOARD_PATH } + let(:service_params) { [project, user, { environment: environment, dashboard_path: dashboard_path }] } + before do project.add_maintainer(user) end + subject { described_class.new(*service_params) } + + describe '#raw_dashboard' do + it_behaves_like '#raw_dashboard raises error if dashboard loading fails' + end + describe '.valid_params?' do let(:params) { { dashboard_path: described_class::DASHBOARD_PATH } } @@ -34,14 +43,15 @@ describe Metrics::Dashboard::PodDashboardService, :use_clean_rails_memory_store_ end describe '#get_dashboard' do - let(:dashboard_path) { described_class::DASHBOARD_PATH } - let(:service_params) { [project, user, { environment: environment, dashboard_path: dashboard_path }] } let(:service_call) { subject.get_dashboard } - subject { described_class.new(*service_params) } - it_behaves_like 'valid dashboard service response' it_behaves_like 'caches the unprocessed dashboard for subsequent calls' + it_behaves_like 'refreshes cache when dashboard_version is changed' it_behaves_like 'updates gitlab_metrics_dashboard_processing_time_ms metric' + + it_behaves_like 'dashboard_version contains SHA256 hash of dashboard file content' do + let(:dashboard_version) { subject.send(:dashboard_version) } + end end end diff --git a/spec/services/metrics/dashboard/self_monitoring_dashboard_service_spec.rb b/spec/services/metrics/dashboard/self_monitoring_dashboard_service_spec.rb index 6c9a380a470..aea3e41a013 100644 --- a/spec/services/metrics/dashboard/self_monitoring_dashboard_service_spec.rb +++ b/spec/services/metrics/dashboard/self_monitoring_dashboard_service_spec.rb @@ -2,20 +2,29 @@ require 'spec_helper' -describe Metrics::Dashboard::SelfMonitoringDashboardService, :use_clean_rails_memory_store_caching do +RSpec.describe Metrics::Dashboard::SelfMonitoringDashboardService, :use_clean_rails_memory_store_caching do include MetricsDashboardHelpers let_it_be(:user) { create(:user) } let_it_be(:project) { create(:project) } let_it_be(:environment) { create(:environment, project: project) } + let(:service_params) { [project, user, { environment: environment }] } + before do project.add_maintainer(user) stub_application_setting(self_monitoring_project_id: project.id) end + subject do + described_class.new(service_params) + end + + describe '#raw_dashboard' do + it_behaves_like '#raw_dashboard raises error if dashboard loading fails' + end + describe '#get_dashboard' do - let(:service_params) { [project, user, { environment: environment }] } let(:service_call) { subject.get_dashboard } subject { described_class.new(*service_params) } @@ -23,7 +32,13 @@ describe Metrics::Dashboard::SelfMonitoringDashboardService, :use_clean_rails_me it_behaves_like 'valid dashboard service response' it_behaves_like 'raises error for users with insufficient permissions' it_behaves_like 'caches the unprocessed dashboard for subsequent calls' + it_behaves_like 'refreshes cache when dashboard_version is changed' it_behaves_like 'updates gitlab_metrics_dashboard_processing_time_ms metric' + + it_behaves_like 'dashboard_version contains SHA256 hash of dashboard file content' do + let(:dashboard_path) { described_class::DASHBOARD_PATH } + let(:dashboard_version) { subject.send(:dashboard_version) } + end end describe '.all_dashboard_paths' do @@ -35,7 +50,8 @@ describe Metrics::Dashboard::SelfMonitoringDashboardService, :use_clean_rails_me path: described_class::DASHBOARD_PATH, display_name: described_class::DASHBOARD_NAME, default: true, - system_dashboard: false + system_dashboard: false, + out_of_the_box_dashboard: true }] ) end diff --git a/spec/services/metrics/dashboard/system_dashboard_service_spec.rb b/spec/services/metrics/dashboard/system_dashboard_service_spec.rb index 7d58501ae3f..ced7c29b507 100644 --- a/spec/services/metrics/dashboard/system_dashboard_service_spec.rb +++ b/spec/services/metrics/dashboard/system_dashboard_service_spec.rb @@ -2,29 +2,39 @@ require 'spec_helper' -describe Metrics::Dashboard::SystemDashboardService, :use_clean_rails_memory_store_caching do +RSpec.describe Metrics::Dashboard::SystemDashboardService, :use_clean_rails_memory_store_caching do include MetricsDashboardHelpers let_it_be(:user) { create(:user) } let_it_be(:project) { create(:project) } let_it_be(:environment) { create(:environment, project: project) } + let(:dashboard_path) { described_class::DASHBOARD_PATH } + let(:service_params) { [project, user, { environment: environment, dashboard_path: dashboard_path }] } + + subject { described_class.new(*service_params) } + before do project.add_maintainer(user) end + describe '#raw_dashboard' do + it_behaves_like '#raw_dashboard raises error if dashboard loading fails' + end + describe '#get_dashboard' do - let(:dashboard_path) { described_class::DASHBOARD_PATH } - let(:service_params) { [project, user, { environment: environment, dashboard_path: dashboard_path }] } let(:service_call) { subject.get_dashboard } - subject { described_class.new(*service_params) } - it_behaves_like 'valid dashboard service response' it_behaves_like 'raises error for users with insufficient permissions' it_behaves_like 'caches the unprocessed dashboard for subsequent calls' + it_behaves_like 'refreshes cache when dashboard_version is changed' it_behaves_like 'updates gitlab_metrics_dashboard_processing_time_ms metric' + it_behaves_like 'dashboard_version contains SHA256 hash of dashboard file content' do + let(:dashboard_version) { subject.send(:dashboard_version) } + end + context 'when called with a non-system dashboard' do let(:dashboard_path) { 'garbage/dashboard/path' } @@ -42,7 +52,8 @@ describe Metrics::Dashboard::SystemDashboardService, :use_clean_rails_memory_sto path: described_class::DASHBOARD_PATH, display_name: described_class::DASHBOARD_NAME, default: true, - system_dashboard: true + system_dashboard: true, + out_of_the_box_dashboard: true }] ) end diff --git a/spec/services/metrics/dashboard/transient_embed_service_spec.rb b/spec/services/metrics/dashboard/transient_embed_service_spec.rb index 125fff7c23c..3fd0c97d909 100644 --- a/spec/services/metrics/dashboard/transient_embed_service_spec.rb +++ b/spec/services/metrics/dashboard/transient_embed_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Metrics::Dashboard::TransientEmbedService, :use_clean_rails_memory_store_caching do +RSpec.describe Metrics::Dashboard::TransientEmbedService, :use_clean_rails_memory_store_caching do let_it_be(:project) { build(:project) } let_it_be(:user) { create(:user) } let_it_be(:environment) { create(:environment, project: project) } diff --git a/spec/services/metrics/dashboard/update_dashboard_service_spec.rb b/spec/services/metrics/dashboard/update_dashboard_service_spec.rb index fce027688d9..148005480ea 100644 --- a/spec/services/metrics/dashboard/update_dashboard_service_spec.rb +++ b/spec/services/metrics/dashboard/update_dashboard_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Metrics::Dashboard::UpdateDashboardService, :use_clean_rails_memory_store_caching do +RSpec.describe Metrics::Dashboard::UpdateDashboardService, :use_clean_rails_memory_store_caching do include MetricsDashboardHelpers let_it_be(:user) { create(:user) } diff --git a/spec/services/metrics/sample_metrics_service_spec.rb b/spec/services/metrics/sample_metrics_service_spec.rb index 3b4f7cb8062..b94345500f0 100644 --- a/spec/services/metrics/sample_metrics_service_spec.rb +++ b/spec/services/metrics/sample_metrics_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Metrics::SampleMetricsService do +RSpec.describe Metrics::SampleMetricsService do describe 'query' do let(:range_start) { '2019-12-02T23:31:45.000Z' } let(:range_end) { '2019-12-03T00:01:45.000Z' } diff --git a/spec/services/metrics/users_starred_dashboards/create_service_spec.rb b/spec/services/metrics/users_starred_dashboards/create_service_spec.rb index eac4965ba44..910b556b8dd 100644 --- a/spec/services/metrics/users_starred_dashboards/create_service_spec.rb +++ b/spec/services/metrics/users_starred_dashboards/create_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Metrics::UsersStarredDashboards::CreateService do +RSpec.describe Metrics::UsersStarredDashboards::CreateService do let_it_be(:user) { create(:user) } let(:dashboard_path) { 'config/prometheus/common_metrics.yml' } let(:service_instance) { described_class.new(user, project, dashboard_path) } diff --git a/spec/services/metrics/users_starred_dashboards/delete_service_spec.rb b/spec/services/metrics/users_starred_dashboards/delete_service_spec.rb index 68a2fef5931..5cdffe681eb 100644 --- a/spec/services/metrics/users_starred_dashboards/delete_service_spec.rb +++ b/spec/services/metrics/users_starred_dashboards/delete_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Metrics::UsersStarredDashboards::DeleteService do +RSpec.describe Metrics::UsersStarredDashboards::DeleteService do subject(:service_instance) { described_class.new(user, project, dashboard_path) } let_it_be(:user) { create(:user) } |