summaryrefslogtreecommitdiff
path: root/spec/support
diff options
context:
space:
mode:
authorSarah Yasonik <syasonik@gitlab.com>2019-08-07 16:17:35 +0000
committerSean McGivern <sean@gitlab.com>2019-08-07 16:17:35 +0000
commitbf918b68f643266e91a9308cbc64a8304c647f17 (patch)
treeddface6092de44fafe2e0929158fc65d92766f47 /spec/support
parentd8966abd20c860d2f30141f3647f2b81f70b683d (diff)
downloadgitlab-ce-bf918b68f643266e91a9308cbc64a8304c647f17.tar.gz
Support dashboard params for metrics dashboard
https://gitlab.com/gitlab-org/gitlab-ce/issues/62971 Adds support to EnvironmentsController#metrics_dashboard for the following params: group, title, y_label These params are used to uniquely identify a panel on the metrics dashboard. Metrics are stored in several places, so this adds utilities to find a specific panel from the database or filesystem depending on the metric specified. Also moves some shared utilities into separate classes, notably default values and errors.
Diffstat (limited to 'spec/support')
-rw-r--r--spec/support/helpers/metrics_dashboard_helpers.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/support/helpers/metrics_dashboard_helpers.rb b/spec/support/helpers/metrics_dashboard_helpers.rb
index 1511a2f6b49..0e86b6dfda7 100644
--- a/spec/support/helpers/metrics_dashboard_helpers.rb
+++ b/spec/support/helpers/metrics_dashboard_helpers.rb
@@ -18,6 +18,14 @@ module MetricsDashboardHelpers
project.repository.refresh_method_caches([:metrics_dashboard])
end
+ def system_dashboard_path
+ Metrics::Dashboard::SystemDashboardService::SYSTEM_DASHBOARD_PATH
+ end
+
+ def business_metric_title
+ PrometheusMetricEnums.group_details[:business][:group_title]
+ end
+
shared_examples_for 'misconfigured dashboard service response' do |status_code|
it 'returns an appropriate message and status code' do
result = service_call