diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-18 03:09:20 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-18 03:09:20 +0300 |
commit | 72721699f11187199e89631ce0b5e3d2f7c167e9 (patch) | |
tree | b51a227be89d82aa24fc954e7b50e7b0933583cc /spec/lib/gitlab/metrics | |
parent | 06be418a7cd98a1c87c41ba43cca1ce9acbe885e (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib/gitlab/metrics')
-rw-r--r-- | spec/lib/gitlab/metrics/dashboard/processor_spec.rb | 15 |
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 |