Fix count_security_scans_metric_spec occasional failures
requested to merge 418221-spec-failure-rspec-ee-spec-lib-gitlab-usage-metrics-instrumentations into master
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.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #418221 (closed)
Edited by Niko Belokolodov