summaryrefslogtreecommitdiff
path: root/spec/services/metrics
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-12-17 12:08:11 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2019-12-17 12:08:11 +0000
commitbadb9c1deacbea601b02f88811b7e123589d9251 (patch)
treef4b4f85db49a8c9fc9bd6233ed9f7862c9de8ded /spec/services/metrics
parent5bd24a54ef4ce3a38a860eb53b66d062c2382971 (diff)
downloadgitlab-ce-badb9c1deacbea601b02f88811b7e123589d9251.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/services/metrics')
-rw-r--r--spec/services/metrics/dashboard/pod_dashboard_service_spec.rb24
1 files changed, 24 insertions, 0 deletions
diff --git a/spec/services/metrics/dashboard/pod_dashboard_service_spec.rb b/spec/services/metrics/dashboard/pod_dashboard_service_spec.rb
new file mode 100644
index 00000000000..c3993bf71ea
--- /dev/null
+++ b/spec/services/metrics/dashboard/pod_dashboard_service_spec.rb
@@ -0,0 +1,24 @@
+# frozen_string_literal: true
+
+require 'spec_helper'
+
+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) }
+
+ before do
+ project.add_maintainer(user)
+ 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) { described_class.new(*service_params).get_dashboard }
+
+ it_behaves_like 'valid dashboard service response'
+ it_behaves_like 'caches the unprocessed dashboard for subsequent calls'
+ end
+end