diff options
Diffstat (limited to 'spec/support/helpers/prometheus_helpers.rb')
-rw-r--r-- | spec/support/helpers/prometheus_helpers.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/support/helpers/prometheus_helpers.rb b/spec/support/helpers/prometheus_helpers.rb index d49abbf3f19..e1f5e6dee14 100644 --- a/spec/support/helpers/prometheus_helpers.rb +++ b/spec/support/helpers/prometheus_helpers.rb @@ -267,6 +267,13 @@ module PrometheusHelpers } end + def prometheus_alert_payload_fingerprint(prometheus_alert) + # timestamp is hard-coded in #prometheus_map_alert_payload + fingerprint = "#{prometheus_alert.prometheus_metric_id}/2018-09-24T08:57:31.095725221Z" + + Gitlab::AlertManagement::Fingerprint.generate(fingerprint) + end + private def prometheus_map_alert_payload(status, alert) |