Fix failing aggregate_spec
What does this MR do and why?
Spec file assumed that there is at least one aggregated metric definition present at appointed directory. Due to migration process (see #373830 (comment 1126596388)) there is non, which made spec failed. This commit uses temp directory to test method implementation until more broad clean up will be delivered in follow up MR as part of #370963 (closed)
Resolves #377661 (closed)
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
How to set up and validate locally
In rails console
Gitlab::Usage::Metrics::Aggregates::Aggregate.new(Time.current).monthly_data
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.
Edited by Mikołaj Wawrzyniak