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

prometheus_alert.rb « factories « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: ad3868c38edc441d312309f6267e4e80336d3f6a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# frozen_string_literal: true

FactoryBot.define do
  factory :prometheus_alert do
    project
    operator { :gt }
    threshold { 1 }

    environment do |alert|
      association(:environment, project: alert.project)
    end

    prometheus_metric do |alert|
      association(:prometheus_metric, project: alert.project)
    end

    trait :with_runbook_url do
      runbook_url { 'https://runbooks.gitlab.com/metric_gt_1'}
    end
  end
end