diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-06 18:08:54 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-06 18:08:54 +0000 |
commit | 0d6fa033121a9bef708b8f2de186c4034c61d4a3 (patch) | |
tree | 851d65a09efbffa114c9a273e590d55cfb1436ab /spec/factories | |
parent | 0eb3d2f799ce4f4de87fb9fc6fd98e592323bc89 (diff) | |
download | gitlab-ce-0d6fa033121a9bef708b8f2de186c4034c61d4a3.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/factories')
-rw-r--r-- | spec/factories/prometheus_alert.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/spec/factories/prometheus_alert.rb b/spec/factories/prometheus_alert.rb new file mode 100644 index 00000000000..a9fede9efca --- /dev/null +++ b/spec/factories/prometheus_alert.rb @@ -0,0 +1,17 @@ +# 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 |