debian-mirror-gitlab/spec/factories/prometheus_alert.rb

22 lines
433 B
Ruby
Raw Normal View History

2020-03-13 15:44:24 +05:30
# frozen_string_literal: true
FactoryBot.define do
factory :prometheus_alert do
project
operator { :gt }
threshold { 1 }
environment do |alert|
build(:environment, project: alert.project)
end
prometheus_metric do |alert|
build(:prometheus_metric, project: alert.project)
end
2020-10-24 23:57:45 +05:30
trait :with_runbook_url do
runbook_url { 'https://runbooks.gitlab.com/metric_gt_1'}
end
2020-03-13 15:44:24 +05:30
end
end