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

18 lines
330 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|
build(:environment, project: alert.project)
end
prometheus_metric do |alert|
build(:prometheus_metric, project: alert.project)
end
end
end