Skip to content

Fix count_security_scans_metric_spec occasional failures

What does this MR do and why?

Fixes failing spec by adjusting date of a created testing object outside of the time frame with a relatable range.

It used to fail sometimes since the metric time frame is counted 30..2.days.ago

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After

How to set up and validate locally

rspec ./ee/spec/lib/gitlab/usage/metrics/instrumentations/count_security_scans_metric_spec.rb

Numbered steps to set up and validate the change are strongly suggested.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #418221 (closed)

Edited by Niko Belokolodov

Merge request reports