gitlab-org--gitlab-foss/spec/factories/prometheus_alert.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

22 lines
445 B
Ruby
Raw Normal View History

# 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