Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/lib/gitlab/metrics/dashboard/processor_spec.rb')
-rw-r--r--spec/lib/gitlab/metrics/dashboard/processor_spec.rb15
1 files changed, 14 insertions, 1 deletions
diff --git a/spec/lib/gitlab/metrics/dashboard/processor_spec.rb b/spec/lib/gitlab/metrics/dashboard/processor_spec.rb
index 8c3942c7f7d..e8860d50437 100644
--- a/spec/lib/gitlab/metrics/dashboard/processor_spec.rb
+++ b/spec/lib/gitlab/metrics/dashboard/processor_spec.rb
@@ -12,6 +12,7 @@ describe Gitlab::Metrics::Dashboard::Processor do
[
Gitlab::Metrics::Dashboard::Stages::CommonMetricsInserter,
Gitlab::Metrics::Dashboard::Stages::ProjectMetricsInserter,
+ Gitlab::Metrics::Dashboard::Stages::ProjectMetricsDetailsInserter,
Gitlab::Metrics::Dashboard::Stages::EndpointInserter,
Gitlab::Metrics::Dashboard::Stages::Sorter
]
@@ -25,6 +26,10 @@ describe Gitlab::Metrics::Dashboard::Processor do
end
end
+ it 'includes boolean to indicate if panel group has custom metrics' do
+ expect(dashboard[:panel_groups]).to all(include( { has_custom_metrics: boolean } ))
+ end
+
context 'when the dashboard is not present' do
let(:dashboard_yml) { nil }
@@ -145,7 +150,8 @@ describe Gitlab::Metrics::Dashboard::Processor do
unit: metric.unit,
label: metric.legend,
metric_id: metric.id,
- prometheus_endpoint_path: prometheus_path(metric.query)
+ prometheus_endpoint_path: prometheus_path(metric.query),
+ edit_path: edit_metric_path(metric)
}
end
@@ -165,4 +171,11 @@ describe Gitlab::Metrics::Dashboard::Processor do
identifier: metric
)
end
+
+ def edit_metric_path(metric)
+ Gitlab::Routing.url_helpers.edit_project_prometheus_metric_path(
+ project,
+ metric.id
+ )
+ end
end