Skip to content

Refactor monitor core tests

Sofia Vistas requested to merge refactor-monitor-core-tests into master

What does this MR do?

This MR refactors several aspects of the custom metrics test:

  • due to the migration of custom metrics to core:
  1. added new selectorsapp/views/projects/services/prometheus/_custom_metrics.html.haml
  2. removed custom metric related logic from qa/qa/ee/page/project/operations/metrics/show.rb
  3. created a component to store the new custom metric logic in core in qa/qa/page/component/custom_metric.rb due to being able to reuse it in a model or within qa/qa/page/project/settings/services/prometheus.rb
  • added missing edit and delete of custom metric verifications by using the prometheus integrations page modeled by qa/qa/page/project/settings/integrations.rb and qa/qa/page/project/settings/services/prometheus.rb
  • Fixed issue with runner by adding the correct tag in qa/qa/fixtures/monitored_auto_devops/.gitlab-ci.yml
  • The logic of the test is purposely condensed in order to have one common setup. This is not the known pattern followed in many of our specs but a necessary alternative due to the costly setup of a project to be monitored
Edited by 🤖 GitLab Bot 🤖

Merge request reports